―、引言
- 文档概述
本文档提供充值接口规范说明,提供一整套的完整的接入示例(http 接口)供商户参 考,可以帮助商户开发人员快速完成接口开发与联调,实现与油卡充值系统的交易互联。
公司官网:http://www.wikeyun.cn/
- 阅读对象
本文阅读对象:开发人员与微客云系统对接支付相关的技术人员。
- 业务流程
- 打开控制台 https://control.wikeyun.cn/ 进行注册账号
- 点击添加店铺,只勾选CMS即可,或者店铺ID保存。
- 联系客服申请 app_key与app_secret 。
- 开发对接,需求在控制台进行预存。
1、添加充值卡
网关URL:https://router.wikeyun.cn/rest/Oil/addCard
<p style="margin-left:35.3pt">参数名</p> | <p style="margin-left:38.95pt">类型</p> | <p style="margin-left:28.55pt">必填</p> | <p style="margin-left:1.7pt">参数说明</p> |
<p style="margin-left:35.25pt">store_id</p> | <p style="margin-left:39.05pt">字符串</p> | <p style="margin-left:.8pt">是</p> | <p style="margin-left:1.85pt">店铺ID</p> |
<p style="margin-left:35.3pt">card_num</p> | <p style="margin-left:39.05pt">字符串</p> | <p style="margin-left:.8pt">是</p> | <p style="margin-left:1.7pt">充值卡号</p> |
<p style="margin-left:35.3pt">name</p> | <p style="margin-left:39.05pt">字符串</p> | <p style="margin-left:.8pt">是</p> | <p style="margin-left:1.85pt">姓名</p> |
<p style="margin-left:35.3pt">phone</p> | <p style="margin-left:38.95pt">字符串</p> | <p style="margin-left:.8pt">是</p> | <p style="margin-left:1.7pt">手机号</p> |
<p style="margin-left:35.3pt">user_num</p> | <p style="margin-left:0pt"> 字符串</p> | <p style="margin-left:.8pt">是</p> | <p style="margin-left:1.7pt">身份证</p> |
<p style="margin-left:35.3pt">card_type</p> | <p style="margin-left:39.05pt">整数</p> | <p style="margin-left:.8pt">否</p> | <p style="margin-left:1.85pt">0中石化 1中石油</p> |
## 2、编辑充值卡
网关URL:
https://router.wikeyun.cn/rest/Oil/editCard
<p style="margin-left:35.3pt">参数名</p> | <p style="margin-left:38.95pt">类型</p> | <p style="margin-left:28.55pt">必填</p> | <p style="margin-left:1.7pt">参数说明</p> |
<p style="margin-left:35.25pt">card_id</p> | <p style="margin-left:39.05pt">字符串</p> | <p style="margin-left:.8pt">是</p> | <p style="margin-left:1.85pt">卡ID</p> |
<p style="margin-left:35.3pt">card_num</p> | <p style="margin-left:39.05pt">字符串</p> | <p style="margin-left:.8pt">是</p> | <p style="margin-left:1.7pt">充值卡号</p> |
<p style="margin-left:35.3pt">name</p> | <p style="margin-left:39.05pt">字符串</p> | <p style="margin-left:.8pt">是</p> | <p style="margin-left:1.85pt">姓名</p> |
<p style="margin-left:35.3pt">phone</p> | <p style="margin-left:38.95pt">字符串</p> | <p style="margin-left:.8pt">是</p> | <p style="margin-left:1.7pt">手机号</p> |
<p style="margin-left:35.3pt">user_num</p> | <p style="margin-left:0pt"> 字符串</p> | <p style="margin-left:.8pt">是</p> | <p style="margin-left:1.7pt">身份证</p> |
<p style="margin-left:35.3pt">card_type</p> | <p style="margin-left:39.05pt">整数</p> | <p style="margin-left:.8pt">否</p> | <p style="margin-left:1.85pt">0中石化 1中石油</p> |
## 3、油卡详情/删除
删除URL:
https://router.wikeyun.cn/rest/Oil/delCard
详情URL:
https://router.wikeyun.cn/rest/Oil/cardInfo
<p style="margin-left:35.3pt">参数名</p> | <p style="margin-left:38.95pt">类型</p> | <p style="margin-left:28.55pt">必填</p> | <p style="margin-left:1.7pt">参数说明</p> |
<p style="margin-left:35.25pt">card_id</p> | <p style="margin-left:39.05pt">字符串</p> | <p style="margin-left:.8pt">是</p> | <p style="margin-left:1.85pt">卡ID</p> |
## 2、充值下单请求(post 表单提交)
网关URL:
https://router.wikeyun.cn/rest/Oil/pushOrder
<p style="margin-left:35.3pt">参数名</p> | <p style="margin-left:38.95pt">类型</p> | <p style="margin-left:28.55pt">必填</p> | <p style="margin-left:1.7pt">参数说明</p> |
<p style="margin-left:35.25pt">store_id</p> | <p style="margin-left:39.05pt">字符串</p> | <p style="margin-left:.8pt">是</p> | <p style="margin-left:1.85pt">店铺ID</p> |
<p style="margin-left:35.3pt">cardId</p> | <p style="margin-left:39.05pt">整数</p> | <p style="margin-left:.8pt">是</p> | <p style="margin-left:1.7pt">充值卡ID,来自创建接口</p> |
<p style="margin-left:35.3pt">order_no </p> | <p style="margin-left:39.05pt">字符串</p> | <p style="margin-left:.8pt">是</p> | <p style="margin-left:1.85pt">充值订单号</p> |
<p style="margin-left:35.3pt">amount</p> | <p style="margin-left:38.95pt">整数</p> | <p style="margin-left:.8pt">是</p> | <p style="margin-left:1.7pt">充值金额(500)</p> |
<p style="margin-left:35.3pt">recharge_type</p> | <p style="margin-left:38.95pt; text-align:justify">整型</p> | <p style="margin-left:.8pt">是</p> | <p style="margin-left:1.7pt">1快充 0慢充,目前请传0</p> |
<p style="margin-left:35.3pt">notify_url</p> | <p style="margin-left:39.05pt">字符串</p> | <p style="margin-left:.8pt">是</p> | <p style="margin-left:1.85pt">异步回调地址(POST)</p> |
失败返回数据格式:
{"code":"1003","msg":"app_key不能为空","time":"1624868000","data":null}
成功返回数据格式:
{"code":"0000","msg":"推送成功","data":{"order_number":"xxxx"}}
## 3、回调通知
<p style="margin-left:34.25pt">参数名</p> | <p>类型</p> | <p style="margin-left:16pt">参数说明</p> |
<p style="margin-left:34.25pt">order_no</p> | <p>字符串</p> | <p style="margin-left:15.85pt">充值订单号</p> |
<p style="margin-left:34.25pt">order_number</p> | <p>字符串</p> | <p style="margin-left:15.85pt">官方订单号</p> |
<p style="margin-left:34pt">status</p> | <p>字符串</p> | <p style="margin-left: 10.95pt;">交易结果(0 待支付 1 已付 充值中 2充值成功 3充值失败 需要退款 4退款成功 6待充值 7 已匹配)</p> |
收到回调后,商户必须同步返回字符串 success,否则平台认为商户没有收到回调,会重复发送5
次回调。
## 4、查询接口(post 表单提交)
网关URL:
https://router.wikeyun.cn/rest/Oil/query
<p style="margin-left:35.3pt">参数名</p> | <p style="margin-left:38.95pt">类型</p> | <p style="margin-left:28.55pt; text-align:justify">必填</p> | <p style="margin-left:1.7pt">参数说明</p> |
<p style="margin-left:34.25pt">order_number</p> | <p>字符串</p> | <p style="margin-left:15.85pt">是</p> | <p style="margin-left:34.25pt">官方订单号</p> |
失败返回数据格式:
{"code":"1003","msg":"app_key不能为空","time":"1624868000","data":null}
成功返回数据格式:
{"code":"0000","msg":"获取成功","data":{"order_number":"xxxx","status":"1","mobile":"13786517891","amount":"100","order_no":"xxxx"}}