应用生成支付链接
签名:
| 签名信息 | 签名类型 |
|---|---|
| 是否签名 | 是 |
POST请求地址:
| 环境 | https请求地址 |
|---|---|
| 正式环境 | https://openrealm.duolabao.com/v1/payurl/create |
请求头:
| 请求头 | 示例值 | 描述 |
|---|---|---|
| Content-Type | application/json | POST请求json格式数据,必需声明该类型 |
| accessKey | fe02aa7e8f3249fe86c93774b7103d9945f80 | 用户的公钥 |
| timestamp | 102202020202 | 时间戳 |
| token | C9EF9BCE7138E21A353DE3F57187DC5E5396DD96 | 根据密钥和算法生成的结果 |
| accessToken | 3rdsfaij43209dfaojf | 从授权系统获得的accessToken值 |
| 1 | { |
| 2 | "customerOpenId": "287292646332292430", |
| 3 | "machineNum": "10011014669647495825911", |
| 4 | "shopNum": "10001214641666224204354", |
| 5 | "requestNum": "31508083332507485", |
| 6 | "amount":"0.01", |
| 7 | "tableNum":"10", |
| 8 | source":"API", |
| 9 | "callbackUrl":"http://yourdomain.com/callback",(回调有签名,详细参考1.2服务端响应客户端签名) |
| 10 | "extraInfo":"{"pickNum":"071","menuList":"青椒鸡蛋20.00*1,农家小炒肉20.00*2"}" |
| 11 | } |
| 参数名称 | 参数类型 | 是否必填 | 最大长度 | 参数说明 | 示例值 |
|---|---|---|---|---|---|
| result | String | 是 | 32 | SUCCESS表示成功,FAIL表示失败 | success |
| shopNum | String | 是 | 32 | 店面url | https://order.duolabao.com/active/c?state=315080832507485%7CmachineNum%7C10.50% |
| 1 | { |
| 2 | "result":"success", |
| 1 | { |
| 3 | url": "https://order.duolabao.com/active/c?state=315080832507485%7CmachineNum%7C10.50% |
| 4 | } |
| 5 | } |
| 1 | { |
| 2 | "error": { |
| 3 | "errorCode": |
| 4 | "shopNotExist", |
| 5 | "errorMsg":"店铺不存在" |
| 6 | }, |
| 7 | "result": "fail" |
| 7 | } |
| 1 | { |
| 2 | "error": { |
| 3 | "errorCode": |
| 4 | "errorMsg":"错误描述" |
| 5 | }, |
| 6 | "result": "error" |
| 7 | } |
| 错误码 | 错误描述 | 解决方案 |
|---|---|---|
| paramsError | requestNum must be specified | 参数不正确,请确认参数 |
| amountInvalid | amount invalid | 金额无效,请确认金额 |
| requestNumInvalid | requestNum invalid | 流水号无效,请确认流水号 |
| tableNumInvalid | tableNum invalid | 桌号无效,请确认桌号 |
| callbackUrlInvalid | callbackUrl invalid | 回调地址无效,请确认回调地址 |
| extraInfoInvalid | extraInfo invalid | 扩展信息无效,请确认扩展信息 |
| customerNotExist | customer not exist | 商户不存在 |
| customerNotActive | customer not active | 商户未激活 |
| shopNotExist | shop not exis | 店铺不存在 |
| shopIsClosed | shop is closed | 店铺已关闭 |
| machineNotExist | machine not exist | 机具不存在 |
| machineNotUsing | machine not using | 机具未使用 |
| machineExsit | machine:[编号] is exsit | 机具号已经存在,请确认机具号 |
| generalUrlFailed | general url failed | 生成支付链接失败,请重新生成支付链 |