#pkcdeepu-custom-validation

1 messages · Page 1 of 1 (latest)

untold flame
#

you can listen to paymentmethod event [0] and check the paymentMethod details which contains the billing details like name, email etc [1] which you can use for the validation.

[0] https://stripe.com/docs/js/payment_request/events/on_paymentmethod
[1] https://stripe.com/docs/api/payment_methods/object?lang=go#payment_method_object-billing_details

#

that's how you can do the validation

#

but make sure you call complete function to close the Google Payment sheet before you call the update

paymentRequest.on('paymentmethod', function(ev) { 
.....
ev.complete('fail'); 
...
// update 
})

mental pecan
#

how to close google, apple pay popup using javascript

untold flame
#

ev.complete('fail');

mental pecan
#

How to disable apple pay google pay button once user clicked on buttone

untold flame
#

you can probably use document.getElementById("Button").disabled = true;

#

button is the id of your applepay google pay button

mental pecan
#

it's Iframe and there is only class dont have ID in button

#

<button class="PaymentRequestButton PaymentRequestButton--dark whole-pixel-border baseline-offset" type="submit"> it's under iFrame