未验证 提交 ae950455 编写于 作者: DCloud_iOS_WZT's avatar DCloud_iOS_WZT 提交者: Gitee

update docs/app-payment-stripe.md.

上级 2a09a132
### 开通
- [登录Stripe](https://dashboard.stripe.com/login)注册账号
* 注册账号后可获取开发测试的API密钥(公钥、私钥),注意:需[激活账户](https://dashboard.stripe.com/account/onboarding)获取正式的API密钥
### 开通
- [登录Stripe](https://dashboard.stripe.com/login)注册账号
* 注册账号后可获取开发测试的API密钥(公钥、私钥),注意:需[激活账户](https://dashboard.stripe.com/account/onboarding)获取正式的API密钥
* 设置[支付方式](https://dashboard.stripe.com/settings/payment_methods)
更多信息详见[申请开通Stripe操作指南](https://uniapp.dcloud.io/app-payment-stripe-open)
更多信息详见[申请开通Stripe操作指南](https://uniapp.dcloud.io/app-payment-stripe-open)
环境:iOS13.0+
### 配置
......@@ -13,10 +15,12 @@
**参数说明**
- returnURL
Android平台使用,格式为"your-app://stripe"(示例 io.dcloud.test://stripe),'your-app'为应用的bundle id或其它自定义scheme,参考:[配置一个自定义页面内跳转协议 (URL Scheme)](https://ask.dcloud.net.cn/article/64)
### 服务器生成订单
### 服务器生成订单
在 App 端调用支付前,需在业务服务器生成[PaymentIntent](https://stripe.com/docs/api/payment_intents),详情可参考Stripe官方文档:[Add an endpoint](https://stripe.com/docs/payments/accept-a-payment?platform=android&ui=payment-sheet#add-server-endpoint)
激活账户前可通过POST请求Stripe官方沙盒服务器[https://stripe.com/docs/payments/accept-a-payment](https://stripe.com/docs/payments/accept-a-payment),生成测试PaymentIntent,示例如下:
激活账户前可通过POST请求Stripe官方沙盒服务器[https://stripe.com/docs/payments/accept-a-payment](https://stripe.com/docs/payments/accept-a-payment),生成测试PaymentIntent,示例如下:
``` js
uni.request({
......@@ -30,9 +34,9 @@ uni.request({
var ephemeralKey = res.data.ephemeralKey;
}
});
```
```
### 应用内发起支付
- uni-app项目
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册