#andrey-g_code
1 messages ยท Page 1 of 1 (latest)
๐ 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.
hello! gimme a second to take a look
hello! Typically, are you alright with confirming the payment on client-side instead? If yes, then you can just use confirmPayment : https://docs.stripe.com/js/payment_intents/confirm_payment on the frontend
Unfortunately it has to be done server-side with our workflow.
if you want to confirm the PaymentIntent server-side, this is the guide you can follow : https://docs.stripe.com/payments/finalize-payments-on-the-server
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.
this is the bit : https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=web&type=payment#next-actions
actually, can you share an existing PaymentIntent so that I can see how your current integration works?
that looks like it's a test mode payment, do you have one from your live mode account which I can look at?
good news....i got it working from that link ๐
i do, but the live mode account is currently only using card elements
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
switching from stripe.handleCardAction(clientSecret) to stripe.handleNextAction({ clientSecret }) did the trick
thanks for pointing me in the right direction!
well crap, seems like that was only half-right:
handleNextAction actually goes through with the confirmation, something that handleCardAction does not do
i think what you want is confirmation_method="manual" , but let me quickly test this to see
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
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?
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
ah i see. The flow you originally used was likely handleCardAction with confirmation_method="manual" with the card element is that right?
yep, this: https://docs.stripe.com/payments/accept-a-payment-synchronously?platform=web#web-handle-next-actions
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
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.