提交 4e40c209 编写于 作者: DCloud_iOS_WZT's avatar DCloud_iOS_WZT

update app-payment-stripe.md

上级 86c39e5e
......@@ -31,7 +31,8 @@ uni.request({
var publishKey = res.data.publishableKey;
var paymentIntent = res.data.paymentIntent;
var customer = res.data.customer;
var ephemeralKey = res.data.ephemeralKey;
var ephemeralKey = res.data.ephemeralKey;
var billingDetails = res.data.billingDetails,
}
});
```
......@@ -55,7 +56,8 @@ Object对象类型
| isAllowDelay | String | 否 | 是否支持延迟支付,默认不支持(将 isAllowDelay 设置为 true 后可使用一些较慢的支付方式,例如 SEPA 借记和 Sofort 对于这些支付方式,只有当 PaymentSheet 完成后才能知道最终的付款状态是成功还是失败。如果您允许这样,则通知客户您已确认他们的订单,但收到付款后才能履行(例如,发货)订单。) |
| merchantName | String | 是 | 商户名称 |
| paymentIntent | String | 是 | Stripe的[PaymentIntent](https://stripe.com/docs/api/payment_intents)对象,对应服务器生成的支付订单 |
| publishKey | String | 是 | 公钥,在Stripe注册账号后可获取 |
| publishKey | String | 是 | 公钥,在Stripe注册账号后可获取 |
| billingDetails | Object | 否 | 银行卡账单信息(包含姓名、手机号码、邮箱地址、账单地址等)|
> 注意:customer与ephemeralKey必须成对出现,只传其一无效
......@@ -70,7 +72,20 @@ var orderInfo = {
"isAllowDelay": true, //是否支持延迟支付 默认false
"merchantName": "DCloud", //商户名
"paymentIntent": "Stripe的PaymentIntent", //订单信息
"publishKey": "Public Key", //公钥
"publishKey": "Public Key", //公钥
"billingDetails":{ //账单信息(可选)
"name":"",
"email":"",
"phone":"",
"address":{
"city":"",
"country":"CN",//国家代码(ISO 3166-1 alpha-2)
"line1":"",
"line2":"",
"postalCode":"",
"state":""
}
}
};
// 从Stripe测试服务器获取订单数据
uni.request({
......@@ -83,7 +98,8 @@ uni.request({
"isAllowDelay": true,
"merchantName": "DCloud",
"paymentIntent": res.data.paymentIntent,
"publishKey": res.data.publishableKey,
"publishKey": res.data.publishableKey,
"billingDetails": res.data.billingDetails
};
}
});
......@@ -117,7 +133,20 @@ var orderInfo = {
"isAllowDelay": true, //是否支持延迟支付 默认false
"merchantName": "DCloud", //商户名
"paymentIntent": "Stripe的PaymentIntent", //订单信息
"publishKey": "Public Key", //公钥
"publishKey": "Public Key", //公钥
"billingDetails":{ //账单信息(可选)
"name":"",
"email":"",
"phone":"",
"address":{
"city":"",
"country":"CN",//国家代码(ISO 3166-1 alpha-2)
"line1":"",
"line2":"",
"postalCode":"",
"state":""
}
}
};
//获取支付渠道
var stripeSev = null;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册