#salimgt

1 messages · Page 1 of 1 (latest)

broken iceBOT
boreal fox
#

Hello! Not sure I understand, can you provide more specific details? What specific thing are you stuck on?

spare beacon
#

how to make google pay button register user before open gpay popup?

#

now i see when i click on it, i see google pay popup

#

i want to do some actions before showing google pay popup

boreal fox
#

What actions?

#

Like you want to run code when that button is clicked before showing the payment sheet?

#

Is that the Payment Request Button?

spare beacon
#

yes
yes

boreal fox
spare beacon
#

ok great, how to keep same button styles?

boreal fox
#

That's something you would need to handle on your end since you wouldn't be using the Payment Request Button anymore.

#

Can you tell me more about what you want to do though?

#

It's somewhat unusual to run code when the button is clicked before the payment sheet is displayed.

#

What code do you want to run there?

spare beacon
boreal fox
#

What if you didn't display the button, or didn't make it active, until that step was complete?

spare beacon
#

hmmm yeah possible, but i prefer all in same page

#

i will stop using Payment Request Button

#

can you suggest something for the style?

#

i need a copy of your style

boreal fox
#

It depends on what you want. The Payment Request Button is designed to show the Apple Pay button in Safari and the Google Pay button in Chrome, and the Link button when those aren't available. If you want those same things to happen with your custom button you would need to handle all of that on your end.

#

To clarify, I do not recommend this approach at all.

#

You should use the Payment Request Button.

#

I think there are other ways to solve this issue that don't involve running custom code when the button is clicked.

#

I recommend only showing the Payment Request Button when you're ready for people to click on it.