#vadim_ece-confirm-delay
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/1394331999493296363
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
When you say timeout errors, where exactly are you seeing that?
Is the API returning the timeout or something else?
Can you provide more details like the example request ID, the exact error message, screenshots and/or a site where I can try to reproduce this?
it is happening in the wallet dialog
it is also happening in live environment unlike the small red text in the image above
I can provide a link to reproduce but unfortunately its a wizard with few steps and authentication (no user needed, simple email verification) to get to the final checkout page
If you look at your network console, what request seem to be failing?
If you try to pay with the demo here - https://docs.stripe.com/elements/express-checkout-element does that timeout?
seems no timeout, the dialog simply closed
Gotcha. Can you share the exact code you're using for Express Checkout Element integration?
have a video recording in my drive too https://drive.google.com/file/d/1zqVadCkGKakKeSjwiCld2gcTvFyAEsQp/view?usp=drive_link
this is the Elements component
Are you calling any APIs in between clicking "Pay now" and elements.submit() ?
let me check
What does your expressCheckoutElement.on('confirm', async (event) => { ... } look like?
Why do you have a prevent default here?
Are you calling the same function from the two separate Stripe Elements?
That function doesn't serve any purpose when you're working with Express Checkout Element.
Can you create a separate handler for expressCheckoutElement.on('confirm', async (event) => { ... }
Something like
expressCheckoutElement.on('confirm', async (event) => {
const {error: submitError} = await elements.submit();
if (submitError) {
handleError(submitError);
return;
}
const {error, paymentMethod} = await stripe.createPaymentMethod({
elements
});
if (error) {
// This point is only reached if there's an immediate error when
// confirming the payment. Show the error to your customer (for example, payment details incomplete)
handleError(error);
} else {
// The payment UI automatically closes with a success animation.
// Your customer is redirected to your `return_url`.
}
});
Im not sure, it was implemented a while ago and im trying to fix the issue we have now.
we are not calling the same function twice
the method above is the handler for the express checkout only
I can try but as it requires https it will take time to deploy a new env with the new code. ill do it now
That's alright. Can you simplify it the way I have it above and lmk if that changes anything?
yes, will deploy in a few min and update you once deployed
๐