Hello. I try to set ApplePay button on my saite, my code is:
const paymentRequest = {
total: {
label: 'merchant.MyTest',
amount: 1
},
countryCode: 'UA',
currencyCode: 'UAH',
merchantCapabilities: ['supports3DS', 'supportsEMV', 'supportsCredit', 'supportsDebit'],
supportedNetworks: ['masterCard', 'visa']
};
const applePaySession = new window.ApplePaySession(3, paymentRequest);
applePaySession.begin();
applePaySession.onvalidatemerchant = (event) => {
let promise = performValidation(event.validationURL);
promise.then(function (merchantSession) {
document.getElementById("logs").innerHTML = JSON.stringify(merchantSession);
applePaySession.completeMerchantValidation(merchantSession);
}).catch((error) => alert(error));
And when I click on ApplePay button I get an error:
How you can saw on screenshot I get ApplePay session.
I found some info, that firs it's need to add test email to sandbox and then add test-card, but when I make login by Appleid from sandbox and add test card, I get next error:
Please, help: how to correct add ApplePay to my site and get payment token? Thanks!