Browse Source

更新至5.1版本

tao.zhou 3 years ago
parent
commit
76e93d0783
2 changed files with 118 additions and 92 deletions
  1. 83 70
      AllPay_Integration_Specification_CH.md
  2. 35 22
      AllPay_Integration_Specification_EN.md

+ 83 - 70
AllPay_Integration_Specification_CH.md

@@ -1,8 +1,8 @@
-# GoAllPay在线支付接入规范文档V5.0.0
+# GoAllPay在线支付接入规范文档V5.1.0
 [上海偶可贝网络科技有限公司](https://www.goallpayx.com)
 
-* 版本信息:中文 V5.0.0
-* 更新时间:2020 年6
+* 版本信息:中文 V5.1.0
+* 更新时间:2021 年 7
 
 ## 1.概述
 GoAllPay 为客户提供统一的API接入,以帮助客户实现快速、安全、集中式的接入支付渠道。
@@ -24,35 +24,37 @@ stringSignTemp: acqID=99020344&backURL=https://testapi.allpayx.com/test&charSet=
 
 signature: 1e0f24d39cdc8236d17a5f6f17672611
 ```
-## 4.通用API说明
-
- 统一支持POST和GET请求,支持form和JSON格式提交参数。
-
-### 4.1 通用 API 接入地址 
-
-| 交易名称 | 测试地址                                 | 生产地址                             |
-| ------- | ------------------------------------------- | --------------------------------------- |
-| 消费    | https://testapi.allpayx.com/api/unifiedorder | https://api.allpayx.com/api/unifiedorder |
-| 消费查询 | https://testapi.allpayx.com/api/orderquery   | https://api.allpayx.com/api/orderquery   |
-| 退款    | https://testapi.allpayx.com/api/refund       | https://api.allpayx.com/api/refund       |
-| 退款查询 | https://testapi.allpayx.com/api/refundquery  | https://api.allpayx.com/api/refundquery  |
-| 预授权 | https://testapi.allpayx.com/api/unifiedorder | https://api.allpayx.com/api/unifiedorder |
-| 预授权完成 | https://testapi.allpayx.com/api/pauc | https://api.allpayx.com/api/pauc |
-| 撤销 | https://testapi.allpayx.com/api/canc | https://api.allpayx.com/api/canc |
-| 手工退款申请 | https://testapi.allpayx.com/api/refdreq | https://api.allpayx.com/api/refdreq |
-| 签约 | https://testapi.allpayx.com/api/bindCard | https://api.allpayx.com/api/bindCard |
-| 订阅扣款 | https://testapi.allpayx.com/api/bindPay | https://api.allpayx.com/api/bindPay |
-| 解约 | https://testapi.allpayx.com/api/unBindCard | https://api.allpayx.com/api/unBindCard |
+## 4. API 说明
+
+ 测试主机:https://testapi.allpayx.com
+ 生产主机:https://api.allpayx.com
+ 请求方式:POST
+ 数据格式:application/json 或 application/x-www-form-urlencoded
+
+### 4.1 API 列表 
+
+| 交易类型 | URL路径                                 |
+| ------- | ------------------------------------------- |
+| 消费    | /api/createorder |
+| 查询 | /api/orderquery   |
+| 退款    | /api/refund       |
+| 预授权 | /api/createorder |
+| 预授权完成 | /api/pauc |
+| 撤销 | /api/canc |
+| 手工退款申请 | /api/refdreq |
+| 签约 | /api/bindCard |
+| 订阅扣款 | /api/bindPay |
+| 解约 | /api/unBindCard |
 
 ### 4.2 消费交易接口
 
-**1.接口说明**
+**1. 接口说明**
 
  该接口为接入商家提供消费购买的功能。
 
-**2.请求参数**
+**2. 请求参数**
 
- 由通用参数和渠道专属参数组成。凡是上送参数都需参与签名。消费接口分为跳转型和参数返回型,默认为跳转型,参数返回型会在渠道专属参数中说明
+ 由通用参数和渠道专属参数组成,凡是上送参数都需参与签名
 
  *渠道专属参数:* [点击查看](payExclusive_CH.md)
 
@@ -69,7 +71,7 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | frontURL      | String(400)  | M    | 支付完成后前端跳转到该URL |
 | backURL       | String(400)  | M    | 支付结果异步通知到该URL。支付成功后,GoAllPay 会以 POST 方式调用 backURL,通知支付结果(JSON)。商户在接收到通知后,需响应字符串“OK”。<br>如果没有收到商户响应“OK”,GoAllPay将会过一段时间后重新推送,时间间隔为[15, 15, 30, 180, 1800, 3600, 7200, 14400, 14400],单位为秒。 |
 | merID         | String(15)   | M    | 商户 ID,由 GoAllPay 分配 |
-| acqID         | String(11)   | M    | 收单行 ID "99020344" |
+| acqID         | String(11)   | M    | 收单行 ID,统一填写为"99020344" |
 | paymentSchema | String(10)   | M    | 渠道ID:[点击查看详情](paymentSchema.md) |
 | goodsInfo     | String(60)   | M    | 商品信息。 |
 | detailInfo    | String(400)  | M    | 商品明细。格式:[{"goods_name":"iPhone X","quantity":"2"},{"goods_name":"iPhone 8","quantity":"4"}],需对该参数进行Base64编码后签名上送。 |
@@ -80,7 +82,18 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | signType      | String(10)   | M    | MD5或SHA256 |
 | signature     | String(32)   | M    | 采用 MD5或SHA256 签名 |
 
-**3.跳转型消费接口响应参数**
+**3. 响应参数**
+
+| 参数          | 类型         | 属性 | 描述                                                         |
+| ------------- | ------------ | ---- | ------------------------------------------------------------ |
+| RespCode       | String(2)   | M    | 应答码,00表示请求成功 |
+| RespMsg       | String(256)    | M    | 应答信息 |
+| merID     | String(15)    | O    | 商户ID,RespCode为00时返回 |
+| orderNum      | String(60)   | O    | 订单号,RespCode为00时返回 |
+| transID   | String(32)   | O    | GoAllPay流水号,RespCode为00时返回 |
+| parameter | Object    | O    | 支付相关参数,RespCode为00时返回 |
+
+**4. 回调参数**
 
 | 参数          | 类型         | 属性 | 描述                                                         |
 | ------------- | ------------ | ---- | ------------------------------------------------------------ |
@@ -102,27 +115,27 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | signType      | String(10)   | M    | MD5或SHA256                                                  |
 | signature     | String(32)   | M    | 采用 MD5或SHA256 签名                                        |
 
-### 4.3 消费查询交易接口 
-
-**1.接口说明**
+### 4.3 查询交易接口 
 
-  该接口为接入商家提供消费查询的功能。
+**1. 接口说明**
 
+  该接口为接入商家提供订单查询的功能。
+<!-- 
  (1)接口补充说明
   * 商户发起消费交易后,可通过该接口查询消费交易的状态
 
  (2)接口交易流程
 
-  ![](https://allpayfile-hd2.oss-cn-shanghai.aliyuncs.com/git/b2c/15665470156706.jpg)
+  ![](https://allpayfile-hd2.oss-cn-shanghai.aliyuncs.com/git/b2c/15665470156706.jpg) -->
 
-**2.请求参数** 
+**2. 请求参数** 
 
 | 参数          | 类型       | 属性 | 描述                                                         |
 | ------------- | ---------- | ---- | ------------------------------------------------------------ |
 | version       | String(12) | M    | 统一填写为“VER000000005”                                     |
 | charSet       | String(6)  | M    | 统一填写为“UTF-8”                                            |
 | transType     | String(10) | M    | 查询填写“INQY”                                               |
-| orderNum      | String(60) | M    | 支付订单号                                                       |
+| orderNum      | String(60) | M    | 订单号                                                       |
 | merID         | String(15) | M    | 商户 ID,由 GoAllPay 分配                                       |
 | acqID         | String(11) | M    | 收单行 ID "99020344"                                         |
 | paymentSchema | String(10) | M    | 渠道ID:[点击这里](paymentSchema.md) |
@@ -130,14 +143,14 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | signType      | String(10) | M    | MD5或SHA256                                                          |
 | signature     | String(32) | M    | 采用 MD5或SHA256 签名                                                |
 
-**3.响应参数**
+**3. 响应参数**
 
 | 参数          | 类型       | 属性 | 描述                                                         |
 | ------------- | ---------- | ---- | ------------------------------------------------------------ |
 | version       | String(12) | M    | “VER000000005”                                     |
 | charSet       | String(6)  | M    | “UTF-8”                                            |
-| transType     | String(10) | M    | “PURC”                                               |
-| orderNum      | String(60) | M    | 支付订单号                                                       |
+| transType     | String(10) | M    | 交易类型  |
+| orderNum      | String(60) | M    | 订单号                                                       |
 | transID       | String(32) | M    | GW 系统生成的交易 ID,每笔交易保持唯一                       |
 | merID         | String(15) | M    | 商户 ID |
 | acqID         | String(11) | M    | 收单行 ID "99020344"                                         |
@@ -151,7 +164,7 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 
 ### 4.4 退款交易接口
 
-**1.接口功能说明**
+**1. 接口功能说明**
  
   该接口为接入商家提供交易退款的功能。
 
@@ -164,7 +177,7 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 
   ![](https://allpayfile-hd2.oss-cn-shanghai.aliyuncs.com/git/b2c/15665469966231.jpg)
 
-**2.请求参数** 
+**2. 请求参数** 
 
 | 参数          | 类型       | 属性 | 描述                                                         |
 | ------------- | ---------- | ---- | ------------------------------------------------------------ |
@@ -182,7 +195,7 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | signType      | String(10)  | M    | MD5或SHA256                                                  |
 | signature     | String(32) | M    | 采用 MD5或SHA256 签名                                        |
 
-**3.响应参数**
+**3. 响应参数**
 
 | 参数      | 类型       | 属性 | 描述                                           |
 | --------- | ---------- | ---- | ---------------------------------------------- |
@@ -201,7 +214,7 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | signType  | String(10) | M    | MD5或SHA256                                   |
 | signature | String(32) | M    | 采用 MD5或SHA256 签名                          |
 
-### 4.5 退款查询交易接口
+<!-- ### 4.5 退款查询交易接口
 
 **1.接口说明**
 
@@ -246,15 +259,15 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | transTime     | String(14) | M    | 交易时间,格式:"yyyyMMddHHmmss"                             |
 | GWTime        | String(14) | M    | YYYYMMDDHHMMSS,为 GW 时间,目前为本地交易时间               |
 | signType      | String(10) | M    | MD5或SHA256                                                  |
-| signature     | String(32) | M    | 采用 MD5或SHA256 签名                                        |
+| signature     | String(32) | M    | 采用 MD5或SHA256 签名                                        | -->
 
-### 4.6 预授权接口
+### 4.5 预授权接口
 
-**1.接口说明**
+**1. 接口说明**
 
   预授权接口适用于外卡(包括VISA、万事达、JCB等卡品牌)和银联卡交易。预授权交易不会参与清算,发卡银行会暂时冻结用户资金。
 
-**2.请求参数**
+**2. 请求参数**
 
   由通用参数和渠道专属参数组成。凡是上送参数都需参与签名。
 
@@ -282,7 +295,7 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | signType      | String(10)   | M    | MD5或SHA256 |
 | signature     | String(32)   | M    | 采用 MD5或SHA256 签名 |
 
-**3.响应参数**
+**3. 响应参数**
 
 | 参数          | 类型         | 属性 | 描述                                                         |
 | ------------- | ------------ | ---- | ------------------------------------------------------------ |
@@ -304,9 +317,9 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | signType      | String(10)   | M    | MD5或SHA256 |
 | signature     | String(32)   | M    | 采用 MD5或SHA256 签名 |
 
-### 4.7 预授权完成接口
+### 4.6 预授权完成接口
 
-**1.接口说明**
+**1. 接口说明**
 
   预授权完成接口适用于外卡(包括VISA、万事达、JCB等卡品牌)和银联卡交易。预授权完成交易与消费交易相似,交易成功后,会对商户进行资金的清算。
 
@@ -319,7 +332,7 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 
  ![](https://allpayfile-hd2.oss-cn-shanghai.aliyuncs.com/git/b2c/15665464464405.jpg)
 
-**2.请求参数**
+**2. 请求参数**
 
 | 参数          | 类型       | 属性 | 描述                                                   |
 | ------------- | ---------- | ---- | ------------------------------------------------------ |
@@ -337,7 +350,7 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | signType      | String(10) | M    | MD5或SHA256 |
 | signature     | String(32) | M    | 采用 MD5或SHA256 签名 |
 
-**3.响应参数**
+**3. 响应参数**
 
 | 参数          | 类型       | 属性 | 描述                                           |
 | ------------- | ---------- | ---- | ---------------------------------------------- |
@@ -356,9 +369,9 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | signType      | String(10) | M    | MD5或SHA256                                    |
 | signature     | String(32) | M    | 采用 MD5或SHA256 签名                          |
 
-### 4.8 撤销接口
+### 4.7 撤销接口
 
-**1.接口说明**
+**1. 接口说明**
 
   撤销接口适用于外卡(包括VISA、万事达、JCB等卡品牌)、银联卡和支付宝菲律宾钱包。
 
@@ -370,7 +383,7 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 
   ![](https://allpayfile-hd2.oss-cn-shanghai.aliyuncs.com/git/b2c/15665464582903.jpg)
 
-**2.请求参数**
+**2. 请求参数**
 
 | 参数          | 类型       | 属性 | 描述                                                         |
 | ------------- | ---------- | ---- | ------------------------------------------------------------ |
@@ -386,7 +399,7 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | signType      | String(10) | M    | MD5或SHA256                                                  |
 | signature     | String(32) | M    | 采用 MD5或SHA256 签名                                        |
 
-**3.响应参数**
+**3. 响应参数**
 
 | 参数          | 类型       | 属性 | 描述                                           |
 | ------------- | ---------- | ---- | ---------------------------------------------- |
@@ -405,13 +418,13 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | signType      | String(10) | M    | MD5或SHA256                                    |
 | signature     | String(32) | M    | 采用 MD5或SHA256 签名                          |
 
-### 4.9 手工退款申请接口
+### 4.8 手工退款申请接口
 
-**1.接口功能说明**
+**1. 接口功能说明**
 
   对90天之前的交易进行退款,商户无法通过调用联机退款接口处理,需调用该接口发起退款申请,申请成功后我们业务人员会通过人工方式进行处理,处理周期大概在3-5个工作日,退款申请交易经过人工处理后被成功退款,交易才会清算。
 
-**2.请求参数** 
+**2. 请求参数** 
 
 | 参数          | 类型       | 属性 | 描述                                                         |
 | ------------- | ---------- | ---- | ------------------------------------------------------------ |
@@ -429,7 +442,7 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | signType      | String(10)  | M    | MD5或SHA256                                                  |
 | signature     | String(32) | M    | 采用 MD5或SHA256 签名                                        |
 
-**3.响应参数**
+**3. 响应参数**
 
 | 参数          | 类型       | 属性 | 描述                                           |
 | ------------- | ---------- | ---- | ---------------------------------------------- |
@@ -448,13 +461,13 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | signType      | String(10) | M    | MD5或SHA256                                    |
 | signature     | String(32) | M    | 采用 MD5或SHA256 签名                          |
 
-### 4.10 签约接口
+### 4.9 签约接口
 
-**1.接口功能说明** 
+**1. 接口功能说明** 
 
 ​  为用户提供签约功能,适用于外卡、银联卡、支付宝本地支付。
 
-**2.请求参数** 
+**2. 请求参数** 
 
   由通用参数和渠道专属参数组成。凡是上送参数都需参与签名。
 
@@ -477,7 +490,7 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | signType      | String(10)  | M    | MD5或SHA256                                                |
 | signature     | String(32)  | M    | 采用 MD5或SHA256 签名                                      |
 
-**3.响应参数**
+**3. 响应参数**
 
 | 参数          | 类型       | 属性 | 描述                                                       |
 | ------------- | ---------- | ---- | ---------------------------------------------------------- |
@@ -497,13 +510,13 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | signType      | String(10) | M    | MD5或SHA256                                                |
 | signature     | String(32) | M    | 采用 MD5或SHA256 签名                                      |
 
-### 4.11 订阅扣款接口
+### 4.10 订阅扣款接口
 
-**1.接口功能说明** 
+**1. 接口功能说明** 
 
   订阅消费,根据绑卡时返回的token,对用户进行扣款
 
-**2.请求参数** 
+**2. 请求参数** 
 
   由通用参数和渠道专属参数组成。凡是上送参数都需参与签名。
 
@@ -533,7 +546,7 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | signType      | String(10)   | M    | MD5或SHA256                                                  |
 | signature     | String(32)   | M    | 采用 MD5或SHA256 签名                                        |
 
-**3.响应参数**
+**3. 响应参数**
 
 | 参数          | 类型         | 属性 | 描述                                                         |
 | ------------- | ------------ | ---- | ------------------------------------------------------------ |
@@ -555,13 +568,13 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | signType      | String(10)   | M    | MD5或SHA256 |
 | signature     | String(32)   | M    | 采用 MD5或SHA256 签名 |
 
-### 4.12 解约接口
+### 4.11 解约接口
 
-**1.接口功能说明** 
+**1. 接口功能说明** 
 
   解除绑定的卡片
 
-**2.请求参数** 
+**2. 请求参数** 
 
 | 参数          | 类型       | 属性 | 描述                                                       |
 | ------------- | ---------- | ---- | ---------------------------------------------------------- |
@@ -577,7 +590,7 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 | signType      | String(10) | M    | MD5或SHA256                                                |
 | signature     | String(32) | M    | 采用 MD5或SHA256 签名                                      |
 
-**3.响应参数**
+**3. 响应参数**
 
 | 参数          | 类型       | 属性 | 描述                                                       |
 | ------------- | ---------- | ---- | ---------------------------------------------------------- |

+ 35 - 22
AllPay_Integration_Specification_EN.md

@@ -1,8 +1,8 @@
 # GoAllPay Integration Specification V5.0.0
 [Shanghai GoAllPay Technology Co., Ltd.](https://www.goallpayx.com)
 
-* Version:English V5.0.0
-* Update Time:2020/06
+* Version:English V5.1.0
+* Update Time:2027/07
 
 ## 1.Overview
 GoAllPay provides customers with unified API access to help them implement fast, secure and centralized access payment channels.
@@ -26,23 +26,25 @@ signature: 1e0f24d39cdc8236d17a5f6f17672611
 ```
 ## 4.API description
 
-Supported request methods including POST and GET, supported parameter formats including form and JSON.
-
-### 4.1 General API access URL 
-
-| Interface Name | Test URL                                 | Production URL                             |
-| ------- | ------------------------------------------- | --------------------------------------- |
-| Purchase | https://testapi.allpayx.com/api/unifiedorder | https://api.allpayx.com/api/unifiedorder |
-| Inquiry | https://testapi.allpayx.com/api/orderquery   | https://api.allpayx.com/api/orderquery   |
-| Refund | https://testapi.allpayx.com/api/refund       | https://api.allpayx.com/api/refund       |
-| Refund inquiry | https://testapi.allpayx.com/api/refundquery  | https://api.allpayx.com/api/refundquery  |
-| Pre-authorization | https://testapi.allpayx.com/api/unifiedorder | https://api.allpayx.com/api/unifiedorder |
-| Pre-authorization completed | https://testapi.allpayx.com/api/pauc | https://api.allpayx.com/api/pauc |
-| Cancellation | https://testapi.allpayx.com/api/canc | https://api.allpayx.com/api/canc |
-| Manual refund application | https://testapi.allpayx.com/api/refdreq | https://api.allpayx.com/api/refdreq |
-| Card binding | https://testapi.allpayx.com/api/bindCard | https://api.allpayx.com/api/bindCard |
-| Card unbundling | https://testapi.allpayx.com/api/unBindCard | https://api.allpayx.com/api/unBindCard |
-| Card payment | https://testapi.allpayx.com/api/bindPay | https://api.allpayx.com/api/bindPay |
+ Test environment host: https://testapi.allpayx.com
+ Production environment host: https://api.allpayx.com
+ Request method: POST
+ Content type: application/json or application/x-www-form-urlencoded
+
+### 4.1 API list 
+
+| Transaction Type | URL path                                 |
+| ------- | ------------------------------------------- |
+| Purchase    | /api/createorder |
+| Inquiry | /api/orderquery   |
+| Refund    | /api/refund       |
+| Pre-authorization | /api/createorder |
+| Pre-authorization completed | /api/pauc |
+| Cancellation | /api/canc |
+| Manual refund application | /api/refdreq |
+| Card binding | /api/bindCard |
+| Card payment | /api/bindPay |
+| Card unbundling | /api/unBindCard |
 
 ### 4.2 Purchase interface
 
@@ -52,7 +54,7 @@ This interface provides the function of purchase transaction for access merchant
 
 **2.Request parameters**
 
-It consists of general fields and channel-specific fields. All upload fields must be signed. The consumption interface is divided into a jump type and a parameter return type. The default is a jump type, and the parameter return type will be described in the channel-specific field.
+It consists of general fields and channel-specific fields. All upload fields must be signed.
 
   *Channel exclusive fields:* [click to view](payExclusive_EN.md)
 
@@ -78,7 +80,18 @@ It consists of general fields and channel-specific fields. All upload fields mus
 | signType      | String(10)   | M    | "MD5" or "SHA256" |
 | signature     | String(32)   | M    | MD5 or SHA256 signature |
 
-**3.Jump transformation Purchase interface response parameters**
+**3.Response parameters**
+
+| parameter          | Type         | Required | Description          |
+| ------------- | ------------ | ---- | ------------------------------------------------------------ |
+| RespCode       | String(2)   | M    | Response code. 00 stands for success. |
+| RespMsg       | String(256)    | M    | Response message |
+| merID     | String(15)    | O    | Merchant ID. Return it when RespCode is 00. |
+| orderNum      | String(60)   | O    | Order number. Return it when RespCode is 00. |
+| transID   | String(32)   | O    | GoAllPay serial number. Return it when RespCode is 00. |
+| parameter | Object    | O    | Payment parameters. Return it when RespCode is 00. |
+
+**4.Callback parameters**
 
 | parameter          | Type         | Required | Description          |
 | ------------- | ------------ | ---- | ------------------------------------------------------------ |
@@ -91,7 +104,7 @@ It consists of general fields and channel-specific fields. All upload fields mus
 | merID         | String(15)   | M    | Merchant ID |
 | acqID         | String(11)   | M    | "99020344" |
 | paymentSchema | String(10)   | M    | Channel ID |
-| RespCode      | String(2)    | M    | 00 stands for success; 01 stands for fail. See Chapter 6 Response Codes in this document for details. |
+| RespCode      | String(2)    | M    | Response code. 00 stands for success; 01 stands for fail. See Chapter 6 Response Codes in this document for details. |
 | RespMsg       | String(20)   | M    | Response message |
 | transID       | String(32)   | M    | The unique transaction id generated by the gateway. |
 | GWTime        | String(14)   | M    | yyyyMMddHHmmss this should be a GWtime, currently is local transaction time. |