diff --git a/docs/api/request-payment.md b/docs/api/request-payment.md index d2bbf84f0719cfc6959716791ed8ef7deac584c4..a79979950f2b16c138f299c46e6919f77dc03db0 100644 --- a/docs/api/request-payment.md +++ b/docs/api/request-payment.md @@ -8,17 +8,21 @@ - 支付宝
App 支付请求参数字符串,主要包含商家的订单信息,key=value 形式,以 & 连接。示例 - `app_id=2015052600090779&biz_content=%7B%22timeout_express%22%3A%2230m%22%2C%22seller_id%22%3A%22%22%2C%22product_code% + ```app_id=2015052600090779&biz_content=%7B%22timeout_express%22%3A%2230m%22%2C%22seller_id%22%3A%22%22%2C%22product_code% 22%3A%22QUICK_MSECURITY_PAY%22%2C%22total_amount%22%3A%220.02%22%2C%22subject%22%3A%221%22%2C%22body%22%3A%22%E6%88% 91%E6%98%AF%E6%B5%8B%E8%AF%95%E6%95%B0%E6%8D%AE%22 %2C%22out_trade_no%22%3A%22314VYGIAGG7ZOYY%22%7D&charset=utf-8&method=alipay.trade.app.pay&sign_type=R SA2×tamp=2016-08-15%2012%3A12%3A15&version=1.0&sign=MsbylYkCzlfYLy9PeRwUUIg9nZPeN9SfXPNavUCroGKR5Kqvx0nEnd3eRmKxJuthNUx4ERCXe552 EV9PfwexqW%2B1wbKOdYtDIb4%2B7PL3Pc94RZL0zKaWcaY3tSL89%2FuAVUsQuFqEJd - hIukuKygrXucvejOUgTCfoUdwTi7z%2BZzQ%3D`
+ hIukuKygrXucvejOUgTCfoUdwTi7z%2BZzQ%3D
+ ``` [更多详情参考[支付宝官方文档](https://opendocs.alipay.com/open/204/105296?pathHash=22ed0058&ref=api)] - 微信
App 支付请求参数字符串。示例 -{"appid":"wxd569c7238830733b","noncestr":"6N47VnR42bqIm4xq","package":"Sign=WXPay","partnerid":"1230636401","prepayid":"wx26174750316675ac54b89c224eb3250000","timestamp":1711446470,"sign":"EE987459B9CFF6462462147130110D31"} + ``` + {"appid":"wxd569c7238830733b","noncestr":"6N47VnR42bqIm4xq","package":"Sign=WXPay","partnerid":"1230636401" + ,"prepayid":"wx26174750316675ac54b89c224eb3250000","timestamp":1711446470,"sign":"EE987459B9CFF6462462147130110D31"} + ``` [更多详情参考[微信官方文档]( https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=9_1)] @@ -45,7 +49,12 @@ 注意: - App平台开发支付宝支付,无需自定义基座,真机运行可直接开发 -- 可通过Wxpay.isInstalled()方法判断微信是否安装 +- 可通过编写uts插件判断微信是否安装,如android中可通过引入微信自带的api进行判断
+``` + import WXAPIFactory from 'com.tencent.mm.opensdk.openapi.WXAPIFactory'; + let api = WXAPIFactory.createWXAPI(UTSAndroid.getTopPageActivity(), ''); + api!.isWXAppInstalled() +``` - 需要在根目录的manifest.json文件中,对所使用的支付进行配置如 ```json app: { @@ -60,7 +69,7 @@ app: { } ``` -[更多详情参考[模块配置](https://doc.dcloud.net.cn/uni-app-x/collocation/manifest-modules.html)] +[更多详情参考[模块配置](https://doc.dcloud.net.cn/uni-app-x/collocation/manifest-modules.html#uni-payment)] - app-android平台微信支付需要4.11及以上版本