stripe-react-native icon indicating copy to clipboard operation
stripe-react-native copied to clipboard

handleCardAction not calling returnURL / authentication WebView not closing

Open te-online opened this issue 3 years ago • 0 comments

Describe the bug When calling handleCardAction, if an authentication modal opens for 3D-secure, it is never closed, since no return URL is called.

To Reproduce Steps to reproduce the behavior:

  1. Create a payment intent with a test card that always requires authentication
  2. Call handleCardAction(paymentIntentClientSecret)
  3. Go through 3D-secure or cancel it
  4. WebView / Sheet does not close

Expected behavior The authentication WebView closes, because scheme://safepay is being called and the app in question has implemented a handler for these links and calls handleURLCallback subsequently.

Screenshots Simulator Screen Shot - iPhone 12 Pro - 2022-01-12 at 12 21 18

Smartphone (please complete the following information):

  • Device: iPhone 12
  • OS: iOS 15.2
  • Browser: Safari
  • Version [e.g. 22] n/a

Additional context I already mentioned this problem in this related issue. However, in our app closing of the authentication modal works fine now when using confirmSetupIntent, because we implemented the handler for the safepay link. It's just not working when using handleCardAction.

It looks to me like in this method the additional returnURL parameter is missing from the resulting paymentIntent object. Not sure if this is the cause though.

te-online avatar Jan 12 '22 11:01 te-online