stripe-react-native
                                
                                 stripe-react-native copied to clipboard
                                
                                    stripe-react-native copied to clipboard
                            
                            
                            
                        handleCardAction not calling returnURL / authentication WebView not closing
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:
- Create a payment intent with a test card that always requires authentication
- Call handleCardAction(paymentIntentClientSecret)
- Go through 3D-secure or cancel it
- 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

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.