ApplePay canMakePaymentsWithActiveCard Promise returns false

2.8k Views Asked by At

ApplePay canMakePaymentsWithActiveCard Promise returns false on a Mac Safari, but true on iPhone Safari. canMakePayments returns true on both. I'm using a sandbox Apple developer account with test credit cards that Apple provided. Any idea why canMakePaymentsWithActiveCard returns false on a Mac Safari?

if (window.ApplePaySession) {
    // I'm not posting actual merchantIdentifier due to security reasons
    var merchantIdentifier = 'my unique identifier';
    var promise = ApplePaySession.canMakePaymentsWithActiveCard(merchantIdentifier);
    promise.then(function (canMakePayments) {
        if (canMakePayments)
        // For some reason false on Mac Safari
    }); 
}
1

There are 1 best solutions below

1
On

For me the issue was that the test credit cards in the Wallet did not have the billing address set. It appears that billing address is required in order to be considered active and usable on the web, although I can find no documentation that indicates this.