#ironbeard_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/1402723302358909070
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- ironbeard_code, 58 minutes ago, 22 messages
- ironbeard_api, 4 days ago, 32 messages
Hi, some payment method types require you to take an additional action like scanning a QR etc. to confirm the payment. That is what it's referring to.
Gotcha. But what I'm trying to figure out is:
someone clicks the button and I call stripe.confirmCardPayment() and... if it's successful..then what? do I need to make my own request to the "Done!" page?
Hi there ๐ jumping in as my teammate needs to step away.
It depends, since confirmCardPayment accepts the handleAction option that allows you to specify whether Stripe.js should try to handle customer action or not:
https://docs.stripe.com/js/payment_intents/confirm_card_payment#stripe_confirm_card_payment-options
I want stripe to handle additional actions that are necessary for the payment to process, I think that's a bit out of my wheelhouse. I was just hoping I could pass a URL that stripe would navigate to once everything was done
(or do I just do window.location = "/shop/checkout/done/"?)
Ah, yeah, not quite what the return_url is used for here, since card payments don't require a redirect (usually) to complete a payment.
The response to confirmCardPayment should indicate if the intent was successful. Is that not what you're seeing when testing with our 3DS test cards?
Oh, sure. I'm able to see and display errors etc, I just wasn't sure if I was responsible for redirecting or not. My intention is to call confirmCardPayment on a "Review your order" page with an existing Subscription payment intent client secret and existing payment method id, so I don't really have any data to POST back to my server after confirmCardPayment is successful (in order for the POST to redirect me to GET /shop/checkout/done). So I suppose I just do it with window.location ๐คทโโ๏ธ
Yeah, you'd do the redirect on your end. Probably await the response from confirmCardPayment, then inspect the response to see if result.paymentIntent is populated with an intent in a succeeded state, then redirect if so.
gotcha, thanks so much ๐