Hi,
if anyone can shed some light on this. I've managed to progress to the point where merchant validation is successful and the displayed Apple Pay sheet has the fingerprint reader available. In the previous beta when I validated the request it would simply display "Payment Not Successful", the sheet would remain and no call backs or any other debugging information would be provided. In this release I get the same message on the Apple Pay sheet but a modal dialog pops up saying:
"Apple Pay is Not Available For This Website"
Again no call backs are made or any other debugging information made available. All the certs in use check out and I've peformed the website validation required in the developer portal. I understand the reasoning behind not leaking too much information but it would be good if we had some call back:
applePaySession.onpaymentauthorized = function(event) {
var paymentRequest = {
// Build payment request from event payment tokens.
};
performPayment(paymentRequest).then(function(paymentResult) {
// For now choose STATUS_SUCCESS, should examine the response from backend in paymentResult.
applePaySession.completePayment(ApplePaySession.STATUS_SUCCESS);
}).catch(function(error) {
console.log(error);
});
};
Which is never called, but an event handler like `onpaymentfailed`. I guess the intention here is that if the payment fails to authorise at Apple's end no amount of back end shenanigans will change that and it's up to the user to dismiss the Apple Pay dialog and if necessary choose an alternate payment method.
Has anyone else got this far or further? What were your experiences?
Paul
Hi. Yeah. At this stage (apple haven't gone live with applepayjs yet) you'll only get a successful transaction flow if you use an iCloud sandpit account created in your apple developer settings, and in that sandpit account you attach dummy credit cards also provided by apple https://developer.apple.com/support/apple-pay-sandbox/ Loads of details also on my GitHub github.com/norfolkmustard/ApplePayJS