如何检查 Apple 兼容设备
How to check Apple compatible devices
我有一种付款方式 Apple Pay,它仅限于 Apple 兼容设备。如果只有 Apple 兼容设备,我需要显示 Apple Pay 按钮。
如何使用 javascript 在结帐 html 页面中查看 Iphone、Ipad、Apple Watch 和 Mac 等 Apple 兼容设备?
您需要使用以下代码检查 Applepay 是否可用。 Link 详情 here
if (window.ApplePaySession) {
var merchantIdentifier = 'example.com.store';
var promise = ApplePaySession.canMakePaymentsWithActiveCard(merchantIdentifier);
promise.then(function (canMakePayments) {
if (canMakePayments)
// Display Apple Pay button here.
}); }
我有一种付款方式 Apple Pay,它仅限于 Apple 兼容设备。如果只有 Apple 兼容设备,我需要显示 Apple Pay 按钮。
如何使用 javascript 在结帐 html 页面中查看 Iphone、Ipad、Apple Watch 和 Mac 等 Apple 兼容设备?
您需要使用以下代码检查 Applepay 是否可用。 Link 详情 here
if (window.ApplePaySession) {
var merchantIdentifier = 'example.com.store';
var promise = ApplePaySession.canMakePaymentsWithActiveCard(merchantIdentifier);
promise.then(function (canMakePayments) {
if (canMakePayments)
// Display Apple Pay button here.
}); }