#arjun258387_api

1 messages ยท Page 1 of 1 (latest)

elfin scarabBOT
#

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

๐Ÿ“ 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.

sudden escarp
#

pls help

glossy bay
#

Hello, can you show me your code for your confirmPayment call? It sounds like your call is either missing return_url or is passing it in the wrong place

sudden escarp
#

i want to redirect in success page when updateorder.php file response success full i do not redirect directly when i call stripe.confirmPayment this so i have modify mention below
const { error: paymentError } = await stripe.confirmPayment({
elements,
clientSecret: data.clientSecret,
redirect: "if_required", // Remove the return_url, only handle redirection after updateOrder.php call
});

#

i have follow
Collect payment details before creating an Intent
document

glossy bay
#

Thank you for the code. Yep looks like it is missing confirmParams and return_url, the doc that you mentioned has a solid demonstration of how to pass that param

    elements,
    clientSecret,
    confirmParams: {
      return_url: 'https://example.com/order/123/complete',
    },
  });```
https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=payment#submit-the-payment
#

If you add that to your code, that error should go away for the confirm call

sudden escarp
#

but i want to redirect when my updateOrder.php api call successfully so i can not pass return_url than what i do??

glossy bay