I am using Apple Pay JS. I created Apple Pay feature for my website and it has been working great in Safari browser in iOS devices but stopped working after updating the iOS to the latest version, iOS13.
The issue is that the Apple Pay sheet no longer appears on iOS13. I do not see any errors in the logs. It starts the Apple Pay session but does not call the onvalidatemerchant and anything post that.
On button click of Apple Pay I have the following method
function makePayment()
{
var applePayRequest = sampleRequest;
var applePaySession = new ApplePaySession(1, applePayRequest)
applePaySession.onvalidatemerchant = function(event) {
log('validate merchant called');
// api service call with event.validationUrl to get the session data
};
applePaySession.onPaymentAuthorized = function(event) {
log('on payment authorized called');
// get payment token and call api service with details for
// payment processing
};
log('begin Apple Pay session');
applePaySession.begin();
log('Apple Pay session called');
}
The following logs get printed 'begin Apple Pay session' 'Apple Pay session called'
Which means the onvalidatemerchant is not even called. On an iOS 12 device, I would additionally get a log for 'validate merchant called' as well.
Any suggestions?