Hi
i have implemented ApplePay using Applepay js version 3.
i am trying to show shipping address invalid error in applepay popup.
this is what i am doing in session.onshippingcontactselected = function(event) {
session.onshippingcontactselected = function(event) {
.....
var _ape = {
code: "shippingContactInvalid",
contactField: "locality",
message: "Postal coe is invalid"
};
var applePayErrors = [
_ape,
];
var ApplePayShippingContactUpdate= {
errors: applePayErrors,
newShippingMethods: newShippingMethods,
newLineItems: newLineItems,
newTotal: newTotal
};
session.completeShippingContactSelection(ApplePayShippingContactUpdate);
But this does not work properly apple pay does not show any errors.
Is this right syntax for adding errors property in ApplePayShippingContactUpdate
i am referering this link https://developer.apple.com/documentation/apple_pay_on_the_web/applepayshippingcontactupdate/2928614-errors