question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue redirecting to 3d-secure web view while using native stack navigation

See original GitHub issue

Describe the bug When trying to process a payments requiring 3d-secure authentication we receive the following generic error:

{ 
  "stripeErrorCode": null, 
  "declineCode": null, 
  "localizedMessage": "There was an unexpected error -- try again in a few seconds", 
  "message": "There was an unexpected error -- try again in a few seconds", 
  "type": null, 
  "code": "Failed" 
}

if we nest our checkout screen like this:

<NativeStackNavigator>
    <ModalScreen>
        <NativeStackNavigator>
       	    <CheckoutScreen />
	</ NativeStackNavigator>
    </ ModalScreen>
</ NativeStackNavigator>

We managed to get 3d-secure authentication to work again by just changing the outer most native stack navigator to a normal stack navigator:

<StackNavigator>
    <ModalScreen>
	<NativeStackNavigator>
	    <CheckoutScreen />
	</ NativeStackNavigator>
    </ ModalScreen>
</ StackNavigator>

To Reproduce Steps to reproduce the behavior: Using the dependencies listed below and the project navigation structure above:

  1. Successfully initialize payment sheet with customerId, customerEphemeralKeySecret and paymentIntentClientSecret
  2. Successfully add payment option using the payment sheet
  3. Attempt to confirm payment by calling confirmPaymentSheetPayment()

Expected behavior Calls to confirm payments requiring 3d-secure authentication should trigger the authentication flow within native stack navigation

Smartphone (please complete the following information):

  • Device: any iPhone
  • OS: iOS
  • Version: seemingly any version of iOS

Additional context Dependencies: @react-navigation/native 6.0.8 @react-navigation/native-stack 6.5.0 @react-navigation/stack 6.1.1 @stripe/stripe-react-native 0.2.3 react-native-screens 3.10.2

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
lbinscheckcommented, Feb 16, 2022

@rednalon We also had quite a few users reporting issues with the 3ds authentication. In our case many users experience the 3DS2 flow to be difficult to understand. The UI shows a big button that says “complete” once the 3ds2 sheet opens. And they click it right away. What they actually need to do is to authenticate the payment still, with an app or similar.

TLDR: Check if the paymentIntents use 3DS2 to authenticate the user.

IMG_0601

1reaction
littleskicommented, Mar 8, 2022

We use createStackNavigator from @react-navigation. It would be quite painful to try to swtich to something else. I am not sure this is related to the navigator tho. 3d secure works for most banks, the issue is mainly that the “complete” button is often available for the user to click on it, BEFORE any validation has been performed via the bank app. Thus. If the user “click” on the complete button without having switch to his bank app to do the validation, the 3D secure payment failed. If the user first go to his bank app to validate, and then click complete, it works fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS Stripe webview 3d secure conformation issue
After that I see a Safari webview which allows me to complete the 3d secure check. Then it redirects to a page with...
Read more >
How to handle navigation with WebViews in a React Native app
open the file android/gradle. properties and make sure the following two lines exist. If not, add them:
Read more >
apex - Is there a way to retrieve a PageReference parameter ...
I can see a redirect happening that has my parameters I'm trying to pick, however the final result of the redirects do not...
Read more >
Stripe JS Reference
This reference documents every object and method available in Stripe's browser-side JavaScript library, Stripe.js. Use our React Stripe.js reference if you ...
Read more >
Using WebView with React Navigation | by Damien Mason
push({ routeName: 'ScreenName'}) ) or trickiest of all, open a different screen defined in the Stack Navigator ( navigation.navigate(' ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found