#kevin_reactnative-deeplink
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1270392002441248840
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- kevin_code, 22 hours ago, 67 messages
- kevin_code, 1 day ago, 5 messages
- kevin_code, 1 day ago, 11 messages
PayPal behaviour โ
const { error, paymentMethod } = await createPaymentMethod({ paymentMethodType: 'Card' });
createPaymentMethod behaviour โ
(but why does it not redirect like the PayPal out of curiosity?)
const { error, setupIntent } = await confirmSetupIntent(stripeClientSecret, {
paymentMethodType: 'Card',
});
Confirm setup intent with 3DS secure, behaviour is not okay โ
Hi there ๐ do you hvae an ID of an intent from your testing, where this didn't work as expected, that you can share?
Yeah let me find that ๐
Do you know on the dashboard where I can find the list of setup intent?
We aren't as familiar with the dashboard side of things, but I don't think they're listed anywhere in there. The developer logs are the best page coming to mind for finding the creation request you made:
https://dashboard.stripe.com/test/logs?method[0]=post&method[1]=delete&direction[0]=connect_in&direction[1]=self
You can also list the Setup Intents you've created via the API:
https://docs.stripe.com/api/setup_intents/list
So this setup intent has been confirmed: seti_1PkomlBBURfSZNfgxsOHTkqy
But the browser does not close as you can see in the last video unlike the first one with PayPal and I don't understand why since it's the same URL that's called https://www.example.com/safepay?redirect_status=pending&setup_intent=abcde
Hm, was that Setup Intent actually used? I don't see any confirmation requests being made for it.
Ah let me check maybe it was a wrong one sorry >.<
seti_1Pkp06BBURfSZNfg6knfQ86d It's this one
Hm, that one wasn't confirmed either. Unless that was jjuusstt done and the requests haven't been indexed yet.
Same, all I'm seeing is this request to create the intent:
https://dashboard.stripe.com/test/logs/req_bARNxt2GaExjy8
Mmmm let me check again sorry :/
Okay so I found the error my bad, because of the redirection in the browser that isn't triggering the deeplink, the confirmSetupIntent promise is not resolved
const { error, setupIntent } = await confirmSetupIntent(stripeClientSecret, {
paymentMethodType: 'Card',
});
I don't have this on my main branch because on my main branch I do not have deeplink enabled and no URL scheme in my StripeProvider
The thing is that the redirection is working perfectly for PayPal setup intent but not for credit card with 3DS secure, do you have an idea why?
Not without substantially more context, like how are you triggering the display of the 3DS challenge if you aren't confirming the Setup Intent?
On PayPal I display the test page with this
const { error, setupIntent } = await confirmSetupIntent('clientSecret', {
paymentMethodType: 'PayPal',
paymentMethodData: {
mandateData: {
customerAcceptance: {
online: {
ipAddress: 'IP',
userAgent: 'userAgent',
},
},
},
},
});
And when I confirm, it closes the browser and put me back on the cart page on my app
Now when I have a 3DS secure page with this credit card 4000002760003184, I trigger it this way
const { error, setupIntent } = await confirmSetupIntent(stripeClientSecret, {
paymentMethodType: 'Card',
});
But when I accept it redirects me to the URL but the deeplink is not triggered
I'm testing on React Native on an iOS device
FYI, it's working with this promise for example
const { error, paymentMethod } = await createPaymentMethod({ paymentMethodType: 'Card' });
Sorry, I'm not sure I'm following. I thought you said the confirmation request is made after the 3DS challenge, which currently isn't happening because you aren't being linked back to your app. So I'm assuming you have something else you're doing before the intent confirmation that is triggering the 3DS flow?
We can ignore your paypal code since it's the card code that isn't working as expected.
Mmmmm not sure how to explain this
The issue is that because of the redirection added here in the urlScheme, it redirects me to the URL https://www.example.com/safepay instead of closing the window and opening the correct page on my app,
<StripeProvider urlScheme='https://www.example.com'>
Because of that the JS promise createPaymentMethod isn't resolving
So the issue I'm facing is "Why createPaymentMethod is having a different behaviour of redirection after accepting the payment for credit card and PayPal ?"
- The method used is the same
- The redirection URL is the same
- But it does not trigger the deeplink for a credit card
PayPal redirection working โ
Do you know why you're explicitly creating a Payment Method instead of letting the Setup Intent handle that for you?
Credit card redirection not working
Sorry I don't understand, what do you mean by this sentence? ๐ค
Part of a Setup Intent's lifecycle is creating a Payment Method object, which means it's usually unnecessary to explicitly create a Payment Method yourself via createPaymentMethod.
Ah I'm stupid sorry, I meant confirmSetupIntent in my previous message
Not createPaymentMethod
But that doesn't align with the Setup Intents that you shared which aren't being confirmed.
Our old flow that needs to be modified is like this :
- They create the payment intent
- They give us the client secret
- We confirm it
But when we confirm it, it does not work because of the redirection not working
Sorry, but would you mind stepping through your flow and confirm how it is currently structured? Because there you pivoted to talking about Payment Intents instead of Setup Intents, and I'm having a hard time understanding what code you currently have running.
๐ Perfect time for me to take over. I was trying to grasp the back and forth myself and got... completely lost honestly. So I think we should just start fresh here with a clear summary of the real question, ignoring everything shared before
kevin_reactnative-deeplink
Okay sorry MB let's start from the beginning
- I enabled deeplink on my app
- So I provided a URL scheme on my
StripeProvider - Now the back-end initiate a setup intent and gives me back the client secret
PayPal behaviour โ
const { error, setupIntent } = await confirmSetupIntent('SECRET', {
paymentMethodType: 'PayPal',
paymentMethodData: {
mandateData: {
customerAcceptance: {
online: {
ipAddress: 'IP',
userAgent: 'userAgent',
},
},
},
},
});
Credit card behaviour (2nd video) โ
const { error, setupIntent } = await confirmSetupIntent(stripeClientSecret, {
paymentMethodType: 'Card',
});
The URL in both cases are https://www.example.com/safepay , in both case I use confirmSetupIntent, on PayPal the deeplink is working, on the credit card that need an authorization the deeplink is not working and so the promise of confirmSetupIntent is not triggered
Here is my version of Stripe RN
"@stripe/stripe-react-native": "~0.37.0",
Okay and you did all of this: https://docs.stripe.com/payments/save-and-reuse?platform=react-native&mobile-ui=payment-element#set-up-return-url?