#andrey-g_code

1 messages ยท Page 1 of 1 (latest)

modest waveBOT
#

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

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

buoyant abyss
#

hello! gimme a second to take a look

sly ravine
#

Unfortunately it has to be done server-side with our workflow.

buoyant abyss
sly ravine
#

Yeah, I don't have any issues with the general workflow of confirming it on the server side.
My issue is handling 3DS verification specifically.

buoyant abyss
#

actually, can you share an existing PaymentIntent so that I can see how your current integration works?

sly ravine
#

sure, give me a sec

#

pi_3Py5iyPS6Yov8qfQ1iwNx5PO

buoyant abyss
#

that looks like it's a test mode payment, do you have one from your live mode account which I can look at?

sly ravine
#

good news....i got it working from that link ๐Ÿ™‚

#

i do, but the live mode account is currently only using card elements

buoyant abyss
#

oh lol, it's great that it's working then! I originally wanted to see how your livemode account was using card elements so that I can better understand your existing integration

sly ravine
#

switching from stripe.handleCardAction(clientSecret) to stripe.handleNextAction({ clientSecret }) did the trick

#

thanks for pointing me in the right direction!

sly ravine
#

well crap, seems like that was only half-right:

handleNextAction actually goes through with the confirmation, something that handleCardAction does not do

buoyant abyss
#

i think what you want is confirmation_method="manual" , but let me quickly test this to see

sly ravine
#

from what I can tell that is actually exactly what, but confirmation_method seems to be incompatible with automatic_payment_methods - and without THAT setting 3DS seems to want to redirect me rather than opening up the modal

buoyant abyss
#

onesec, lets take a step back, you mentioned handleNextAction actually goes through with the confirmation - so is this expected behaviour?

#

and the problem now is that you don't want 3DS to redirect?

sly ravine
#

originally it was using handleCardAction - it brings up the 3DS challenge without redirect, and leaves the confirmation to the server
after trying handleNextAction - this also brings up the 3DS challenge without a redirect, but ends up confirming the payment intent

going back to attempting handleCardAction with confirmation_method="manual":
this is something I tried before - it required removing automatic_payment_methods because of the following error: "You may only specify one of these parameters: automatic_payment_methods, confirmation_method."
doing THAT then resulted in the 3DS workflow resulting in attempting to redirect

buoyant abyss
#

ah i see. The flow you originally used was likely handleCardAction with confirmation_method="manual" with the card element is that right?

sly ravine
buoyant abyss
#

ah yeah, it's pretty unfortunate but that exact same flow isn't possible with the Payment Element for various reason (as you've already noticed). I would really just aim to migrate to how Payment Element currently works

I think the closest to your current flow if you really want to do something similar, would be auth and capture : https://docs.stripe.com/payments/place-a-hold-on-a-payment-method - whereby after the 3DS completes, your backend would need to capture the payment. However, you would still need to update the backend handling on your end since it's a different flow

Separate payment authorization and capture to create a charge now, but capture funds later.

sly ravine
#

That's unfortunate. I'll look into that, thanks.
Not opposed to updating the backend to get it working, the important thing is to maintain the current confirmation workflow & functionality.