Posts

Post not yet marked as solved
0 Replies
266 Views
On the payment screen of my website, I executed the canMakePayments method to check if the user has an ApplePay-enabled device. The process worked fine, but when I executed the window.webkit.messageHandlers.xxxx.postMessage method in JS to do the following, the process stopped. window.webkit.messageHandlers.***.postMessage is it not possible to use it when using ApplePayJS? Or is there some problem such as a restriction on the JS window object?
Posted Last updated
.
Post marked as solved
2 Replies
260 Views
I have implemented a website that makes payments with Apple Pay on the web. After new Payment Session Created, ApplePayJS Executes ApplePaySession. begin(); But I only executed it once, The Error Occurs like Below  InvalidAccessError:there is already has an active payment session Test Info I had created Apple Pay merchant ID and certificates, and verify your domain and set up server for secure communications with Apple Pay. Apple Pay JS Version is 11 I have been using Sandbox account (Visa, Mastercard), iOS 14.6, and iphone8 Here's my code const version = 11; const paymentRequest = { countryCode: "JP", currencyCode: "JPY", supportedNetworks: supportedNetworks, merchantCapabilities: ["supports3DS",], total: { label: label, type: type, amount: amount } , applicationData: applicationData }; applePaySession = new ApplePaySession(version, paymentRequest); applePaySession.onvalidatemerchant = function (event) { const reqParam = { validationUrl: event.validationURL}; applePaySession.completeMerchantValidation(data.merchantSession); applePaySession.onpaymentauthorized = function (event) { const paymentDataStr = JSON.stringify(event.payment.token.paymentData); const paymentToken = common_base64_encode(paymentDataStr); inJsonObj.applePayToken = paymentToken; applePaySession.begin();
Posted Last updated
.