#josh-unger_unexpected

1 messages ยท Page 1 of 1 (latest)

vestal flareBOT
#

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

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

waxen mural
#

Hey Hanzo we already return early:

#
        logPurchaseFailed({ error_code: submitResult.error.message, failure_type: 'submit returned an error without a message' });
        return;
      }

      if (!selectedPaymentMethod) {
        logError(new Error('no payment method selected'));
        logPurchaseFailed({ error_code: 'no payment method selected' });
        return;
      }```
sick shadow
#

What is submitResult?

waxen mural
#

const submitResult = await elementsRef.current.submit();

#

And const { selectedPaymentMethod } = submitResult;

#

Yeah would be awesome to have better logging from Stripe.js.

sick shadow
#

Do you have an example confirmation request where the log said no payment method was selected but the request succeeded?

#

I'm not sure we'll have complete logs for this but I can try look

vestal flareBOT
waxen mural
#

Yeah, but this is in production logs. We need a way to dump debug info from stripe. I can't see the confirmation request in our logs since its going through Stripe.

proud dragon
#

Hello, I'm taking over for hanzo who had to step away. Please give me a few minutes to catch up ๐Ÿ™‚

waxen mural
#

Thanks for the help! I'm in and out but will check back soon.

proud dragon
#

My apologies for the delay! I was juggling a few other threads.

proud dragon
#

To recap my understanding:

  • You're calling elements.submit() and the Promise resolves to null instead of an object with either selectedPaymentMethod or error fields
  • This is happening inconsistently

Is that correct?

vestal flareBOT
waxen mural
#

Since we destructed submitResult it would be an empty object right?

#

And yup! Maybe we could put in a feature request to add a debug field or something?

rocky steeple
#

sorry catching up on the thread now, trying to take all the context in but apologies in advance if i re-ask anything