#jason889_code

1 messages ¡ Page 1 of 1 (latest)

left hamletBOT
#

👋 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/1265574078559813757

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

gaunt pebble
#

handle_next_action and confirmPayment are 2 different method. Sorry I am a bit confused by your question but which one are you going to use here?

#

Let's focus on 1 method

lapis mulch
#

Hello, yes let's focus on the confirmPayment

gaunt pebble
#

Okie, could you elaborate about promise based vs. query param? The confirmPayment should be returning a Promise

lapis mulch
#

yeah so in the return URL we can retrieve the payment_intent and the pi client secret so these are the query parameters, I would like to know if there are another way to do it ? In Stripe, it mentioned that is not recommended to expose the client secret in the URL. So I would like to know what is the best practices for that ?

gaunt pebble
#

Ah I think it's still a normal scenario. You need something to query the PI status and client_secret was exposed to frontend anyway, in the step before where you get it from backend

left hamletBOT
lapis mulch
#

great! Is there any other documentation about what query params can be returned ?

flat sun
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

lapis mulch
#

Hi ! yes no problem!

flat sun
#

What are you trying to achieve actually, on high-level?

lapis mulch
#

I'm trying different approach so to confirm the payment on the client side and on the server side

#

I would like to know if there is some examples of keeping the flow of control with the same page with the promise call rather than the redirection

flat sun
#

Some payment method types will always require you to redirect, so no

#

But on the other hand, you will always be able to force redirection.

lapis mulch
flat sun
#

3DS is only handled inside of Stripe dialog, without redirection. As far as I know.

#

You might be redirected after it's completed.

lapis mulch
#

so the redirect in that case it's only for the payment method other than cards ?

flat sun
#

Yes

left hamletBOT