You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To Reproduce
Steps to reproduce the behavior:
return error from the backend /create-intent request during applepay from @stripe/stripe-react-native presentPaymentSheet method
Expected behavior
Nn error is displayed instead of the app crashing
Screenshots
✅ /create-intent returns client_secret
intent.ok.mp4
🔴 /create-intent throws an error - card is working well, apple pay - app crashes
We are experiencing the same issue.
Passing any error to the intentCreationCallback in the deferred payment case when using Apple Pay will lead to a crash of the app. Using a credit card will work as expected.
To replicate this is a minimal confirmHandler for initPaymentSheet:
constconfirmHandler=async(paymentMethod: Result,shouldSavePaymentMethod: boolean,intentCreationCallback: (result: PaymentSheet.IntentCreationCallbackParams)=>void,)=>{consterror={code: PaymentSheetError.Failed,message: "There was an unexpected error -- try again in a few seconds",localizedMessage: "There was an unexpected error -- try again in a few seconds",}asStripeError<PaymentSheetError.Failed>;callback({ error });};
Describe the bug
When you pay with applepay and any kind of error is returned from
/create-intent
the app is being crashed.Docs with the flow we follow: https://docs.stripe.com/payments/accept-a-payment-deferred?platform=react-native
To Reproduce
Steps to reproduce the behavior:
return error from the backend
/create-intent
request during applepay from @stripe/stripe-react-native presentPaymentSheet methodExpected behavior
Nn error is displayed instead of the app crashing
Screenshots
✅ /create-intent returns client_secret
intent.ok.mp4
🔴 /create-intent throws an error - card is working well, apple pay - app crashes
intent.fails.mp4
Demo repository with app & server code
just provide your sandbox keys in server, run the server and build the app locally
https://github.com/bartoszboruta/stripern
Smartphone (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: