#Aruljothi - apple pay

1 messages · Page 1 of 1 (latest)

thin beacon
#

hello @edgy river! how can i help?

edgy river
#

okay

#

if i am click apple pay button check form fields are filled and go to payment.

#

paymentRequest = stripe.paymentRequest({ country: 'US', currency: 'gbp', total: { label: 'Dhyanfoundation Donation', amount: amountval, }, requestPayerName: true, requestPayerEmail: true, });
var elements = stripe.elements();
var prButton = elements.create('paymentRequestButton', { paymentRequest: paymentRequest, });
// Check the availability of the Payment Request API first.
paymentRequest.canMakePayment().then(function(result) {
if (result) {
prButton.mount('#payment-request-button');
} else {
document.getElementById('payment-request-button').style.display = 'block';
}
});
paymentRequest.on('paymentmethod', function(ev) {

// Confirm the PaymentIntent without handling potential next actions (yet).

var customer_fname = document.getElementById("firstname").value;
var customer_lname = document.getElementById("lastname").value;
var emailaddress = document.getElementById("emailaddress").value;
var customer_name = customer_fname+" "+customer_lname;

#

}

#

ia m added like above

thin beacon
#

you would need to code the validation on your own, there should be resources available online for you to refer to on how to implement this