Working on a website that has been integrated with Apple Pay for about a year now with no issues. We are noticing that we are always getting an error now for iOS 13 devices only. iOS 12 and under all work as expected.
Front end click handler:
<div class="btn btn-apple">
<div class="apple-pay-button apple-pay-button-white" lang="en" data-bind="click: intializeApplePaySession"></div>
</div>
JS click handler:
self.intializeApplePaySession = function() {
new RestClient(RestClient.POST, "/rest/model/someController", {},
//Success
function(data, textStatus, jqXHR) {
var session = new ApplePaySession(3,data.applePayPaymentRequest);
initializeCallbacks(session);
session.begin();
},
...
"Must create a new ApplePaySession from a user gesture handler." is always thrown at
var session = new ApplePaySession(3,data.applePayPaymentRequest);
for all iOS 13 devices. iOS 12 and below work fine with the same code.
From my debugging I can see that the event being handled is a MouseEvent which makes sense to me. Any ideas as to why this is being thrown?