stripe-react-native icon indicating copy to clipboard operation
stripe-react-native copied to clipboard

Error messages not localized on Android (always in english)

Open ClementLevesque opened this issue 3 years ago • 0 comments

Describe the bug On Android only the method confirmPayment always returns error messages in english. Returned object: {"code": "Failed", "declineCode": null, "localizedMessage": "The provided PaymentMethod has failed authentication. You can provide payment_method_data or a new PaymentMethod to attempt to fulfill this PaymentIntent again.", "message": "The provided PaymentMethod has failed authentication. You can provide payment_method_data or a new PaymentMethod to attempt to fulfill this PaymentIntent again.", "stripeErrorCode": "payment_intent_authentication_failure", "type": "invalid_request_error"}

It works fine for iOs.

To Reproduce Steps to reproduce the behavior:

  1. Set the device locale to french
  2. Select a 3DS credit card
  3. Execute confirmPayment with the client secret
  4. Click on 'Fail authentification' on the 3D Secure interface
  5. See the error returned : {"code": "Failed", "declineCode": null, "localizedMessage": "The provided PaymentMethod has failed authentication. You can provide payment_method_data or a new PaymentMethod to attempt to fulfill this PaymentIntent again.", "message": "The provided PaymentMethod has failed authentication. You can provide payment_method_data or a new PaymentMethod to attempt to fulfill this PaymentIntent again.", "stripeErrorCode": "payment_intent_authentication_failure", "type": "invalid_request_error"}

Expected behavior Error messages in Android should be localized as it is supposed to be.

Screenshots N/A

Smartphone (please complete the following information):

  • Device: SM-G960U
  • Android version 10
  • Version lib 0.2.3 Device locale is french

ClementLevesque avatar May 04 '22 10:05 ClementLevesque