client/docs/wallet/payment.md

135 lines
3.5 KiB
Markdown
Raw Normal View History

2025-09-14 18:09:41 +08:00
# Payment
- [/wallet.Payment/Way](#walletpaymentway)
- [/wallet.Payment/Get](#walletpaymentget)
- [/wallet.Payment/ByOrder](#walletpaymentbyorder)
- [/wallet.Payment/ByCharge](#walletpaymentbycharge)
- [/wallet.Payment/Callback](#walletpaymentcallback)
## /wallet.Payment/Way
获取平台支持的支付网关
### Request
```javascript
{
platform: "", // type<string>, 平台
}
```
### Reply
```javascript
{
way: [{
ident: "", // type<string>, 支付通道标识
title: "", // type<string>, 支付通道标题
intro: "", // type<string>, 支付通道说明
args: "", // type<string>, 支付通道相关参数
}], // list<WayItem>, 支付通道列表
}
```
## /wallet.Payment/Get
获取支付的详情
### Request
```javascript
{
id: "0", // type<int64>, 唯一ID
identity: "", // type<string>, 唯一码
}
```
### Reply
```javascript
{
order_no: "", // type<string>, 订单号
trade_no: "", // type<string>, 第三方交易流水号
type: 0, // type<int32>, 类型:1充值;2支付电商订单
pay_channel: 0, // type<int32>, 支付模型WECHATALIPAY,BALANCE
pay_type: "", // type<string>, 支付类型 JSAPI:微信浏览器内支付 APP:app支付 MINI:小程序 NATIVE:Native支付,pc端生成二维码供用户扫码支付,QUICK_MSECURITY_PAY:app支付 QUICK_WAP_WAY:手机网站支付 FAST_INSTANT_TRADE_PAY:pc网站支付
amount: "0", // type<int64>, 充值金额 单位为分
args: "", // type<string>, 相关参数
status: 0, // type<int32>, 支付状态
}
```
## /wallet.Payment/ByOrder
支付-电商订单
### Request
```javascript
{
order_no: "", // type<string>, 订单号
pay_channel: 0, // type<int32>, 支付模型WECHATALIPAY,BALANCE
pay_type: "", // type<string>, 支付类型 JSAPI:微信浏览器内支付 APP:app支付 MINI:小程序 NATIVE:Native支付,pc端生成二维码供用户扫码支付,QUICK_MSECURITY_PAY:app支付 QUICK_WAP_WAY:手机网站支付 FAST_INSTANT_TRADE_PAY:pc网站支付
password: "", // type<string>, 支付密码
args: "", // type<string>, 相关参数
desc: "", // type<string>, 支付描述
open_id: "", // type<string>, 微信用户的OpenID
}
```
### Reply
```javascript
{
code: "0", // type<int64>
result: {
"": ""
}, // map<string,string>, 预支付返回
}
```
## /wallet.Payment/ByCharge
支付-充值
### Request
```javascript
{
amount: "0", // type<int64>, 充值金额 单位为分
remark: "", // type<string>, 备注
pay_channel: 0, // type<int32>, 支付模型WECHATALIPAY
pay_type: "", // type<string>, 支付类型 JSAPI:微信浏览器内支付 APP:app支付 MWEB:H5支付 NATIVE:Native支付,pc端生成二维码供用户扫码支付,QUICK_MSECURITY_PAY:app支付 QUICK_WAP_WAY:手机网站支付 FAST_INSTANT_TRADE_PAY:pc网站支付
desc: "", // type<string>, 支付描述
open_id: "", // type<string>, 微信用户的OpenID
}
```
### Reply
```javascript
{
code: "0", // type<int64>
result: {
"": ""
}, // map<string,string>, 预支付返回
}
```
## /wallet.Payment/Callback
回调更新支付的结果和状态
### Request
```javascript
{
id: "0", // type<int64>, 唯一ID
identity: "", // type<string>, 唯一码
callback_status: false, // type<bool>, 支付回调状态
callback_msg: "", // type<string>, 支付回调结果
}
```
### Reply
```javascript
{
data: "", // type<string>, 数据
timeseq: "0", // type<int64>, 响应时间序列
}
```