ApplePay canMakePaymentsWithActiveCard Promise返回false。

问题描述 投票:5回答:1

苹实支付 canMakePaymentsWithActiveCard 在Mac Safari上,承诺返回false,但在iPhone Safari上返回true。canMakePayments 都返回true。我使用的是苹果提供的测试信用卡的沙盒苹果开发者账户。任何想法,为什么 canMakePaymentsWithActiveCard 在Mac Safari上返回false?

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
    }); 
}
javascript safari applepay applepayjs
1个回答
0
投票

对我来说,问题是钱包中的测试信用卡没有设置账单地址。 似乎账单地址是需要的,以便被认为是活跃的,可以在网络上使用,虽然我找不到任何文档表明这一点。

© www.soinside.com 2019 - 2024. All rights reserved.