#daniyal_11692

1 messages · Page 1 of 1 (latest)

cerulean tendonBOT
#

Hello! We'll be with you shortly. 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.

nocturne moth
#

the modal is appearing and you can pay by GooglePay? Where do you see the error message?

lilac nacelle
#

in the console

#

in the response of confirmSetup call

nocturne moth
#

Can you still pay and finish the transaction?

lilac nacelle
#

checking

#

i've shared the screencast

nocturne moth
#

Thanks. How about those errors on PaymentInformation.tsx? I believe errors can also prevent the method to work properly

lilac nacelle
#

yes, if you notice on the first transaction there is an error but when i try second time error does not show

nocturne moth
#

yeah but there are also other errors

#

How about those?

lilac nacelle
#

An unexpected error has occurred. Please try again later. [OR-IBIDL-01]

#

this is the error that appears on the first transaction

nocturne moth
#

Yeah I see that, just asking the other 3 red errors "SyntaxError" or "TypeError" there

lilac nacelle
#

i've commented these lines

nocturne moth
#

And can you share the SetupIntent Id here?

lilac nacelle
#

let me share

#

seti_xxxx ?

#

this one?

lilac nacelle
#

?

nocturne moth
#

Yes!

lilac nacelle
#

seti_1OMntqAAKdQR3wItJhvZlDHW_secret_PBAE9H1cKZ6xHxknkFNnxIfsm5Le7gz

#

if you could pls take a look at this screencast

#

^

#

this will explain everything

nocturne moth
#

Hmm okie I can see it succeeded without errors

lilac nacelle
#

it succeeds in the second attempt as shown in the video

nocturne moth
#

Have you commented out the TypeError and SyntaxErrors?

lilac nacelle
#

yes, pls have a look at the screncaast

nocturne moth
#

Still see SyntaxErrors there

lilac nacelle
#

these are not from my code

#

pls ignore these

#

i'm 100% sure these are not linked.

nocturne moth
#

Yeah but to narrow down the issue, it's best to exclude anything possibly prevent the transaction

#

Btw can you share your URL here? We can try on our side

lilac nacelle
#

its on my local env

#

it fails for the first time and succeeds in the next

#

async function confirmPaymentSetup() {

    elements.submit();

    await stripe.confirmSetup({
        elements,
        clientSecret,
        redirect: 'if_required'
    }).then(function (result) {
        console.log(result);
        doPost({ loading: true });
        if (result.error) {
            doPost({ loading: false, error: true, message: result.error.message });
        } else {
            doPost({ loading: false, error: false, message: authorizedText, response: result });
        }
    })
}
#

this is my conndirm setup function

nocturne moth
#

Yeah looks correct at first glance

#

You can use some easy hosting service and share the URL with us. We can try to reproduce

#

Please make sure to comment out the SyntaxErrors to narrow down the issue

lilac nacelle
#

can you see from the setup intent id that when it fails for the first time what error it say?

#

seti_1OMoFwAAKdQR3wItzDZQkkTx_secret_PBAbssbsAqBdE26nsctYZ2juzynq3IU

nocturne moth
lilac nacelle
#

i found something

cerulean tendonBOT
lilac nacelle
#

if you see the video when i click on place order for the first time my whole code is executed of confirmPaymentSetup method including .then block but on the second time when i click place order excluding the the .then block code is executed and .then code block executes when i click Pay on GPay modal

fallow gulch
#

👋 taking over for my colleague. Let me catch up.

lilac nacelle
#

?

fallow gulch
#

I'm terribly sorry, I lost track, discord was super busy this morning

#

I'm with you give me a second to read through the conversation

#

@lilac nacelle where are you located?

lilac nacelle
#

pakistan

fallow gulch
#

I think the problem is with your HTTPS, because it's self-signed

lilac nacelle
#

but it wprks in the second attempt

fallow gulch
#

yes this is really odd.

#

Would you mind hosting your code somewhere and share a URL where we can reproduce?

lilac nacelle
#

let me see

#

is there anything extra i need to do for Gpay in payment elemnt?

fallow gulch
#

no not really, this is why we need to investigate and try to replicate this

lilac nacelle
#

ok. can you just have a look at this and see it looks ok? async function confirmPaymentSetup() {
if(paymentMethod != 'google_pay'){
var button = document.getElementById('submit');
button.innerText = pleaseWaitText;
button.disabled = true;
}

    elements.submit();
    await stripe.confirmSetup({
        elements,
        clientSecret,
        redirect: 'if_required'
    }).then(function (result) {
        doPost({ loading: true });
        if (result.error) {
            button.innerText = buttonText;
            button.disabled = false;
            doPost({ loading: false, error: true, message: result.error.message });
        } else {
            doPost({ loading: false, error: false, message: authorizedText, response: result });
        }
    })
}
cerulean tendonBOT
subtle ferry
#

hi! I'm taking over this thread.