#kevin_reactnative-deeplink

1 messages ยท Page 1 of 1 (latest)

solid parrotBOT
#

๐Ÿ‘‹ 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.

random hillBOT
#

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.

fickle python
spice spire
#

Hi there ๐Ÿ‘‹ do you hvae an ID of an intent from your testing, where this didn't work as expected, that you can share?

fickle python
#

Yeah let me find that ๐Ÿ˜„

#

Do you know on the dashboard where I can find the list of setup intent?

spice spire
fickle python
#

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

spice spire
#

Hm, was that Setup Intent actually used? I don't see any confirmation requests being made for it.

fickle python
#

Ah let me check maybe it was a wrong one sorry >.<

#

seti_1Pkp06BBURfSZNfg6knfQ86d It's this one

spice spire
#

Hm, that one wasn't confirmed either. Unless that was jjuusstt done and the requests haven't been indexed yet.

fickle python
#

Mmmm really weird ๐Ÿค”

#

Can you re-check maybe ? ๐Ÿคทโ€โ™‚๏ธ

spice spire
fickle python
#

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?

spice spire
#

Not without substantially more context, like how are you triggering the display of the 3DS challenge if you aren't confirming the Setup Intent?

fickle python
#

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' });
spice spire
#

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.

fickle python
#

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
solid parrotBOT
spice spire
#

Do you know why you're explicitly creating a Payment Method instead of letting the Setup Intent handle that for you?

fickle python
fickle python
spice spire
#

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.

fickle python
#

Ah I'm stupid sorry, I meant confirmSetupIntent in my previous message

#

Not createPaymentMethod

spice spire
#

But that doesn't align with the Setup Intents that you shared which aren't being confirmed.

fickle python
#

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

spice spire
#

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.

frosty oak
#

๐Ÿ‘‹ 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

fickle python
#

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",