#vadim_ece-confirm-delay

1 messages ยท Page 1 of 1 (latest)

glossy leafBOT
#

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

rugged quarry
#

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?

azure pilot
#

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

rugged quarry
#

If you look at your network console, what request seem to be failing?

azure pilot
#

I dont actually see any requrest

#

seems to be something internal

rugged quarry
azure pilot
#

seems no timeout, the dialog simply closed

rugged quarry
#

Gotcha. Can you share the exact code you're using for Express Checkout Element integration?

azure pilot
#

this is the Elements component

rugged quarry
#

Are you calling any APIs in between clicking "Pay now" and elements.submit() ?

azure pilot
#

let me check

rugged quarry
#

What does your expressCheckoutElement.on('confirm', async (event) => { ... } look like?

azure pilot
#

nothing after pay now and the timeout error

rugged quarry
#

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`.
  }
});
azure pilot
#

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

rugged quarry
#

That's alright. Can you simplify it the way I have it above and lmk if that changes anything?

azure pilot
#

yes, will deploy in a few min and update you once deployed

rugged quarry
#

๐Ÿ‘

glossy leafBOT