Replies: 7 comments 3 replies
-
It's the credit card token source: const mp = new (window as any).MercadoPago(gateway?.publicKey, {
locale: 'pt-BR',
});
const card = this.cardNumber?.replace(/\s/g, '').replace(/#/g, '');
const paymentMethods = await mp.getPaymentMethods({
bin: card?.substring(0, 8),
});
const paymentMethod = paymentMethods.results.pop();
const cardToken = await mp.createCardToken({
cardNumber: card,
cardholderName: this.cardHolderName,
cardExpirationMonth: this.cardExpiryMonth,
cardExpirationYear: (Number(this.cardExpiryYear) + 2000).toString(),
securityCode: this.cardSecurityCode,
identificationType: 'CPF',
identificationNumber: this.holderCPF,
}); |
Beta Was this translation helpful? Give feedback.
-
Amigo, se conseguiu resolver, me retorna a solução, favor. Recebo o mesmo erro { message: 'internal_error', error: null, status: 500, cause: [] } Independente do método de pagamento utilizado. Estou tentando no sdk do mp, e todos os testes dão esse erro. |
Beta Was this translation helpful? Give feedback.
-
Resolvi usando o token de produção. Descobri isso em outros comentários aqui no github. Solução perigosa, então é melhor criar uma nova conta do mp só para esses testes |
Beta Was this translation helpful? Give feedback.
-
Olá, recentemente fiz a chamada via API e tive sucesso. |
Beta Was this translation helpful? Give feedback.
-
Boa tarde @rafaneri realizamos uma serie de testes, e não conseguimos reproduzir o erro. Poderia realizar outro teste e certificar se tudo funciona como o esperado? |
Beta Was this translation helpful? Give feedback.
-
To fechando essa discussão nesse momento, caso o erro volte a ocorrer, por favor, entre em contato novamente. Obrigado! |
Beta Was this translation helpful? Give feedback.
-
@lucmkz estou tentando dessa maneira:
error:
API de testes (sandbox) |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm trying to put MP sdk working in my project, but without success.
I'm using the Vendedor user from sandbox how is recommended:
It's a request sample PIX payload:
It's a request sample CREDIT_CARD payload:
All lot of my requests get the same result:
Beta Was this translation helpful? Give feedback.
All reactions