#daniyal_11692

1 messages · Page 1 of 1 (latest)

desert depotBOT
#

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.

hardy comet
#

Hello

#

What is strange exactly?

worldly geode
#

it is not appearing consistently

#

sharing a video cast

hardy comet
#

Well do you have a live card in your Google Wallet?

worldly geode
#

yes.

#

pls see the video. this will explain everything

hardy comet
#

Okay so from the video it looks like it only displays in Mobile mode on Chrome

worldly geode
#

yes

#

but on physical mobile device it is also not showing

hardy comet
#

Do you have a site you can share where I can reproduce this?

hardy comet
#

Okay give me a moment to take a look

#

You aren't an Indian merchant, correct?

worldly geode
#

no

#

not indian

hardy comet
#

K thanks

#

Hmm I'm not able to reproduce what you are seeing.... Google Pay is not showing for me in either instance 🤔

worldly geode
#

gPay is showing like this?

#

how can i proceed with this?

#

to complete my payment thorugh Gpay

hardy comet
#

Yeah hold on let me look more for why it isn't showing for me

worldly geode
#

actually i'm asking that googlepay is is saying 'another step will appear ....'

#

how to proceed with Gpay?

hardy comet
#

That's normal. You just use your submit button like you would with Card and call confirmPayment or confirmSetup

#

That causes the Google payment sheet to appear.

worldly geode
#

there's no additional form or something like that?

hardy comet
#

No just the google pay modal

worldly geode
#

this is the error it shows when i click submit button

hardy comet
#

Ah okay that indicates that you are doing some async processing, like calling your backend, in your submit handler before you call confirmPayment().

#

This is a security limitation employed by Google

#

You have to show the payment modal ~immediately.

#

So you need to move any business logic you are performing outside of this submit handler and call confirmPayment() immediately on click

worldly geode
#

this is my method: async function confirmPaymentSetup() {
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 });
        }
    })
}
hardy comet
#

You should not have elements.submit() at all if you are not using the deferred-intent flow (which it doesn't look like you are)

#

So remove that

worldly geode
#

i get error when i remove elements.submit()

#

is there a way i can get to know the user has selected google pay as the method

#

so i can skip the other code and immediately call confirmSetup

hardy comet