#spharian_return-url-reactnative

1 messages Ā· Page 1 of 1 (latest)

umbral spadeBOT
#

šŸ‘‹ 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/1319422726565400679

šŸ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

worthy crescent
#

Hello! You need to provide a return_url as mentioned in the error message.

#

Specifically, you need to provide it when you confirm, in the confirmation request.

forest needle
#

I did on the server side. Where else should I do it?

worthy crescent
#

In the confirmation request. Inside confirmSetupIntent.

forest needle
#

const { error, setupIntent } = await confirmSetupIntent(clientSecret,
{
returnURL: 'shinylive://stripe-redirect',
paymentMethodType: 'PayPal',
paymentMethodData: {
billingDetails: {
name: ${currentUser.firstname} ${currentUser.lastname},
phone: currentUser.phone,
email: currentUser.email,
address,
},
},
},
{
setupFutureUsage: 'OffSession',
}
)

#

tried with returnUrl and returnURL

worthy crescent
#

It should be returnURL. What happened when you tried that?

forest needle
#

same error (error ID on Stripe : req_lJaGPdJHWLT0r0)

#

You must provide a return_url when confirming a SetupIntent with the payment method type paypal.

worthy crescent
#

There's no return URL in that request. Are you sure that was made with the updated code?

forest needle
#

yes but i'm not sure it's at the right place

worthy crescent
#

No, I mean, are you sure the code change you made is actually the code that's running?

forest needle
#

yes

#

I just changed to TEST to be sure

worthy crescent
#

Oh, you're using React Native, hang on...

forest needle
worthy crescent
#

One of those people fixed it by making sure recurring payments was enabled for PayPal in their Dashboard. Can you confirm that?

forest needle
#

Haha we are on the same page

worthy crescent
#

heh

forest needle
#

How can I pass the approval on test mode?

worthy crescent
#

Ah, so if you require approval there that might be the issue.

#

I think there's an option to request approval in the ••• button?

#

On the right, next to Active

forest needle
#

It's custom rules in the 3 dots button

worthy crescent
#

Ah, hang on...

forest needle
#

if you need, my account ID is acct_16CvvlKZwi6wapvm (+ test Mode)

worthy crescent
forest needle
#

Oh will try

worthy crescent
#

Let me know if that makes any difference or not. If so I'll add a comment to that GitHub issue.

forest needle
#

yay, it works!

worthy crescent
#

Awesome!

forest needle
worthy crescent
#

I'll flag that internally and have someone comment on that GitHub issue.

forest needle
#

Well not sure what should I do after this haha buuuut one step forward

worthy crescent
forest needle
#

Ok thanks seems to help, will continue tomorrow, it's late here šŸ™‚ Can I leave this discord open with you or it's better to close?

worthy crescent
#

We close idle threads after a bit, but you can always use the buttons in #help to get more help if you have other questions!

forest needle
#

Ok, thanks a lot for your help!

worthy crescent
#

Happy to help!

umbral spadeBOT