-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Transaction failed. Please select a different payment method." error not translated #406
Comments
Can you tell me where you are getting When I use the code you provided, I get this screen as expected: Here's the Italian version: Can you share a github repo that can reproduce this error? And, finally, just a few notes about your server code:
return gateway.clientToken.generate({
options: {
failOnDuplicatePaymentMethod: true,
}
})
Also, Drop-in will automatically filter out duplicate cards (showing the one with the most recent expiration date) when showing saved payment methods to the customer. So you may not even need to pass that option. |
First of all, thanks crookedneighbor for your quick answer. I am aware of point 2, thanks anyway for the clarification. Regarding point 1, I actually gave you a restricted version of the code I am using. In the actual version, prior to token creation, the customer is searched in the vault. If it does not exists, a customer is created. I need to avoid the possibility to insert the same card for multiple users since in my use case there is a 10€ discount on the first order. So generally the same customer creates more users and insert the same cart. So, this is a way to prevent this abuse. Anyway, for the problem I have, I set up the following repo. In the readme I explain how to reproduce the problem. |
Thanks for setting up that demo for us. We took another look and confirmed the Upgrading to this version should render this newer more accurate message in this scenario. I'm going to close this, but feel free to leave a comment if this doesn't work for you. |
General information
I have a very basic setup. My server exposes two enpoints:
/client_token
: to get the token for the dropin-ui initialization/checkout
: to perform the transaction once obtained anonce
These following code snippets show my setup:
SERVER
CLIENT
These are my requirements:
failOnDuplicatePaymentMethod
settrue
during token generation)Everything works fine, but my first requirement is not met since the error Transaction failed. Please select a different payment method. is shown whenever a card already present in the vault is inserted.
In the translation file I did not find this error, so I was not able to give to the dropin-ui my own translation for this error.
Is it possible to add this error to the translation file?
The text was updated successfully, but these errors were encountered: