快捷支付
适用于线下门店支付场景,支持微信支付和支付宝+ 。
API URL:https://mapi.yabandpay.com/Payments
Method:POST
POST data type:Json
字段 | 类型 | 描述 | 是否必填 |
---|---|---|---|
user | String | 收银员账号的UID | 必填 |
sign | String | 签名 | 必填 |
method | String | v3.BarcodePayment | 必填 |
time | Long | 时间戳 | 必填 |
- 参数
字段 | 类型 | 描述 | 是否必填 |
---|---|---|---|
pay_method | String | offline | 必填 |
sub_pay_method | String | WeChat Pay,Alipay,通过接口获取sub pay method 获取。如果为空(推荐),将由YabandPay来做支付方式判断。 | 选填 |
order_id | String | 商户订单号 | 必填 |
amount | String | 金额数字。例如 € 24.99 应该写成24.99,CNY金额>=1,欧元金额>=0.1 | 必填 |
tip_amount | String | 总金额中包含的小费,金额数字。例如 1.02 | 选填 |
currency | String | 货币代码,ISO 4217,例如EUR,CHF | 必填 |
demo | String | 自定义字段 | 选填 |
auth_code | String | 微信支付或者支付宝+钱包的授权码 | 必填 |
description | String | 订单描述 | 必填 |
notify_url | String | 支付完成后异步通知地址 | 选填 |
签名示例:
拼接为URL方式并排序后的字符串
"amount=2.1&auth_code=134443133735495918¤cy=EUR&demo=test&description=YabandPay test&method=v3.BarcodePayment¬ify_url=https://www.yabandpay.com/notify&order_id=202488465489451317&pay_method=offline&sub_pay_method=WeChat Pay&time=1555499083&tip_amount=0.5&user=016683"
得到的 stringA 使用 secret_key做签名
得到的签名如下:
"412f2d1d5fe0f56abde655d44d886e718bee808970f00186e9f340caa04893cb"
提交示例:
{
"user": "016683",
"sign": "412f2d1d5fe0f56abde655d44d886e718bee808970f00186e9f340caa04893cb",
"method": "v3.BarcodePayment",
"time": 1555499083,
"data": {
"amount": "2.1",
"tip_amount": "0.5",
"auth_code": "134443133735495918",
"currency": "EUR",
"demo": "test",
"description": "YabandPay test",
"notify_url": "https://www.yabandpay.com/notify",
"order_id": "202488465489451317",
"pay_method": "offline",
"sub_pay_method": "WeChat Pay"
}
}
返回示例:
{
"status": true,
"code": "200",
"data": {
"order_id": "202488465489451317",
"trade_id": "511444d0-2d91-5396-9e34-f2900e80d715",
"amount": "2.1",
"tip_amount": "0.5",
"sub_pay_method": "WeChat Pay",
"state": "paid"
},
"message": "",
}
更多信息:
返回结果:
[!TIP|style:flat]
返回代码:
Status | Code | Message |
---|---|---|
true | 200 | Success |
fales | -1000 | Internal error |
fales | -1007 | Identity code is invalid |
fales | -4011 | Not support the payment method |
fales | -4015 | This order has been closed |
fales | -4028 | WeChat Pay is not available |
fales | -4029 | Alipay is not available |
fales | -4086 | Unknow identity code |