#Tao

1 messages · Page 1 of 1 (latest)

quasi robinBOT
crystal violet
#

Hi 👋

AliPay requires customers to authenticate and be redirected so you need to provide a return_url when cnfirming the payment.

dapper nexus
#

req_7p3dQoXihSWFvK

crystal violet
#

Okay yeah, you need to provide a URL that will return the customer to your website/app

dapper nexus
crystal violet
#

It handles things in a different way

dapper nexus
#

Sorry for still being confused. I did follow step 3 for the guide, but the error comes from step 4 with the line
const { error, paymentIntent } = await confirmPayment(clientSecret, {
type: 'Alipay',
});

Is it because I need to implement logic in these lines for step 3
if (stripeHandled) {
// This was a Stripe URL - you can return or add extra handling here as you see fit
} else {
// This was NOT a Stripe URL – handle as you normally would
}

crystal violet
#

Do you have your custom URL scheme configured?

#

The Stripe React Native SDK specifies safepay/ as the return URL host for bank redirect and digital wallet payment methods. After the customer completes their payment with Alipay, they’re redirected to myapp://safepay/, where myapp is your custom URL scheme

dapper nexus
#

I am using Expo and I have added
{
"expo": {
"scheme": "myapp"
}
}

#

I am testing with a ios simulator, is it possible that Alipay can only be tested on an iPhone?

crystal violet
#

The customer may go out of your app to authenticate, for example, in Safari or their banking app. To allow them to automatically return to your app after authenticating, configure a custom URL scheme or universal link and set up your root component to forward the URL to the Stripe SDK.
So are you opening AliPay to Safari?

dapper nexus
#

I believe it is redirected back to the app by adding the scheme in expo

crystal violet
#

Sorry I meant launching AliPay in a webview

dapper nexus
#

I'm confused about how Stripe integrates with Alipay for this part, is it designed to launch Alipay in a webview or the actual app?

crystal violet
#

Webview, AliPay does not allow launching in the app

#

Because the authentication request has to take place outside your app

dapper nexus
#

Got it, thank you. How does this information affect the fact that we are running into this error? I have configured step 3, but step 4 still returns error with missing return_url.

crystal violet
dapper nexus
#

Thank you, I will look into that.

#

I did find a post on stackoverflow with the same issue 7 months ago with no fix. If I still cannot resolve the issue, can you look into the problem internally?

crystal violet
#

We can continue to investigate this if you come back to this channel and raise the issue.

dapper nexus
#

I managed to solve the issue. I need to provide urlScheme="your-url-scheme" for aliPay in step 1. Thank you for the help.