Apple pay payment not completed

Hi,

We have encountered an issue in completing the Apple pay integration to a website developed. We see that " Payment not completed" message is displayed when we try to complete the process with sandbox account. The code was debuged and identify that the apple pay session method is not executed. Pasting the code for your reference. Please go through it and any help is highly appreciated.




session.onpaymentauthorized = function (event) {


logit('starting session.onpaymentauthorized');

logit('NB: This is the first stage when you get the *full shipping address* of the customer, in the event.payment.shippingContact object');

logit(event);


var promise = sendPaymentToken(event.payment.token);

promise.then(function (success) {

var status;

if (success){

status = ApplePaySession.STATUS_SUCCESS;

document.getElementById("applePay").style.display = "none";

//document.getElementById("success").style.display = "block";

alert("Your Payment Is Successfully Completed");

} else {

status = ApplePaySession.STATUS_FAILURE;

alert("Your Payment Is Failed");

}

logit( "result of sendPaymentToken() function = " + success );

session.completePayment(status);

});

}




Posted on Jan 31, 2019 5:32 AM

Reply
1 reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Apple pay payment not completed

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.