I use Apple Pay Sandbox Account with Sandbox Credit Card to generate token with Apple Pay JS.
session.onpaymentauthorized = function (event) {
var token = JSON.stringify(event.payment.token);
But when I try to send this token to the provider,
"paymentData":
{
"version":"EC_v1",
"data":"VYZcdBkTfPmHnVd/....",
"signature":"MIAGCSqGSIb3DQEHA...",
"header":
{
"ephemeralPublicKey":"MFkwEwYHKoZ...",
"publicKeyHash":"yb+QUlF2y...",
"transactionId":"7db6...."
}
}
https://ap-gateway.mastercard.com/api/documentation/integrationGuidelines/supportedFeatures/pickPaymentMethod/devicePayments/ApplePay.html?locale=en_US
token.paymentData.data not passed the base64 validation.
Do I need to make any changes before sending this token to provider?