ApplePay API接入流程备份
对接流程
1. Apple Pay 证书
https://网站域名/.well-known/apple-developer-merchantid-domain-association.txt
2. 前端
2.1 前端引入Apple Pay
2.1.1 在网站引入apple pay
<script src="https://applepay.cdn-apple.com/jsapi/v1.1.0/apple-pay-sdk.js"></script>
2.1.2 渲染Apple Pay button
if (window.ApplePaySession) {
var merchantIdentifier = 'YOUR MERCHANT IDENTIFIER';
var promise = ApplePaySession.canMakePaymentsWithActiveCard(merchantIdentifier);
promise.then(function (canMakePayments) {
if (canMakePayments)
// Display Apple Pay button here.
}); }
环境 | 值 |
---|---|
sandbox | merchant.com.sandbox.useepay |
prod | merchant.com.gateway.useepay |
一.获取ApplePay验证文件
https://checkou.useepay.com/.well-known/apple-developer-merchantid-domain-association.txt
完成后联系UseePay的工作人员,进行网站的绑定。