tao.zhou 2 years ago
parent
commit
a3168ef3dd
3 changed files with 129 additions and 112 deletions
  1. 41 33
      AllPay_Integration_Specification_CH.md
  2. 53 44
      bindCardPayExclusive_CH.md
  3. 35 35
      bindCardPayExclusive_EN.md

+ 41 - 33
AllPay_Integration_Specification_CH.md

@@ -59,10 +59,10 @@ signature: 25f4eb90cebec86cf0467659f466e345
 
 ### 2.3 通用说明
 
- **请求方式:**POST<br><br>
- **数据格式:**JSON<br><br>
- **测试主机:**https://testapi.allpayx.com<br><br>
- **生产主机:**https://api.allpayx.com
+ 请求方式:`POST`<br><br>
+ 数据格式:`JSON`<br><br>
+ 测试主机:`https://testapi.allpayx.com`<br><br>
+ 生产主机:`https://api.allpayx.com`
 
 ## 3. 线上支付API
 
@@ -80,7 +80,7 @@ signature: 25f4eb90cebec86cf0467659f466e345
 
 | 参数          | 类型         | 必填 | 描述                                                         |
 | ------------- | ------------ | ---- | ------------------------------------------------------------ |
-| paymentSchema       | String(10)     | 是    | FC       |         
+| paymentSchema       | String(10)     | 是    | "FC"       |         
 | version             | String(12)     | 是    | 统一填写为“VER000000005” |                                                                                                                    
 | charSet             | String(6)      | 是    | 统一填写为“UTF-8” |                                                                                                                           
 | transType           | String(10)     | 是    | 消费交易填写“PURC”  |                                                                                                                          
@@ -92,14 +92,14 @@ signature: 25f4eb90cebec86cf0467659f466e345
 | merID               | String(15)     | 是    | 商户 ID,由 GoAllPay 分配 |                                                                                                                     
 | acqID               | String(11)     | 是    | 收单行 ID,统一填写为"99020344"|                                                                                                                  
 | goodsInfo           | String(60)     | 是    | 商品信息。注意不要包含特殊符号,如 "#","&","+" 等 |                                                                                                        
-| detailInfo          | String(400)    | 是    | 商品明细。格式:`[{"goods_name":"iPhone X",``"quantity":"2"},{"goods_name":"iPhone 8",``"quantity":"4"}]`,需Base64编码后上送。注意goods_name不要包含特殊符号,如 "#","&","+" 等|                                                                                                                                   
+| detailInfo          | String(400)    | 是    | 商品明细。格式:`[{"goods_name":"iPhone X",``"quantity":"2"},{"goods_name":"iPhone 8",``"quantity":"4"}]`,需Base64编码后上送。注意goods_name不要包含特殊符号,如 "#","&","+" 等|
 | transTime           | String(14)     | 是    | 交易时间,格式:"yyyyMMddHHmmss" |                                                                                                                
 | merReserve          | String(1024)   | 否    | 预留内容,商户自定义。注意不要包含特殊符号,如 "#","&","+" 等 |                                                                                                  
 | signType            | String(10)     | 是    | MD5或SHA256|                                                                                                                              
 | signature           | String(32)     | 是    | 采用 MD5或SHA256 签名 |                                                                                                                       
-| OsType              | String(20)     | 是    | 操作系统类型。"IOS","ANDROID","HARMONYOS","WINDOWS","MAC","OTHER" 选其中一个上送|                                                                                                                                                                                               
+| OsType              | String(20)     | 是    | 操作系统类型。"IOS","ANDROID","HARMONYOS","WINDOWS","MAC","OTHER" 选其中一个上送|
 | OsVersion           | String(20)     | 否    | 操作系统版本。示例:"10.0.19043" |                                                                                                                 
-| tokenFlag           | String(10)     | 否    | 是否同时返回签约支付token的标识,需要返回时,填写:"true",该功能需要单独审批开通。 |                                                                                                    
+| tokenFlag           | String(10)     | 否    | 是否同时返回签约支付token的标识,需要返回时,填写:"true",该功能需要单独审批开通。 |
 | tokenBackURL        | String(400)    | 否    | 签约支付token的异步通知URL,当tokenFlag为"True"时,必须填写 |                                                                                              
 | logisticsCountry    | String         | 是    | 物流国家/地区,2位国家码,如:US  |                                                                                                                    
 | logisticsState      | String         | 是    | 物流州/省/邦,2位编码,如:CA  |                                                                                                                      
@@ -112,13 +112,14 @@ signature: 25f4eb90cebec86cf0467659f466e345
 
  **4. 响应参数**
 
-| 参数          | 类型         | 必填 | 描述                                                         
-| ------------- | ------------ | ---- | -----
-| RespCode       | String(2)   | 是    | 应答码,00表示请求成功 
-| RespMsg       | String(256)    | 是    | 应答信息 
-| merID     | String(15)    | 否    | 商户ID 
-| orderNum      | String(60)   | 否    | 订单号
-| transID   | String(32)   | 否    | GoAllPay流水号
+| 参数          | 类型         | 必填 | 描述  |                                                       
+| ------------- | ------------ | ---- | -----|
+| RespCode       | String(2)   | 是    | 应答码,00表示请求成功 |
+| RespMsg       | String(256)    | 是    | 应答信息 |
+| merID     | String(15)    | 否    | 商户ID |
+| orderNum      | String(60)   | 否    | 订单号|
+| transID   | String(32)   | 否    | GoAllPay流水号|
+| parameter | Object    | 否    | 支付相关参数。RespCode为00且非后台支付模式时返回,返回值为payUrl |
 
 ### 3.2 支付接口
 
@@ -178,7 +179,7 @@ signature: 25f4eb90cebec86cf0467659f466e345
 
 **1. 接口说明**
  
- 商家调用支付接口、收银台支付接口,后台支付结果将通过该接口,返回到支付交易的backURL位置。
+ 商家调用支付接口、收银台支付接口,后台支付结果将通过该接口,返回到支付交易的 backURL 位置。
 
 **2. 请求路径**
 
@@ -551,6 +552,12 @@ signature: 25f4eb90cebec86cf0467659f466e345
 
 **3. 请求参数**
 
+ 由通用参数和渠道专属参数组成,凡是上送参数都需参与签名。
+
+ ***渠道专属参数:*** [点击查看](bind_ch.md)
+
+ ***通用参数:***
+
 | 参数          | 类型        | 必填 | 描述                                                       |
 | ------------- | ----------- | ---- | ---------------------------------------------------------- |
 | version       | String(12)  | 是    | 统一填写为“VER000000005”                                   |
@@ -561,9 +568,8 @@ signature: 25f4eb90cebec86cf0467659f466e345
 | frontURL      | String(400) | 是    | 签约后前端跳转地址                                       |
 | backURL       | String(400)  | 是    | 签约结果异步通知到该URL。签约成功后,GoAllPay 会以 POST 方式调用 backURL 通知支付结果(详见回调参数)。商户在接收到通知后,需响应字符串“OK”。<br>如果没有收到商户响应“OK”,GoAllPay将会过一段时间后重新推送,时间间隔为[15, 15, 30, 180, 1800, 3600, 7200, 14400, 14400],单位为秒。 |
 | merID         | String(15)  | 是    | 商户 ID,由 GoAllPay 分配                                  |
-| paymentSchema | String(20)  | 是    | 渠道ID:"AliPayPlus" |
-| sub_brand_code     | String(20) | 是    | 子品牌。"gcash","dana","tng","rabbit_line_pay"选其中一个上送|
-| transTime     | String(14)  | 是    | 交易时间,格式:"yyyyMMddHHmmss"                           |
+| paymentSchema | String(20)  | 是    | 渠道ID:"AliPayPlus"或"FC" |
+| transTime     | String(14)  | 是    | 交易时间,格式:"yyyyMMddHHmmss" |
 | terminalType  | String(10)  | 是    | 终端类型。"WEB","WAP","MINI_APP","APP"选其中一个上送 |
 | OsType  | String(10)  | 是    | 操作系统类型。"IOS","ANDROID","OTHER" 选其中一个上送 |
 | OsVersion  | String(10)  | 否   | 操作系统版本,如11.0.2 |
@@ -589,7 +595,7 @@ signature: 25f4eb90cebec86cf0467659f466e345
 
 **2. 请求路径**
 
-签约支付接口中的`backURL`参数,或是收银台支付接口中的`tokenBackURL`参数。
+签约支付接口中的`backURL`参数或是收银台支付接口中的`tokenBackURL`参数。
 
 **3. 请求参数**
 
@@ -613,7 +619,6 @@ signature: 25f4eb90cebec86cf0467659f466e345
 | signType      | String(10)   | 是    | MD5或SHA256                                                  |
 | signature     | String(32)   | 是    | 采用 MD5或SHA256 签名                                        
 
-
 **4. 响应参数**
 
  字符串OK
@@ -676,6 +681,12 @@ signature: 25f4eb90cebec86cf0467659f466e345
 
 **3. 请求参数** 
 
+ 由通用参数和渠道专属参数组成,凡是上送参数都需参与签名。
+
+ ***渠道专属参数:*** [点击查看](bind_ch.md)
+
+ ***通用参数:***
+
 | 参数          | 类型         | 必填 | 描述                                                         |
 | ------------- | ------------ | ---- | ------------------------------------------------------------ |
 | version       | String(12)   | 是    | 统一填写为“VER000000005”                                     |
@@ -689,8 +700,7 @@ signature: 25f4eb90cebec86cf0467659f466e345
 | token         | String(32)   | 是    | 签约时返回的token                                            |
 | merID         | String(15)   | 是    | 商户 ID,由 GoAllPay 分配                                    |
 | acqID         | String(11)   | 是    | 收单行 ID "99020344"                                         |
-| paymentSchema | String(20)   | 是    | 渠道ID:"AliPayPlus" |
-| sub_brand_code| String(20)   | 是    | 子品牌 |
+| paymentSchema | String(20)   | 是    | 渠道ID:"AliPayPlus"或"FC" |
 | goodsInfo     | String(60)   | 是    | 商品信息。注意不要包含特殊符号,如 "#","&","+" 等 |
 | detailInfo    | String(400)  | 是    | 商品明细。<br>格式:[{"goods_name":"iPhone X","quantity":"2"},{"goods_name":"iPhone 8","quantity":"4"}],需Base64编码后上送。注意goods_name不要包含特殊符号,如 "#","&","+" 等 |
 | transTime     | String(14)   | 是    | 交易时间,格式:"yyyyMMddHHmmss"                             |
@@ -713,9 +723,8 @@ signature: 25f4eb90cebec86cf0467659f466e345
 | acqID         | String(11)   | 是    | 收单行 ID "99020344"                                         |
 | paymentSchema | String(10)   | 是    | 渠道ID |
 | RespCode      | String(2)    | 是    | 应答码 00-成功,01-失败。详情见本文档第5章应答码             |
-| RespMsg       | String(20)   | 是    | 应答消息。失败原因
-JSON格式```{"code":"原因代码", "text":"原因说明"}```,[点击查看详情](bindPay_reason.md)。当code原因代码为`INVALID_TOKEN`和`EXPIRED_ACCESS_TOKEN`时为token失效,商户可调用` /api/refreshToken`接口更新token后重试。 |
-| reason       | JSON Object  |  否    | 失败原因。交易失败时,返回失败的详细原因                                                     |
+| RespMsg       | String(20)   | 是    | 应答消息 |
+| reason       | JSON Object  |  否    | 失败原因,JSON格式```{"code":"原因代码", "text":"原因说明"}```,[点击查看详情](bindPay_reason.md)。当code原因代码为`INVALID_TOKEN`和`EXPIRED_ACCESS_TOKEN`时为token失效,商户可调用`/api/refreshToken`接口更新token后重试。|
 | transID       | String(32)   | 是    | GoAllPay流水号                       |
 | GWTime        | String(14)   | 是    | yyyyMMddHHmmss,为 GW 时间                                   |
 | transTime     | String(14)   | 是    | 交易时间,格式:"yyyyMMddHHmmss"                             |
@@ -762,14 +771,13 @@ JSON格式```{"code":"原因代码", "text":"原因说明"}```,[点击查看
 | paymentSchema | String(20)   | 是    | 渠道ID |
 | sub_brand_code| String(20)   | 是    | 子品牌 |
 | RespCode      | String(2)    | 是    | 应答码 00-成功,01-失败。详情见本文档第5章应答码 |
-| RespMsg       | String(20)   | 是    | 应答消息。失败原因
-JSON格式```{"code":"原因代码", "text":"原因说明"}```,[点击查看详情](refreshToken_reason.md)。 |
-| reason        | JSON Object  |  否    | 失败原因。交易失败时,返回失败的详细原因                                                     |
+| RespMsg       | String(20)   | 是    | 应答消息 |
+| reason        | JSON Object  | 否    | 失败原因,JSON格式```{"code":"原因代码", "text":"原因说明"}```,[点击查看详情](refreshToken_reason.md)。 |
 | customerId    | String(60)   | 是    | 用户ID |
-| transID       | String(32)   | 是    | GoAllPay流水号                       |
+| transID       | String(32)   | 是    | GoAllPay流水号 |
 | GWTime        | String(14)   | 是    | yyyyMMddHHmmss,为 GW 时间                                   |
 | transTime     | String(14)   | 是    | 交易时间,格式:"yyyyMMddHHmmss"                             |
-| signType      | String(10)   | 是    | MD5或SHA256                                                  |
+| signType      | String(10)   | 是    | MD5或SHA256 |
 | signature     | String(32)   | 是    | 采用 MD5或SHA256 签名                                        |
 
 ### 4.6 商户主动解约接口
@@ -787,7 +795,7 @@ JSON格式```{"code":"原因代码", "text":"原因说明"}```,[点击查看
 | 参数          | 类型       | 必填 | 描述                                                       |
 | ------------- | ---------- | ---- | ---------------------------------------------------------- |
 | version       | String(12) | 是    | 统一填写为“VER000000005”                                   |
-| sub_brand_code     | String(20) | 是    | 子品牌 |
+| sub_brand_code| String(20) | 是    | 子品牌 |
 | orderNum      | String(60) | 是    | 解约订单号:商户自行定义,需保证同一商户号下订单号不能重复 |
 | customerId    | String(60) | 是    | 用户ID  |
 | token         | String(32) | 是    | 签约时返回的token                                          |
@@ -803,7 +811,7 @@ JSON格式```{"code":"原因代码", "text":"原因说明"}```,[点击查看
 | ------------- | ---------- | ---- | ---------------------------------------------------------- |
 | version       | String(12)   | 是    | “VER000000005” |
 | orderNum      | String(60)   | 是    | 订单号 |
-| token     | String(32)   | 否    | 签约扣款交易使用该token |
+| token         | String(32)   | 否    | 签约扣款交易使用该token |
 | merID         | String(15)   | 是    | 商户ID |
 | paymentSchema | String(20)   | 是    | 渠道ID |
 | sub_brand_code| String(20)   | 是    | 子品牌 |

+ 53 - 44
bindCardPayExclusive_CH.md

@@ -1,44 +1,53 @@
-## 渠道专属配置
-
-<!-- ### 1 FC渠道
-
-#### 1.1 绑卡支付
-
-  绑卡分两种模式
-
-  (1) 用户在商户平台选择添加卡,然后跳转至GoAllPay的绑卡页面,用户在此页面输入卡号信息。绑卡失败,则返失败通知给商户;绑卡成功,返回“token+customerID+卡号后四位”给商户。
-
-  专属字段
-
-| 参数      | 类型   | 属性 | 描述 |
-| --------- | ------ | ---- | ---- |
-| tradeFrom | String | M    | "H5" |
-
-  (2) 商户自己收集卡号信息通过API送到GoAllPay网关。
-
-  专属字段
-
-| 参数       | 类型   | 属性 | 描述              |
-| ---------- | ------ | ---- | ----------------- |
-| tradeFrom  | String | M    | "API"             |
-| cardno     | String | M    | 卡号              |
-| cvv2       | String | M    | cvv2              |
-| ExpiryDate | String | M    | 有效期:格式 MM/YY |
-
-```javascript
-测试卡:
-
-卡号: 4761340000000019
-有效期: 1217
-CVV2: 830
-
-卡号: 5204730000002555
-有效期: 1225
-CVV2: 123
-``` -->
-
-### 1 AliPayLocal渠道
-
-| 参数      | 类型   | 必填 | 描述    |
-| --------- | ------ | ---- | ------- |
-| sub_brand_code | String | 是 |"gcash", "dana", "kakaopay", "alipay_hk", "truemoney", "tng" 选其中一个上送 |
+## 渠道专属配置
+
+### 目录:
+  - [1. AliPayPlus渠道](#1-alipayplus渠道)
+  - [2. FC渠道](#2-fc渠道)
+<!-- ### 1 FC渠道
+
+#### 1.1 绑卡支付
+
+  绑卡分两种模式
+
+  (1) 用户在商户平台选择添加卡,然后跳转至GoAllPay的绑卡页面,用户在此页面输入卡号信息。绑卡失败,则返失败通知给商户;绑卡成功,返回“token+customerID+卡号后四位”给商户。
+
+  专属字段
+
+| 参数      | 类型   | 属性 | 描述 |
+| --------- | ------ | ---- | ---- |
+| tradeFrom | String | M    | "H5" |
+
+  (2) 商户自己收集卡号信息通过API送到GoAllPay网关。
+
+  专属字段
+
+| 参数       | 类型   | 属性 | 描述              |
+| ---------- | ------ | ---- | ----------------- |
+| tradeFrom  | String | M    | "API"             |
+| cardno     | String | M    | 卡号              |
+| cvv2       | String | M    | cvv2              |
+| ExpiryDate | String | M    | 有效期:格式 MM/YY |
+
+```javascript
+测试卡:
+
+卡号: 4761340000000019
+有效期: 1217
+CVV2: 830
+
+卡号: 5204730000002555
+有效期: 1225
+CVV2: 123
+``` -->
+
+### 1. AliPayPlus渠道
+
+| 参数      | 类型   | 必填 | 描述    |
+| --------- | ------ | ---- | ------- |
+| sub_brand_code | String | 是 |"alipay_cn","gcash", "dana", "kakaopay", "alipay_hk", "truemoney", "tng", "bpi","connect_wallet","rabbit_line_pay" 选其中一个上送 |
+
+### 2. FC渠道
+
+| 参数      | 类型   | 必填 | 描述    |
+| --------- | ------ | ---- | ------- |
+| email | String | 是 |用户邮箱|

+ 35 - 35
bindCardPayExclusive_EN.md

@@ -1,36 +1,36 @@
-### 1 FC
-
-#### 1.1 Bound card payment
-
-There are two modes of card binding
-
-(1) The user chooses to add a card on the merchant platform, and then jumps to the card binding page of GoAllPay. The user enters the card number information on this page. If the card binding fails, the merchant will be notified of the failure; if the card binding is successful, "token + customerID + the last four digits of the card number" will be returned to the merchant.
-
- Exclusive field
-
-| Parameter | Type | Required | Description |
-| --------- | ------ | ---- | ---- |
-| tradeFrom | String | Yes    | "H5" |
-
-(2) The merchant collects the card number information by himself and sends it to the GoAllPay gateway through the API.
-
- Exclusive field
-
-| Parameter | Type | Required | Description |
-| ---------- | ------ | ---- | ----------------- |
-| tradeFrom  | String | Yes    | "API"             |
-| cardno     | String | Yes    | Card number              |
-| cvv2       | String | Yes    | cvv2              |
-| ExpiryDate | String | Yes    | Validity period: Format MM / YY |
-
-```javascript
-Test card:
-
-Card Number: 4761340000000019
-Expiry Date: 1217
-CVV2: 830
-
-Card Number: 5204730000002555
-Expiry Date: 1225
-CVV2: 123
+### 1 FC
+
+#### 1.1 Bound card payment
+
+There are two modes of card binding
+
+(1) The user chooses to add a card on the merchant platform, and then jumps to the card binding page of GoAllPay. The user enters the card number information on this page. If the card binding fails, the merchant will be notified of the failure; if the card binding is successful, "token + customerID + the last four digits of the card number" will be returned to the merchant.
+
+ Exclusive field
+
+| Parameter | Type | Required | Description |
+| --------- | ------ | ---- | ---- |
+| tradeFrom | String | Yes    | "H5" |
+
+(2) The merchant collects the card number information by himself and sends it to the GoAllPay gateway through the API.
+
+ Exclusive field
+
+| Parameter | Type | Required | Description |
+| ---------- | ------ | ---- | ----------------- |
+| tradeFrom  | String | Yes    | "API"             |
+| cardno     | String | Yes    | Card number              |
+| cvv2       | String | Yes    | cvv2              |
+| ExpiryDate | String | Yes    | Validity period: Format MM / YY |
+
+```javascript
+Test card:
+
+Card Number: 4761340000000019
+Expiry Date: 1217
+CVV2: 830
+
+Card Number: 5204730000002555
+Expiry Date: 1225
+CVV2: 123
 ```