Issues handling non-ascii characters
See original GitHub issueGeneral information
- SDK/Library version: v1.19.0
- Environment: Sandbox and Production
- Browser and OS : Any browser and OS
Issue description
With 3D-Secure 2.0, we’re advised to send a billingAddress
‘object’, this object contains things such as given name, surname, address - however, someone came up with the idea to only accept printable ASCII characters in these fields, meaning anyone that lives in a country with letters being non-ascii (even with letters being in the “extended ascii”) can apparently not complete orders with the drop-in UI due to the API call below only accepts ASCII.
https://api.sandbox.braintreegateway.com/merchants/XXXXXX/client_api/v1/payment_methods/XXXXXXX/three_d_secure/lookup
Supplying a non-ascii name, such as “Jørgen” will result in the message:
{"error":{"message":"Billing given name format is invalid."},"threeDSecureInfo":{"liabilityShifted":false,"liabilityShiftPossible":false}}
Braintree is able to create customers containing non-ascii characters (such as æ, ø, å, ü etc) - so I can’t see why the lookup shouldn’t support it.
In this case, what’s the advised way of handling this? As far as I know, there’s no standardized way to convert non-ascii to ascii in javascript (if anyone knows a library that does this… please share!) - and from a 3DS integration perspective, what format does banks expect?
The billingAddress
object is used for banks to determine whether there should be a challenge or not - so in case we have a bank with a customer that contains non-ascii characters, then, do they expect Jorgen
, joergen
, or what format is expected to be accepted?
To replicate the issue, simply use the codepen provided in the #480 issue, and change Jane
to Jørgen
and see stuff fail.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:11 (2 by maintainers)
Top GitHub Comments
I’ve been in contact with EMVCo, after they realized that it’s quite common that cardholder schemes use UTF-8 in cardholder names, EMVCo will update their endpoints to support UTF-8.
The official reply:
A small update - I contacted the danish divisions of VISA and Mastercard - and they indeed confirmed that they use æ, ø and å and even é (e.g. if people e.g. are called René) when issuing cards - so both VISA and Mastercard apparently goes against their own rules.