stripe-react-native
stripe-react-native copied to clipboard
Failed redirect when using confirmSetupIntent bugs future calls
Describe the bug Attempting to add a card that requires redirection, but not handling the redirection properly prevents using the function for x-amount of time.
To Reproduce Steps to reproduce the behavior: In my test Stripe environment I am:
- Creating a new payment method using
createPaymentMethodand<CardField> - Sending to an endpoint which fetches the new payment method, verifies it is not a duplicate for the customer, creates a setup intent attached to a customer ID, and returns the
client_secret - Pass the
client_secrettoconfirmSetupIntent - Try to add the test card
4000 0027 6000 3184without proper redirect handling in the app - For roughly the next 1-2 hours, with any attempt to run the above steps,
confirmSteupIntentimmediately returns with the errorThe current action is not yet completed. STPPaymentHandler does not support concurrent calls to its API.
Expected behavior Not being prevented from adding a card after a failed redirect
Screenshots I can provide a video if needed on an old revision
Desktop (please complete the following information):
- OS: Windows 11
- Browser n/a
- Version n/a
Smartphone (please complete the following information):
- Device: iPhone 14 Pro Max
- OS: 17
- Browser n/a
- Version n/a
Additional context Expo managed workflow Expo CLI 0.10.11 Expo SDK 49.0.5 stripe-react-native 0.30.0
I'm using initStripe
All payment methods created using createPaymentMethod are set up for off-session usage
For clarification: I have tested that adding proper redirection following Expo's guide here prevents the issue from happening again, but preventing adding a card for a couple hours after a failed redirect (accident or not) does not seem desirable or intended.
I have chatted with Stripe Developer Support on Discord and it was recommended to submit an issue here.