#Svatex-paymentrequestbutton
1 messages · Page 1 of 1 (latest)
Hi there!
So if I understand correctly you are loading the PaymentRequestButton on your page, and you would like, in some cases, to not show the payment popup when they click on the button?
Exactly
Got it! In that case one option is to make your own button as mentioned here: https://stripe.com/docs/stripe-js/elements/payment-request-button?html-or-react=html#html-js-own-button
So your could be listening to click events on that button, and based on your own logic you decide if you want to show the popup by calling paymentRequest.show() or not.
Oh awesome, completely miss this option! Thanks
FYI here's an example of how this works: https://jsfiddle.net/v7wL7pbu/
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!