Skip to content

[BUG] 3DSecure 2 Hook webview not coming back to App, even with valid returnURL #4565

Open
@RaphJustPark

Description

Summary

On our native iOS App, we trigger Stripe Payment actions using
STPPaymentHandler.shared().handleNextAction(forPayment: paymentIntentClientSecret, with: authenticationContext, returnURL: returnURL, completion: completion)

When trying to pay with card 4000002500003155, the result is a .threeDS2Redirect with a hook.stripe.com fallback URL from APIRequest<STP3DS2AuthenticateResponse>.

The return URL is registered in Info.plist and tested. It is passed along successfully to APIRequest<STP3DS2AuthenticateResponse> on if let returnURLString = returnURLString { params["fallback_return_url"] = returnURLString }

But still, when the SafariWebView opens, and we authenticate, the Webview never closes and the text "You may now close this window" sits there.

Another successful test that the returnUrl works, is that I opened regular Safari while having the in-app safari webview from Stripe opened, once I executed "myapp://stripe-payment", the App opened and the line StripeAPI.handleURLCallback(with: url) from AppDelegate kicked in.

Code to reproduce

I posted most of the snippets above, but the App triggers Stripe using
STPPaymentHandler.shared().handleNextAction(forPayment: paymentIntentClientSecret, with: authenticationContext, returnURL: returnURL, completion: completion)

with a valid intent + valid returnURL

iOS version

iOS 18

Installation method

Cocoapods

SDK version

23.27.0

Other information

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions