#abhilash_ss
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- abhilash_ss, 15 hours ago, 14 messages
- abhilash_ss, 17 hours ago, 6 messages
Can you summarise the issue for me
I am using @stripe/stripe-react-native and confirmPayment from the useConfirmPaymenthook. If there is any error confirmPaymentfunciton will return an error object, which looks like the following:
{
"stripeErrorCode": null,
"declineCode": null,
"localizedMessage": "Invalid Payment Intent client secret: clientSecret",
"message": "Invalid Payment Intent client secret: clientSecret",
"type": null,
"code": "Failed"
}
So I am wondering that is there any way to get the localizedMessage props value in a specific language...
I can see that in the react stripe library has an option to pass the locale to the stripe:
const stripePromise = loadStripe(stripePublishableKey, {
locale: locale,
});
<Elements options={options} stripe={stripePromise}>
<PaymentForm {...props} />
</Elements>
but not in the react native sdk
here is last conversation I had #dev-help message
Is this on a specific bundle? iOS, Android?
Seems like this might be a known issue currently on Android: https://github.com/stripe/stripe-react-native/issues/923
Describe the bug On Android only the method confirmPayment always returns error messages in english. Returned object: {"code": "Failed", "declineCode": null, "loc...
Confirmed here that the library should use the device OS language: https://github.com/stripe/stripe-react-native/issues/820#issuecomment-1050219967
So yeah, seems like a bug. Would recommend filing an issue on the GH repo!
Yeah then it sounds like that bug I shared. I'd recommend following up on that with a reproduction and the team will triage
In the meantime you can localise your own error messages with i18n using the error codes maybe
Not ideal, but a workaround until the bug is fixed
Thanks @modest ledge for confirming this
np!