#abhilash_ss

1 messages · Page 1 of 1 (latest)

violet cypressBOT
#

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.

modest ledge
#

Can you summarise the issue for me

gray silo
#

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

modest ledge
#

Is this on a specific bundle? iOS, Android?

#

So yeah, seems like a bug. Would recommend filing an issue on the GH repo!

gray silo
#

Right now I am using only on the Android...

#

Not sure about IOS

modest ledge
#

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

gray silo
#

Thanks @modest ledge for confirming this

modest ledge
#

np!