stripe / stripe-react-native

React Native library for Stripe.
https://stripe.dev/stripe-react-native
MIT License
1.26k stars 262 forks source link

[feat] Return error type from native sdk #1480

Open talaikis opened 1 year ago

talaikis commented 1 year ago

Is your feature request related to a problem? Please describe.

confirmSetupInten returns {"code": "Failed", "declineCode": null, "localizedMessage": "....", "message": "...", "stripeErrorCode": null, "type": null}, i.e. w/o providing native sdk type, for example stripe_failure_reason_authentication

Describe the solution you'd like

Errors should include native sdk errors type.

NicolasFreshmile commented 11 months ago

I am very interested in this issue. Can someone please help me understand how to fix it !

talaikis commented 11 months ago

I've used values from Android SDK https://github.com/stripe/stripe-android/blob/294ce71f57564c9ff1fa4b4ad94403f4376cb586/payments-core/res/values/strings.xml#L11