stripe-react-native
stripe-react-native copied to clipboard
Cancelling payment sheet with custom flow doesn't send error, if customer has saved cards
Describe the bug If you create a payment sheet with custom flow, and initialize it with a customer that has stripe cards, the payment sheet selects a card by default. This means if you cancel out of the payment sheet, the card is already selected, so it doesn't throw a Cancelled error, it counts it as having selected a payment method.
I think this relates to: https://github.com/stripe/stripe-react-native/pull/975
To Reproduce Steps to reproduce the behavior:
- Create payment sheet with custom flow
- When call initPaymentSheet, fill in stripe customer and ephemeral key for a stripe customer that has saved cards.
- Open the payment sheet, a card should be selected by default
- Click the cross on the payment sheet, but presentPaymentSheet returns a null error, and non-null paymentOption with default card.
Expected behavior Should return a cancel error, or at least a null paymentOption
Smartphone (please complete the following information):
- Android: OnePlus Nord / OS: 11
- IOS: IPhone 11 / IOS: 16.5
I was fixing an issue in our flutter repo and I can confirm above scenario.
Furthermore there is an inconsistency in propagating result objects between android and iOS. For the following scenario:
- init payment sheet and after that use present payment sheet (no user so it will only show the Apple Pay or google pay option )
- When choosing select payment method press cancel.
- Behaviour android: it provides an error with cancelled. Behaviour iOS : it defaults to the Apple Pay payment option and we can continue.
1+
When will this be fixed??
any update bro?
can we get an update on this?
+1 getting same issue. When using custom flow, pressing out of the payment sheet or clicking on X button to close it, returns selected default payment option and does not throw any error.
any update?
Facing the same issue in react-native stripe sdk, any update on this? or any work around for this?
I had to switch from custom flow due to this error. I recommend other people do the same if it’s possible in your design.