#daniyal_11692
1 messages · Page 1 of 1 (latest)
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.
- daniyal_11692, 33 minutes ago, 21 messages
- daniyal_11692, 3 hours ago, 5 messages
- daniyal_11692, 5 hours ago, 5 messages
- daniyal_11692, 6 hours ago, 23 messages
- daniyal_11692, 21 hours ago, 7 messages
Well do you have a live card in your Google Wallet?
Okay so from the video it looks like it only displays in Mobile mode on Chrome
Do you have a site you can share where I can reproduce this?
yes let me sharex
this is the link
and here's the screen cast to show how you can get to checkout screen
K thanks
Hmm I'm not able to reproduce what you are seeing.... Google Pay is not showing for me in either instance 🤔
gPay is showing like this?
how can i proceed with this?
to complete my payment thorugh Gpay
Yeah hold on let me look more for why it isn't showing for me
actually i'm asking that googlepay is is saying 'another step will appear ....'
how to proceed with Gpay?
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.
there's no additional form or something like that?
No just the google pay modal
this is the error it shows when i click submit button
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
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 });
}
})
}
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
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
You can listen for the change Event and inspect the value.type: https://stripe.com/docs/js/element/events/on_change?type=paymentElement#element_on_change-handler-value