Skip to content

Commit

Permalink
Testes de consulta de cartão tokenizado
Browse files Browse the repository at this point in the history
  • Loading branch information
banzeh committed Nov 24, 2019
1 parent 56b22fc commit 4cbcf4c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cielo.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ brands.forEach(brand => {

t.assert('CardToken' in token, 'retorno cardToken correto')
t.assert(regexToken.test(token.CardToken), 'CardToken válido')

const consultaTokenParams = {
token: token.CardToken
}
const consultaToken = await cielo.cards.consultaTokenizedCard(consultaTokenParams).catch(error)

t.assert(consultaToken.Holder.toLowerCase() === tokenParams.Holder.toLowerCase(), 'Holder do cartão correto');
t.assert(consultaToken.ExpirationDate === tokenParams.ExpirationDate, 'Data de expiração do cartão correta')

const vendaParams = {
'MerchantOrderId': 'CieloNodeJS000003',
'Customer': {
Expand Down

0 comments on commit 4cbcf4c

Please sign in to comment.