Browse Source

fix: 完善文档

kang.wang 5 years ago
parent
commit
1b5441df2e
21 changed files with 517 additions and 110 deletions
  1. 11 1
      docs/.vuepress/config.js
  2. 1 1
      docs/README.md
  3. 20 1
      docs/h5/2.md
  4. 18 41
      docs/h5/3.md
  5. 17 0
      docs/h5/4.md
  6. 1 0
      docs/h5/README.md
  7. 3 0
      docs/wx/1.md
  8. 23 0
      docs/wx/2.md
  9. 150 0
      docs/wx/3.md
  10. 19 0
      docs/wx/4.md
  11. 1 9
      docs/wx/README.md
  12. 1 1
      docs/zh/h5/1.md
  13. 23 2
      docs/zh/h5/2.md
  14. 12 43
      docs/zh/h5/3.md
  15. 19 0
      docs/zh/h5/4.md
  16. 2 2
      docs/zh/h5/README.md
  17. 3 0
      docs/zh/wx/1.md
  18. 23 0
      docs/zh/wx/2.md
  19. 150 0
      docs/zh/wx/3.md
  20. 19 0
      docs/zh/wx/4.md
  21. 1 9
      docs/zh/wx/README.md

+ 11 - 1
docs/.vuepress/config.js

@@ -57,6 +57,7 @@ module.exports = {
           '/android/': genSidebar('android','Android'),
           '/ios/': genSidebar('ios','IOS'),
           '/h5/': genSidebar('h5','H5'),
+          '/wx/': genSidebar('wx','wechatMiniProgram'),
         }
       },
       '/zh/': {
@@ -82,7 +83,7 @@ module.exports = {
             link: '/zh/h5/'
           },
           {
-            text: 'shoppingCart plug-in',
+            text: '开源商城插件',
             link: '/zh/cart/'
           },
           {
@@ -95,6 +96,7 @@ module.exports = {
           '/zh/android/': genSidebar('android','Android'),
           '/zh/ios/': genSidebar('ios','IOS'),
           '/zh/h5/': genSidebar('h5','H5'),
+          '/zh/wx/': genSidebar('wx','微信小程序'),
         }
       }
     }
@@ -134,6 +136,14 @@ function genSidebar(name,title) {
       '1',
       '2',
       '3',
+      '4',
+    ],
+    wx: [
+      '',
+      '1',
+      '2',
+      '3',
+      '4',
     ],
   }
   return [

+ 1 - 1
docs/README.md

@@ -2,7 +2,7 @@
 home: true
 # heroImage: /hero.png
 actionText: Get Started →
-actionLink: /zh/pc/
+actionLink: /pc/
 features:
 - title: Intergration Documents for PC
   details:  Applicable for merchant to integrate UnionPay, Alipay,Tenpay and more cross border online payment.Applicable for Chinese domestic merchant to integrate UnionPay, Alipay, Wechat and credit card payment

+ 20 - 1
docs/h5/2.md

@@ -1,3 +1,22 @@
 # 2.General API specification
 
-Common interface between merchant server and AllPay gateway, each channel has functions including: Purchase, Refund, Inqiury interface.
+Common interface between merchant server and AllPay gateway, each channel has functions including: Purchase, Refund, Inqiury interface.
+
+## 2.1. Signature String and Calculated the Signature 
+
+1.For a POST request message sent to the ALLPAY system, in which all incoming parameters (except signature parameters) according to the field name of ASCII smallest sequence (dictionary), using the format of the URL key/value pair (key1 = value1 & key2 = value2... ) spliced into a string String1.
+
+2.At the end of String1, the signature key K1(assigned at ALLPAY upon access) agreed by both parties is spliced directly (no need to connect with "&"), resulting in a stringSignTemp string, and an md5 operation on stringSignTemp to get the value of signature.
+
+3.Sample signature string
+```
+acqID=99020344&backURL=https://www.baidu.com&charSet=UTF-8&frontURL=nil&goodsInfo=iPhone x&merID=800039253992510&merReserve=&orderAmount=1.00&orderCurrency=INR&orderNum=ap0180417163142&paymentSchema=EB&signType=MD5&transTime=20180417163142&transType=PURC&trxn_email_id=benson.zhang@allpayx.com&trxn_firstname=benson zhang&trxn_is_coupon_enabled=1&trxn_phone=15026528888&unique_id=abcde12345&version=VER000000002f3e0e436cd24430aa4aaaed597450f26 
+
+```
+## 2.2. General API access address
+
+ Transaction Type   |Test URL |Production URL   
+ ------- |-----------|-------
+ Purchase|https://mchapi.allpayx.com/testjspay  |https://mchapi.allpayx.com/jspay 
+ Inquiry  |https://testapi.allpayx.com/pay/v1 |https://api.allpayx.com/pay/v1 
+ Refund  |https://testapi.allpayx.com/pay/v1 |https://api.allpayx.com/pay/v1

+ 18 - 41
docs/h5/3.md

@@ -1,33 +1,8 @@
-# 3.General API specification
+# 3. API Interface
 
-Common interface between merchant server and AllPay gateway, each channel has functions including: Purchase, Refund, Inqiury interface.
+## 3.1. Purchase interface
 
-## 3.1. Description of verifying the signature  
-
-
-1.For a POST request message sent to the ALLPAY system, in which all incoming parameters (except signature parameters) according to the field name of ASCII smallest sequence (dictionary), using the format of the URL key/value pair (key1 = value1 & key2 = value2... ) spliced into a string String1.
-
-2.At the end of String1, the signature key K1(assigned at ALLPAY upon access) agreed by both parties is spliced directly (no need to connect with "&"), resulting in a stringSignTemp string, and an md5 operation on stringSignTemp to get the value of signature.
-
-3.Sample signature string:
-
-```
-acqID=99020344&backURL=https://www.baidu.com&charSet=UTF-8&frontURL=nil&goodsInfo=iPhone x&merID=800039253992510&merReserve=&orderAmount=1.00&orderCurrency=INR&orderNum=ap0180417163142&paymentSchema=EB&signType=MD5&transTime=20180417163142&transType=PURC&trxn_email_id=benson.zhang@allpayx.com&trxn_firstname=benson zhang&trxn_is_coupon_enabled=1&trxn_phone=15026528888&unique_id=abcde12345&version=VER000000002f3e0e436cd24430aa4aaaed597450f26 
-```
-
-## 3.2. General API access address
-
- Transaction Type  |Test Address|Production Address  
- ------- |-----------|-------
- Purchase |https://testapi.allpayx.com/pay/v1 |https://api.allpayx.com/pay/v1 
- Inqiury |https://testapi.allpayx.com/pay/v1 |https://api.allpayx.com/pay/v1 
- Refund |https://testapi.allpayx.com/pay/v1 |https://api.allpayx.com/pay/v1 
- 
-## 3.3. Purchase interface
-
-1. Request message format
- 
-	This field is a list of common fields, sending, every channel needs some channel channel exclusive field, specific fields please go to the channel's exclusive canal to the fields that view. Consumer interface is divided into jump transformation and parameters return type, default to jump transformation, parameters return type will be explained in chapter 4 channels (exclusive) inside.
+Merchant could use purchase interface to initiate a transaction, send transaction information to payment channels through AllPay gateway. 
 
  No. |Field Name  |Max.Length|Type|Parameter Name|Comment 
  -----|-----|----|----|------|------
@@ -42,17 +17,13 @@ acqID=99020344&backURL=https://www.baidu.com&charSet=UTF-8&frontURL=nil&goodsInf
  9|Merchant Reserved  |1024 |Text|merReserve    |Merchant reserved content, can pass any content, such as purchase information, account number, etc., but do not pass special symbols, such as commas. 
  10|Merchant ID   |15 |Text|merID     |Merchant ID, assigned by AllPay 
  11|Acquirer ID    |11  |Text|acqID      |"99020344" 
- 12|Payment Channel Code    |10  |Text|paymentSchema|Payment Channel Code:[Click here for details](https://git.allpayx.com/OpenAPI/b2c/src/master/pc_api/paymentSchema.md)
+ 12|Payment Channel Code    |10  |Text|paymentSchema|UnionPay:"UP",Wechat:"WX,Alipay:"APMP"
  13|Goods Information    |60  |Text|goodsInfo       |Goods Information
  14|Transaction Time    |14  |Text|transTime       |Transaction time, format :" yyymmddhhmmss" 
  15|Signature Type     |3  |Text|signType        |MD5 
  16|Signature Data      |32  |Text|signature         |MD5 signature 
- 
-2. Jump transformation Purchase interface response message
-
-	The merchant needs to provide an HTTP/HTTPS protocol interface that is included in the parameters passed to the SDK, the backURL. After the payment is complete, the AllPay server will call the backURL as a Get, informing the payment result. 
 
-The parameters are as follows: 
+## 3.2. Purchase Response from AllPay 
 
  No. |Field Name  |Max.Length|Type|Parameter name|Comment 
  -----|-----|----|----|------|------
@@ -69,15 +40,18 @@ The parameters are as follows:
  11|Gateway Transaction ID  |32|Text|transID    |The unique transaction id generated by the gateway.
  12|Merchant ID   |15 |Text|merID     |Merchant ID, assigned by AllPay 
  13|Acquirer ID    |11  |Text|acqID      |"99020344" 
- 14|Payment Channel Code    |10  |Text|paymentSchema|Payment Channel Code:[Click here for details](https://git.allpayx.com/OpenAPI/b2c_pc_payment/src/master/paymentSchema.md)
+ 14|Payment Channel Code    |10  |Text|paymentSchema|UnionPay:"UP",Wechat:"WX,Alipay:"APMP"
  15|Response Code   |2  |Text|RespCode       |00 stands for success; 01 stands for fail.  
  16|Response Message    |20  |Text|RespMsg        |Response message, all English characters 
  17|Transaction Time    |14  |Text|transTime       |Transaction time, format :" yyymmddhhmmss" 
  18|Gateway process time |14  |Text|GWTime |YYYYMMDDHHMMSS this should be a GWtime, currently is local transaction time
  19|Signature Type     |3  |Text|signType        |MD5 
  20|Signature Data      |32  |Text|signature         |MD5 signature 
+ 
+ 
+## 3.3. Inqiury interface 
+
 
-## 3.4. Inqiury interface 
  
 1. Interface specification
  
@@ -85,6 +59,7 @@ The parameters are as follows:
 
 2. Request message format 
 
+  
  No. |Field Name  |Max.Length|Type|Parameter name|Comment 
  -----|-----|----|----|------|------
  1|Message Version|12|Text|version |"VER000000002" 
@@ -94,13 +69,15 @@ The parameters are as follows:
  5|Merchant Reserved  |1024 |Text|merReserve    |Merchant reserved content 
  6|Merchant ID   |15 |Text|merID     |Merchant ID, assigned by AllPay 
  7|Acquirer ID    |11  |Text|acqID      |"99020344" 
- 8|Payment Channel Code    |10  |Text|paymentSchema|Payment Channel Code:[Click here for details](https://git.allpayx.com/OpenAPI/b2c_pc_payment/src/master/paymentSchema.md)
+ 8|Payment Channel Code    |10  |Text|paymentSchema|UnionPay:"UP",Wechat:"WX,Alipay:"APMP"
  9|Transaction Time    |14  |Text|transTime       |Transaction time, format :" yyymmddhhmmss" 
  10|Signature Type     |3  |Text|signType        |MD5 
  11|Signature Data      |32  |Text|signature         |MD5 signature 
 
+
 3. Response message format
 
+  
   No. |Field Name  |Max.Length|Type|Parameter name|Comment 
  -----|-----|----|----|------|------
  1|Message Version|12|Text|version |"VER000000002" 
@@ -117,7 +94,7 @@ The parameters are as follows:
  12|Signature Type     |3  |Text|signType        |MD5 
  13|Signature Data      |32  |Text|signature         |MD5 signature 
 
-## 3.5. Refund interface
+## 3.4. Refund interface
 
 1.Interface specification 
 
@@ -136,12 +113,13 @@ This interface provides the function of refund transaction for access merchants.
  7|Merchant Reserved  |1024 |Text|merReserve    |Merchant reserved content, can pass any content, such as purchase information, account number, etc., but do not pass special symbols, such as commas. 
  8|Merchant ID   |15 |Text|merID     |Merchant ID, assigned by AllPay 
  9|Acquirer ID    |11  |Text|acqID      |"99020344" 
- 10|Payment Channel Code    |10  |Text|paymentSchema|Payment Channel Code:[Click here for details](https://git.allpayx.com/OpenAPI/b2c_pc_payment/src/master/paymentSchema.md)
+ 10|Payment Channel Code    |10  |Text|paymentSchema|UnionPay:"UP",Wechat:"WX,Alipay:"APMP"
  11|Transaction Time    |14  |Text|transTime       |Transaction time, format :" yyymmddhhmmss" 
  12|Signature Type     |3  |Text|signType        |MD5 
  13|Signature Data      |32  |Text|signature         |MD5 signature 
  
 3.Response message format
+
   
   No. |Field Name  |Max.Length|Type|Parameter name|Comment 
  -----|-----|----|----|------|------
@@ -157,5 +135,4 @@ This interface provides the function of refund transaction for access merchants.
  10|Transaction Time    |14  |Text|transTime       |Transaction time, format :" yyymmddhhmmss" 
  11|Gateway process time |14  |Text|GWTime |YYYYMMDDHHMMSS this should be a GWtime, currently is local transaction time 
  12|Signature Type     |3  |Text|signType        |MD5 
- 13|Signature Data      |32  |Text|signature         |MD5 signature 
- 
+ 13|Signature Data      |32  |Text|signature         |MD5 signature

+ 17 - 0
docs/h5/4.md

@@ -0,0 +1,17 @@
+# 4. error code 
+
+| code | msg                            |
+| -------------- | ------------------------------------------ |
+| U1             | Clientid not found                         |
+| U2             | Signature error                            |
+| V1             | Parameter missing                          |
+| E1             | Exceed the limit                           |
+| R1             | Orderno repeat                             |
+| C1             | Order currency is not set                  |
+| P1             | paychannel error                           |
+| I1             | Illegal request address                    |
+| T1             | Parameter missing(version或tranType)     |
+| T2             | Txntype error                              |
+| T3             | transaction is not exist or fail           |
+| T4             | The maximum amount exceeds the upper limit |
+| 99             | System error  

+ 1 - 0
docs/h5/README.md

@@ -1,4 +1,5 @@
 # HTML5 Integration Specification V4.2.1
+
 [Shanghai AllPay Technology Co., Ltd.](https://www.allpayx.com)
 
 * Version:English V4.2.0

+ 3 - 0
docs/wx/1.md

@@ -0,0 +1,3 @@
+# 1.概述
+
+AllPay为基于微信小程序开发的接口,以帮助客户实现快速、安全、集中式的接入支付渠道。

+ 23 - 0
docs/wx/2.md

@@ -0,0 +1,23 @@
+# 2.通用API说明
+
+商户服务器和 AllPay 网关对接的通用接口,每个渠道都具有的功能,包括:消费,退款,查询接口。
+
+## 2.1. 验签说明 
+
+1.对于发送到 ALLPAY 系统的 POST 请求报文,其中所有传入参数(除 signature 参数外)按照字段名的 ASCII 码从小到大排序后(字典序),使用 URL 键值对的格式(即 key1=value1&key2=value2...)拼接成字符串 String1。
+
+2.在 String1 最后直接拼接(不需要用“&”连接)双方约定的签名密钥 K1(接入时 ALLPAY 时分配),得到 stringSignTemp 字符串,并对 stringSignTemp 进行 md5 运算,得到 signature 的值。
+
+3.示例签名串
+
+```js
+acqID=99020344&backURL=http://example.com/example&charSet=UTF- 8&frontURL=nil&merID=000000000000015&merReserve=nil&orderAmount=0.01&orderCurre ncy=CNY&orderNum=869873851812&paymentSchema=APMP&signType=MD5&transTime= 20151112151356&transType=PURC&version=VER0000000022f2c77e3718c47cfb47a89a6fbc9d361
+```
+
+## 2.2. 通用API 接入地址
+
+ 交易名称  |开发调试地址|生产交易地址  
+ ------- |-----------|-------
+ 消费接口 |https://testapi.allpayx.com/gw/wap/pay/v1 |https://api.allpayx.com/gw/wap/pay/v1
+ 查询接口 |https://testapi.allpayx.com/pay/v1 |https://api.allpayx.com/pay/v1 
+ 退款接口 |https://testapi.allpayx.com/pay/v1 |https://api.allpayx.com/pay/v1

+ 150 - 0
docs/wx/3.md

@@ -0,0 +1,150 @@
+# 3. API接口
+
+## 3.1. 消费交易接口
+
+1. 请求报文格式
+
+ 序号 |名称  |长度|类型|参数名称|备注 
+ -----|-----|----|----|------|------
+ 1|版本号|12|文本|version |统一填写为“VER000000002” 
+ 2|字符集编码 |6|文本|charSet  |统一填写为“UTF-8” 
+ 3|交易类型  |4|文本|transType |消费交易填写“PURC” 
+ 4|订单号   |60|文本|orderNum  |商户自行定义,需保证同一商户号下订单号不能重复 
+ 5|交易模式|10|文本|mode |"applet"
+ 6|SDK 版本 |10|文本|jssdk|"1.0" 
+ 7|授权码|60|文本|code   |微信小程序 login 接口获得的授权码 
+ 8|订单金额 |12|文本|orderAmount   |如 100 元,表示为 100 或 100.00 
+ 9|订单币种   |3|文本|orderCurrency |人民币填写“CNY”,美元填写"USD" 
+ 10|前端 URL 地址 |400|文本|frontURL  |支付结果前端通知到该地址 
+ 11|后端 URL 地址 |400|文本|backURL   |支付结果异步通知到该地址 
+ 12|商户预留字段  |1024 |文本|merReserve    |商户预留内容,可传任意内容,如购买商品信息、员号等,但不要传特殊符号,如逗号。 
+ 13|商户代码   |15 |文本|merID     |商户 ID,由AllPay 分配 
+ 14|收单行 ID    |11  |文本|acqID      |收单行 ID "99020344" 
+ 15|支付渠道代码    |10  |文本|paymentSchema| "WX"
+ 16|商品信息    |60  |文本|goodsInfo       | 商品信息
+ 17|交易时间    |14  |文本|transTime       |交易时间,格式:"yyyyMMddHHmmss" 
+ 18|签名类型     |3  |文本|signType        |MD5 
+ 19|签名      |32  |文本|signature         |采用 MD5 签名 
+ 
+2. 返回数据格式
+
+ ```js
+ {'timeStamp': '',
+'nonceStr': '',
+ 'package': '',
+'signType': 'MD5',
+ 'paySign': ''}
+ ```
+
+将上述返回数据放入微信小程序支付接口,即可调起微信小程序支付,具体方法,参考[微信小程序 API ](https://developers.weixin.qq.com/miniprogram/dev/api/api-pay.html#wxrequestpaymentobject)
+
+## 3.2. 异步通知报文
+
+ 序号 |名称  |长度|类型|参数名称|备注 
+ -----|-----|----|----|------|------
+ 1|版本号|12|文本|version |统一填写为“VER000000002” 
+ 2|字符集编码 |6|文本|charSet  |统一填写为“UTF-8” 
+ 3|交易类型  |4|文本|transType |消费交易填写“PURC” 
+ 4|订单号   |60|文本|orderNum  |商户自行定义,需保证同一商户号下订单号不能重复 
+ 5|订单金额 |12|文本|orderAmount   |如 100 元,表示为 100 或 100.00 
+ 6|订单币种   |3|文本|orderCurrency |人民币填写“CNY”,美元填写"USD" 
+ 7|清算金额  |12 |文本|settAmount   |如 100 元,表示为 100 或 100.00  
+ 8|清算币种  |3|文本|settCurrency    |符合 ISO 标准,填写数字类型 
+ 9|清算汇率   |7|文本|rate     |实际汇率,7 位有效数字  
+ 10|商户预留字段  |1024 |文本|merReserve    |商户预留内容,可传任意内容,如购买商品信息、员号等,但不要传特殊符号,如逗号。 
+ 11|GW 交易 ID  |32|文本|transID    |GW 系统生成的交易 ID,每笔交易保持唯一
+ 12|商户代码   |15 |文本|merID     |商户 ID,由AllPay 分配 
+ 13|收单行 ID    |11  |文本|acqID      |收单行 ID "99020344" 
+ 14|支付渠道代码    |10  |文本|paymentSchema|渠道代码:"WX
+ 15|交易应答码   |2  |文本|RespCode       |应答码 00-成功  
+ 16|应答文字信息    |20  |文本|RespMsg        |应答消息,全部为英文字符 
+ 17|交易时间    |14  |文本|transTime       |交易时间,格式:"yyyyMMddHHmmss" 
+ 18|GW 处理时间 |14  |文本|GWTime |YYYYMMDDHHMMSS,为 GW 时间,目前为本地交易时间
+ 19|签名类型     |3  |文本|signType        |MD5 
+ 20|签名      |32  |文本|signature         |采用 MD5 签名 
+
+## 3.3. 查询交易接口
+
+1. 接口说明
+
+ 该接口为接入商家提供交易查询的功能。
+
+2. 请求报文格式 
+
+
+ 序号 |名称  |长度|类型|参数名称|备注 
+ -----|-----|----|----|------|------
+ 1|版本号|12|文本|version |统一填写为“VER000000002” 
+ 2|字符集编码 |6|文本|charSet  |统一填写为“UTF-8” 
+ 3|交易类型  |4|文本|transType |查询填写“INQY”  
+ 4|订单号   |60|文本|orderNum  |商户自行定义,需保证同一商户号下订单号不能重复 
+ 5|商户预留字段  |1024 |文本|merReserve    |商户保留 
+ 6|商户代码   |15 |文本|merID     |商户 ID,由AllPay 分配 
+ 7|收单行 ID    |11  |文本|acqID      |收单行 ID "99020344" 
+ 8|支付渠道代码    |10  |文本|paymentSchema|渠道代码:"WX
+ 9|交易时间    |14  |文本|transTime       |交易时间,格式:"yyyyMMddHHmmss" 
+ 10|签名类型     |3  |文本|signType        |MD5 
+ 11|签名      |32  |文本|signature         |采用 MD5 签名 
+
+
+3. 响应报文格式
+
+
+  序号 |名称  |长度|类型|参数名称|备注 
+ -----|-----|----|----|------|------
+ 1|版本号|12|文本|version |统一填写为“VER000000002” 
+ 2|字符集编码 |6|文本|charSet  |统一填写为“UTF-8” 
+ 3|交易类型  |4|文本|transType |查询交易填写为“INQY 
+ 4|订单号   |60|文本|orderNum  |商户自行定义,需保证同一商户号下订单号不能重复 
+ 5|GW 交易 ID  |32|文本|transID    |GW 系统生成的交易 ID,每笔交易保持唯一  
+ 6|商户代码   |15 |文本|merID     |商户 ID,由AllPay 分配 
+ 7|收单行 ID    |11  |文本|acqID      |收单行 ID "99020344" 
+ 8|交易应答码   |2  |文本|RespCode       |应答码 00-成功  
+ 9|应答文字信息    |20  |文本|RespMsg        |应答消息,全部为英文字符 
+ 10|交易时间    |14  |文本|transTime       |交易时间,格式:"yyyyMMddHHmmss" 
+ 11|GW 处理时间 |14  |文本|GWTime |YYYYMMDDHHMMSS,为 GW 时间,目前为本地交易时间 
+ 12|签名类型     |3  |文本|signType        |MD5 
+ 13|签名      |32  |文本|signature         |采用 MD5 签名 
+
+## 3.4. 退款交易接口
+
+1.接口功能说明 
+
+该接口为接入商家提供交易退款的功能。 
+
+2.请求报文格式 
+
+  序号 |名称  |长度|类型|参数名称|备注 
+ -----|-----|----|----|------|------
+ 1|版本号|12|文本|version |统一填写为“VER000000002” 
+ 2|字符集编码 |6|文本|charSet  |统一填写为“UTF-8” 
+ 3|交易类型  |4|文本|transType |退款填写“REFD” 
+ 4|订单号   |60|文本|orderNum  |商户自行定义,需保证同一商户号下订单号不能重复 
+ 5|退款金额  |12|文本|returnAmount    |如 100 元,表示为 100 或 100.00 
+ 6|订单币种   |3|文本|orderCurrency |人民币填写“CNY”,美元填写"USD" 
+ 7|商户预留字段  |1024 |文本|merReserve    |商户预留内容,可传任意内容,如购买商品信息、员号等,但不要传特殊符号,如逗号。 
+ 8|商户代码   |15 |文本|merID     |商户 ID,由AllPay 分配 
+ 9|收单行 ID    |11  |文本|acqID      |收单行 ID "99020344" 
+ 10|支付渠道代码    |10  |文本|paymentSchema|渠道代码:"WX
+ 11|交易时间    |14  |文本|transTime       |交易时间,格式:"yyyyMMddHHmmss" 
+ 12|签名类型     |3  |文本|signType        |MD5 
+ 13|签名      |32  |文本|signature         |采用 MD5 签名 
+
+3.响应报文格式
+
+
+  序号 |名称  |长度|类型|参数名称|备注 
+ -----|-----|----|----|------|------
+ 1|版本号|12|文本|version |统一填写为“VER000000002” 
+ 2|字符集编码 |6|文本|charSet  |统一填写为“UTF-8” 
+ 3|交易类型  |4|文本|transType |退款填写“REFD” 
+ 4|订单号   |60|文本|orderNum  |商户自行定义,需保证同一商户号下订单号不能重复 
+ 5|GW 交易 ID  |32|文本|transID    |GW 系统生成的交易 ID,每笔交易保持唯一  
+ 6|商户代码   |15 |文本|merID     |商户 ID,由AllPay 分配 
+ 7|收单行 ID    |11  |文本|acqID      |收单行 ID "99020344" 
+ 8|交易应答码   |2  |文本|RespCode       |应答码 00-成功  
+ 9|应答文字信息    |20  |文本|RespMsg        |应答消息,全部为英文字符 
+ 10|交易时间    |14  |文本|transTime       |交易时间,格式:"yyyyMMddHHmmss" 
+ 11|GW 处理时间 |14  |文本|GWTime |YYYYMMDDHHMMSS,为 GW 时间,目前为本地交易时间 
+ 12|签名类型     |3  |文本|signType        |MD5 
+ 13|签名      |32  |文本|signature         |采用 MD5 签名 

+ 19 - 0
docs/wx/4.md

@@ -0,0 +1,19 @@
+# 4. 错误码
+
+若商户请求AllPay网关时,请求的参数错误或参数缺失时,AllPay网关会将错误信息以JSON格式返回给客户端,供商户解析调用,以下是相关错误信息返回参数的说明
+
+| 参数应答码code | 对应应答信息msg                            |
+| -------------- | ------------------------------------------ |
+| U1             | Clientid not found                         |
+| U2             | Signature error                            |
+| V1             | Parameter missing                          |
+| E1             | Exceed the limit                           |
+| R1             | Orderno repeat                             |
+| C1             | Order currency is not set                  |
+| P1             | paychannel error                           |
+| I1             | Illegal request address                    |
+| T1             | Parameter missing(version或tranType)     |
+| T2             | Txntype error                              |
+| T3             | transaction is not exist or fail           |
+| T4             | The maximum amount exceeds the upper limit |
+| 99             | System error  

+ 1 - 9
docs/wx/README.md

@@ -3,12 +3,4 @@
 [上海偶可贝网络科技有限公司](https://www.allpayx.com)
 
 * 版本信息:中文 V4.2.1
-* 更新时间:2018 年6 月
-
-## 1.概述
-
-AllPay为基于微信小程序开发的接口,以帮助客户实现快速、安全、集中式的接入支付渠道。 
-
-## 2.通用API说明
-
-商户服务器和 AllPay 网关对接的通用接口,每个渠道都具有的功能,包括:消费,退款,查询接口。
+* 更新时间:2018 年6 月

+ 1 - 1
docs/zh/h5/1.md

@@ -1,3 +1,3 @@
 # 1.概述
 
-AllPay 为客户提供统一的api接入,以帮助客户实 现快速、安全、集中式的接入支付渠道。
+AllPay为基于移动H5页面支付集成云端SDK,以帮助客户实现快速、安全、集 中式的接入支付渠道。 

+ 23 - 2
docs/zh/h5/2.md

@@ -1,2 +1,23 @@
-#### 2.交易流程 
-![image](https://git.allpayx.com/OpenAPI/b2c/raw/master/images/pc_flowsheet.png)
+# 2.通用API说明
+
+商户服务器和 AllPay 网关对接的通用接口,每个渠道都具有的功能,包括:消费,退款,查询接口。 
+
+## 2.1. 验签说明
+
+1.对于发送到 ALLPAY 系统的 POST 请求报文,其中所有传入参数(除 signature 参数外)按照字段名的 ASCII 码从小到大排序后(字典序),使用 URL 键值对的格式(即 key1=value1&key2=value2...)拼接成字符串 String1。
+
+2.在 String1 最后直接拼接(不需要用“&”连接)双方约定的签名密钥 K1(接入时 ALLPAY 时分配),得到 stringSignTemp 字符串,并对 stringSignTemp 进行 md5 运算,得到 signature 的值。
+
+3.示例签名串
+
+```
+ acqID=99020344&backURL=http://example.com/example&charSet=UTF- 8&frontURL=nil&merID=000000000000015&merReserve=nil&orderAmount=0.01&orderCurre ncy=CNY&orderNum=869873851812&paymentSchema=APMP&signType=MD5&transTime= 20151112151356&transType=PURC&version=VER0000000022f2c77e3718c47cfb47a89a6fbc9d361 
+
+```
+## 2.2. 通用API 接入地址 
+
+ 交易名称  |开发调试地址|生产交易地址  
+ ------- |-----------|-------
+ 消费接口 |https://mchapi.allpayx.com/testjspay  |https://mchapi.allpayx.com/jspay 
+ 查询接口 |https://testapi.allpayx.com/pay/v1 |https://api.allpayx.com/pay/v1 
+ 退款接口 |https://testapi.allpayx.com/pay/v1 |https://api.allpayx.com/pay/v1

+ 12 - 43
docs/zh/h5/3.md

@@ -1,34 +1,10 @@
-# 3.通用API说明
+# 3. API接口
 
-商户服务器和 AllPay 网关对接的通用接口,每个渠道都具有的功能,包括:消费,退款,查询接口。 
+## 3.1. 消费交易接口
 
-## 3.1. 验签说明
+将相关参数,以表单形式提交到指定 url,即可调起支付。
 
 
-
-1.对于发送到 ALLPAY 系统的 POST 请求报文,其中所有传入参数(除 signature 参数外)按照字段名的 ASCII 码从小到大排序后(字典序),使用 URL 键值对的格式(即 key1=value1&key2=value2...)拼接成字符串 String1。
-
-2.在 String1 最后直接拼接(不需要用“&”连接)双方约定的签名密钥 K1(接入时 ALLPAY 时分配),得到 stringSignTemp 字符串,并对 stringSignTemp 进行 md5 运算,得到 signature 的值。
-
-3.示例签名串
-```
-acqID=99020344&backURL=https://www.baidu.com&charSet=UTF-8&frontURL=nil&goodsInfo=iPhone x&merID=800039253992510&merReserve=&orderAmount=1.00&orderCurrency=INR&orderNum=ap0180417163142&paymentSchema=EB&signType=MD5&transTime=20180417163142&transType=PURC&trxn_email_id=benson.zhang@allpayx.com&trxn_firstname=benson zhang&trxn_is_coupon_enabled=1&trxn_phone=15026528888&unique_id=abcde12345&version=VER000000002f3e0e436cd24430aa4aaaed597450f26 
-```
-## 3.2. 通用API 接入地址 
- 交易名称  |开发调试地址|生产交易地址  
- ------- |-----------|-------
- 消费接口 |https://testapi.allpayx.com/pay/v1 |https://api.allpayx.com/pay/v1 
- 查询接口 |https://testapi.allpayx.com/pay/v1 |https://api.allpayx.com/pay/v1 
- 退款接口 |https://testapi.allpayx.com/pay/v1 |https://api.allpayx.com/pay/v1 
-
-                            
-
-## 3.3. 消费交易接口
-
-1. 请求报文格式
-
-	下面列举的字段为通用字段,每个渠道都需要上送,部分渠道有渠道专属字段,具体字段请到该渠道的专属渠到字段说明处查看. 消费接口分为跳转型和参数返回型,默认为跳转型,参数返回型会在 第4章(渠道专属配置)里面说明
-
  序号 |名称  |长度|类型|参数名称|备注 
  -----|-----|----|----|------|------
  1|版本号|12|文本|version |统一填写为“VER000000002” 
@@ -42,20 +18,13 @@ acqID=99020344&backURL=https://www.baidu.com&charSet=UTF-8&frontURL=nil&goodsInf
  9|商户预留字段  |1024 |文本|merReserve    |商户预留内容,可传任意内容,如购买商品信息、员号等,但不要传特殊符号,如逗号。 
  10|商户代码   |15 |文本|merID     |商户 ID,由AllPay 分配 
  11|收单行 ID    |11  |文本|acqID      |收单行 ID "99020344" 
- 12|支付渠道代码    |10  |文本|paymentSchema|渠道代码:[点击查看详情](https://git.allpayx.com/OpenAPI/b2c_pc_payment/src/master/paymentSchema.md)
+ 12|支付渠道代码    |10  |文本|paymentSchema|渠道代码:微信:WX, 支付报"APMP",银联 "UP"
  13|商品信息    |60  |文本|goodsInfo       | 商品信息
  14|交易时间    |14  |文本|transTime       |交易时间,格式:"yyyyMMddHHmmss" 
  15|签名类型     |3  |文本|signType        |MD5 
  16|签名      |32  |文本|signature         |采用 MD5 签名 
 
-
-2. 跳转型消费接口响应报文
-
-	商户需要提供一个 http/https 协议的接口,包含在参数里传递给 SDK,即 backURL。AllPay 
-服务器在支付完成后,会以 Get 方式调用 backURL,通知支付结果。 
-
-参数如下表: 
-
+## 3.2. 异步通知报文
 
  序号 |名称  |长度|类型|参数名称|备注 
  -----|-----|----|----|------|------
@@ -72,7 +41,7 @@ acqID=99020344&backURL=https://www.baidu.com&charSet=UTF-8&frontURL=nil&goodsInf
  11|GW 交易 ID  |32|文本|transID    |GW 系统生成的交易 ID,每笔交易保持唯一
  12|商户代码   |15 |文本|merID     |商户 ID,由AllPay 分配 
  13|收单行 ID    |11  |文本|acqID      |收单行 ID "99020344" 
- 14|支付渠道代码    |10  |文本|paymentSchema|渠道代码:[点击查看详情](https://git.allpayx.com/OpenAPI/b2c_pc_payment/src/master/paymentSchema.md)
+ 14|支付渠道代码    |10  |文本|paymentSchema|渠道代码:微信:WX, 支付报"APMP",银联 "UP"
  15|交易应答码   |2  |文本|RespCode       |应答码 00-成功  
  16|应答文字信息    |20  |文本|RespMsg        |应答消息,全部为英文字符 
  17|交易时间    |14  |文本|transTime       |交易时间,格式:"yyyyMMddHHmmss" 
@@ -80,7 +49,9 @@ acqID=99020344&backURL=https://www.baidu.com&charSet=UTF-8&frontURL=nil&goodsInf
  19|签名类型     |3  |文本|signType        |MD5 
  20|签名      |32  |文本|signature         |采用 MD5 签名 
 
-## 3.4. 查询交易接口 
+
+## 3.3. 查询交易接口 
+
 
 
 1. 接口说明
@@ -89,7 +60,6 @@ acqID=99020344&backURL=https://www.baidu.com&charSet=UTF-8&frontURL=nil&goodsInf
 
 2. 请求报文格式 
 
-
  序号 |名称  |长度|类型|参数名称|备注 
  -----|-----|----|----|------|------
  1|版本号|12|文本|version |统一填写为“VER000000002” 
@@ -99,12 +69,11 @@ acqID=99020344&backURL=https://www.baidu.com&charSet=UTF-8&frontURL=nil&goodsInf
  5|商户预留字段  |1024 |文本|merReserve    |商户保留 
  6|商户代码   |15 |文本|merID     |商户 ID,由AllPay 分配 
  7|收单行 ID    |11  |文本|acqID      |收单行 ID "99020344" 
- 8|支付渠道代码    |10  |文本|paymentSchema|渠道代码:[点击查看详情](https://git.allpayx.com/OpenAPI/b2c_pc_payment/src/master/paymentSchema.md)
+ 8|支付渠道代码    |10  |文本|paymentSchema|渠道代码:"WX
  9|交易时间    |14  |文本|transTime       |交易时间,格式:"yyyyMMddHHmmss" 
  10|签名类型     |3  |文本|signType        |MD5 
  11|签名      |32  |文本|signature         |采用 MD5 签名 
 
-
 3. 响应报文格式
 
 
@@ -124,7 +93,7 @@ acqID=99020344&backURL=https://www.baidu.com&charSet=UTF-8&frontURL=nil&goodsInf
  12|签名类型     |3  |文本|signType        |MD5 
  13|签名      |32  |文本|signature         |采用 MD5 签名 
 
-## 3.5. 退款交易接口
+## 3.4. 退款交易接口
 
 1.接口功能说明 
 
@@ -143,7 +112,7 @@ acqID=99020344&backURL=https://www.baidu.com&charSet=UTF-8&frontURL=nil&goodsInf
  7|商户预留字段  |1024 |文本|merReserve    |商户预留内容,可传任意内容,如购买商品信息、员号等,但不要传特殊符号,如逗号。 
  8|商户代码   |15 |文本|merID     |商户 ID,由AllPay 分配 
  9|收单行 ID    |11  |文本|acqID      |收单行 ID "99020344" 
- 10|支付渠道代码    |10  |文本|paymentSchema|渠道代码:[点击查看详情](https://git.allpayx.com/OpenAPI/b2c_pc_payment/src/master/paymentSchema.md)
+ 10|支付渠道代码    |10  |文本|paymentSchema|渠道代码:"WX
  11|交易时间    |14  |文本|transTime       |交易时间,格式:"yyyyMMddHHmmss" 
  12|签名类型     |3  |文本|signType        |MD5 
  13|签名      |32  |文本|signature         |采用 MD5 签名 

+ 19 - 0
docs/zh/h5/4.md

@@ -0,0 +1,19 @@
+# 4. 错误码
+
+若商户请求AllPay网关时,请求的参数错误或参数缺失时,AllPay网关会将错误信息以JSON格式返回给客户端,供商户解析调用,以下是相关错误信息返回参数的说明
+
+| 参数应答码code | 对应应答信息msg                            |
+| -------------- | ------------------------------------------ |
+| U1             | Clientid not found                         |
+| U2             | Signature error                            |
+| V1             | Parameter missing                          |
+| E1             | Exceed the limit                           |
+| R1             | Orderno repeat                             |
+| C1             | Order currency is not set                  |
+| P1             | paychannel error                           |
+| I1             | Illegal request address                    |
+| T1             | Parameter missing(version或tranType)     |
+| T2             | Txntype error                              |
+| T3             | transaction is not exist or fail           |
+| T4             | The maximum amount exceeds the upper limit |
+| 99             | System error  

+ 2 - 2
docs/zh/h5/README.md

@@ -2,5 +2,5 @@
 
 [上海偶可贝网络科技有限公司](https://www.allpayx.com)
 
-* 版本信息:中文 V4.0.0
-* 更新时间:2018 年4
+* 版本信息:中文 V4.2.1
+* 更新时间:2018 年6

+ 3 - 0
docs/zh/wx/1.md

@@ -0,0 +1,3 @@
+# 1.概述
+
+AllPay为基于微信小程序开发的接口,以帮助客户实现快速、安全、集中式的接入支付渠道。

+ 23 - 0
docs/zh/wx/2.md

@@ -0,0 +1,23 @@
+# 2.通用API说明
+
+商户服务器和 AllPay 网关对接的通用接口,每个渠道都具有的功能,包括:消费,退款,查询接口。
+
+## 2.1. 验签说明 
+
+1.对于发送到 ALLPAY 系统的 POST 请求报文,其中所有传入参数(除 signature 参数外)按照字段名的 ASCII 码从小到大排序后(字典序),使用 URL 键值对的格式(即 key1=value1&key2=value2...)拼接成字符串 String1。
+
+2.在 String1 最后直接拼接(不需要用“&”连接)双方约定的签名密钥 K1(接入时 ALLPAY 时分配),得到 stringSignTemp 字符串,并对 stringSignTemp 进行 md5 运算,得到 signature 的值。
+
+3.示例签名串
+
+```js
+acqID=99020344&backURL=http://example.com/example&charSet=UTF- 8&frontURL=nil&merID=000000000000015&merReserve=nil&orderAmount=0.01&orderCurre ncy=CNY&orderNum=869873851812&paymentSchema=APMP&signType=MD5&transTime= 20151112151356&transType=PURC&version=VER0000000022f2c77e3718c47cfb47a89a6fbc9d361
+```
+
+## 2.2. 通用API 接入地址
+
+ 交易名称  |开发调试地址|生产交易地址  
+ ------- |-----------|-------
+ 消费接口 |https://testapi.allpayx.com/gw/wap/pay/v1 |https://api.allpayx.com/gw/wap/pay/v1
+ 查询接口 |https://testapi.allpayx.com/pay/v1 |https://api.allpayx.com/pay/v1 
+ 退款接口 |https://testapi.allpayx.com/pay/v1 |https://api.allpayx.com/pay/v1

+ 150 - 0
docs/zh/wx/3.md

@@ -0,0 +1,150 @@
+# 3. API接口
+
+## 3.1. 消费交易接口
+
+1. 请求报文格式
+
+ 序号 |名称  |长度|类型|参数名称|备注 
+ -----|-----|----|----|------|------
+ 1|版本号|12|文本|version |统一填写为“VER000000002” 
+ 2|字符集编码 |6|文本|charSet  |统一填写为“UTF-8” 
+ 3|交易类型  |4|文本|transType |消费交易填写“PURC” 
+ 4|订单号   |60|文本|orderNum  |商户自行定义,需保证同一商户号下订单号不能重复 
+ 5|交易模式|10|文本|mode |"applet"
+ 6|SDK 版本 |10|文本|jssdk|"1.0" 
+ 7|授权码|60|文本|code   |微信小程序 login 接口获得的授权码 
+ 8|订单金额 |12|文本|orderAmount   |如 100 元,表示为 100 或 100.00 
+ 9|订单币种   |3|文本|orderCurrency |人民币填写“CNY”,美元填写"USD" 
+ 10|前端 URL 地址 |400|文本|frontURL  |支付结果前端通知到该地址 
+ 11|后端 URL 地址 |400|文本|backURL   |支付结果异步通知到该地址 
+ 12|商户预留字段  |1024 |文本|merReserve    |商户预留内容,可传任意内容,如购买商品信息、员号等,但不要传特殊符号,如逗号。 
+ 13|商户代码   |15 |文本|merID     |商户 ID,由AllPay 分配 
+ 14|收单行 ID    |11  |文本|acqID      |收单行 ID "99020344" 
+ 15|支付渠道代码    |10  |文本|paymentSchema| "WX"
+ 16|商品信息    |60  |文本|goodsInfo       | 商品信息
+ 17|交易时间    |14  |文本|transTime       |交易时间,格式:"yyyyMMddHHmmss" 
+ 18|签名类型     |3  |文本|signType        |MD5 
+ 19|签名      |32  |文本|signature         |采用 MD5 签名 
+ 
+2. 返回数据格式
+
+ ```js
+ {'timeStamp': '',
+'nonceStr': '',
+ 'package': '',
+'signType': 'MD5',
+ 'paySign': ''}
+ ```
+
+将上述返回数据放入微信小程序支付接口,即可调起微信小程序支付,具体方法,参考[微信小程序 API ](https://developers.weixin.qq.com/miniprogram/dev/api/api-pay.html#wxrequestpaymentobject)
+
+## 3.2. 异步通知报文
+
+ 序号 |名称  |长度|类型|参数名称|备注 
+ -----|-----|----|----|------|------
+ 1|版本号|12|文本|version |统一填写为“VER000000002” 
+ 2|字符集编码 |6|文本|charSet  |统一填写为“UTF-8” 
+ 3|交易类型  |4|文本|transType |消费交易填写“PURC” 
+ 4|订单号   |60|文本|orderNum  |商户自行定义,需保证同一商户号下订单号不能重复 
+ 5|订单金额 |12|文本|orderAmount   |如 100 元,表示为 100 或 100.00 
+ 6|订单币种   |3|文本|orderCurrency |人民币填写“CNY”,美元填写"USD" 
+ 7|清算金额  |12 |文本|settAmount   |如 100 元,表示为 100 或 100.00  
+ 8|清算币种  |3|文本|settCurrency    |符合 ISO 标准,填写数字类型 
+ 9|清算汇率   |7|文本|rate     |实际汇率,7 位有效数字  
+ 10|商户预留字段  |1024 |文本|merReserve    |商户预留内容,可传任意内容,如购买商品信息、员号等,但不要传特殊符号,如逗号。 
+ 11|GW 交易 ID  |32|文本|transID    |GW 系统生成的交易 ID,每笔交易保持唯一
+ 12|商户代码   |15 |文本|merID     |商户 ID,由AllPay 分配 
+ 13|收单行 ID    |11  |文本|acqID      |收单行 ID "99020344" 
+ 14|支付渠道代码    |10  |文本|paymentSchema|渠道代码:"WX
+ 15|交易应答码   |2  |文本|RespCode       |应答码 00-成功  
+ 16|应答文字信息    |20  |文本|RespMsg        |应答消息,全部为英文字符 
+ 17|交易时间    |14  |文本|transTime       |交易时间,格式:"yyyyMMddHHmmss" 
+ 18|GW 处理时间 |14  |文本|GWTime |YYYYMMDDHHMMSS,为 GW 时间,目前为本地交易时间
+ 19|签名类型     |3  |文本|signType        |MD5 
+ 20|签名      |32  |文本|signature         |采用 MD5 签名 
+
+## 3.3. 查询交易接口
+
+1. 接口说明
+
+ 该接口为接入商家提供交易查询的功能。
+
+2. 请求报文格式 
+
+
+ 序号 |名称  |长度|类型|参数名称|备注 
+ -----|-----|----|----|------|------
+ 1|版本号|12|文本|version |统一填写为“VER000000002” 
+ 2|字符集编码 |6|文本|charSet  |统一填写为“UTF-8” 
+ 3|交易类型  |4|文本|transType |查询填写“INQY”  
+ 4|订单号   |60|文本|orderNum  |商户自行定义,需保证同一商户号下订单号不能重复 
+ 5|商户预留字段  |1024 |文本|merReserve    |商户保留 
+ 6|商户代码   |15 |文本|merID     |商户 ID,由AllPay 分配 
+ 7|收单行 ID    |11  |文本|acqID      |收单行 ID "99020344" 
+ 8|支付渠道代码    |10  |文本|paymentSchema|渠道代码:"WX
+ 9|交易时间    |14  |文本|transTime       |交易时间,格式:"yyyyMMddHHmmss" 
+ 10|签名类型     |3  |文本|signType        |MD5 
+ 11|签名      |32  |文本|signature         |采用 MD5 签名 
+
+
+3. 响应报文格式
+
+
+  序号 |名称  |长度|类型|参数名称|备注 
+ -----|-----|----|----|------|------
+ 1|版本号|12|文本|version |统一填写为“VER000000002” 
+ 2|字符集编码 |6|文本|charSet  |统一填写为“UTF-8” 
+ 3|交易类型  |4|文本|transType |查询交易填写为“INQY 
+ 4|订单号   |60|文本|orderNum  |商户自行定义,需保证同一商户号下订单号不能重复 
+ 5|GW 交易 ID  |32|文本|transID    |GW 系统生成的交易 ID,每笔交易保持唯一  
+ 6|商户代码   |15 |文本|merID     |商户 ID,由AllPay 分配 
+ 7|收单行 ID    |11  |文本|acqID      |收单行 ID "99020344" 
+ 8|交易应答码   |2  |文本|RespCode       |应答码 00-成功  
+ 9|应答文字信息    |20  |文本|RespMsg        |应答消息,全部为英文字符 
+ 10|交易时间    |14  |文本|transTime       |交易时间,格式:"yyyyMMddHHmmss" 
+ 11|GW 处理时间 |14  |文本|GWTime |YYYYMMDDHHMMSS,为 GW 时间,目前为本地交易时间 
+ 12|签名类型     |3  |文本|signType        |MD5 
+ 13|签名      |32  |文本|signature         |采用 MD5 签名 
+
+## 3.4. 退款交易接口
+
+1.接口功能说明 
+
+该接口为接入商家提供交易退款的功能。 
+
+2.请求报文格式 
+
+  序号 |名称  |长度|类型|参数名称|备注 
+ -----|-----|----|----|------|------
+ 1|版本号|12|文本|version |统一填写为“VER000000002” 
+ 2|字符集编码 |6|文本|charSet  |统一填写为“UTF-8” 
+ 3|交易类型  |4|文本|transType |退款填写“REFD” 
+ 4|订单号   |60|文本|orderNum  |商户自行定义,需保证同一商户号下订单号不能重复 
+ 5|退款金额  |12|文本|returnAmount    |如 100 元,表示为 100 或 100.00 
+ 6|订单币种   |3|文本|orderCurrency |人民币填写“CNY”,美元填写"USD" 
+ 7|商户预留字段  |1024 |文本|merReserve    |商户预留内容,可传任意内容,如购买商品信息、员号等,但不要传特殊符号,如逗号。 
+ 8|商户代码   |15 |文本|merID     |商户 ID,由AllPay 分配 
+ 9|收单行 ID    |11  |文本|acqID      |收单行 ID "99020344" 
+ 10|支付渠道代码    |10  |文本|paymentSchema|渠道代码:"WX
+ 11|交易时间    |14  |文本|transTime       |交易时间,格式:"yyyyMMddHHmmss" 
+ 12|签名类型     |3  |文本|signType        |MD5 
+ 13|签名      |32  |文本|signature         |采用 MD5 签名 
+
+3.响应报文格式
+
+
+  序号 |名称  |长度|类型|参数名称|备注 
+ -----|-----|----|----|------|------
+ 1|版本号|12|文本|version |统一填写为“VER000000002” 
+ 2|字符集编码 |6|文本|charSet  |统一填写为“UTF-8” 
+ 3|交易类型  |4|文本|transType |退款填写“REFD” 
+ 4|订单号   |60|文本|orderNum  |商户自行定义,需保证同一商户号下订单号不能重复 
+ 5|GW 交易 ID  |32|文本|transID    |GW 系统生成的交易 ID,每笔交易保持唯一  
+ 6|商户代码   |15 |文本|merID     |商户 ID,由AllPay 分配 
+ 7|收单行 ID    |11  |文本|acqID      |收单行 ID "99020344" 
+ 8|交易应答码   |2  |文本|RespCode       |应答码 00-成功  
+ 9|应答文字信息    |20  |文本|RespMsg        |应答消息,全部为英文字符 
+ 10|交易时间    |14  |文本|transTime       |交易时间,格式:"yyyyMMddHHmmss" 
+ 11|GW 处理时间 |14  |文本|GWTime |YYYYMMDDHHMMSS,为 GW 时间,目前为本地交易时间 
+ 12|签名类型     |3  |文本|signType        |MD5 
+ 13|签名      |32  |文本|signature         |采用 MD5 签名 

+ 19 - 0
docs/zh/wx/4.md

@@ -0,0 +1,19 @@
+# 4. 错误码
+
+若商户请求AllPay网关时,请求的参数错误或参数缺失时,AllPay网关会将错误信息以JSON格式返回给客户端,供商户解析调用,以下是相关错误信息返回参数的说明
+
+| 参数应答码code | 对应应答信息msg                            |
+| -------------- | ------------------------------------------ |
+| U1             | Clientid not found                         |
+| U2             | Signature error                            |
+| V1             | Parameter missing                          |
+| E1             | Exceed the limit                           |
+| R1             | Orderno repeat                             |
+| C1             | Order currency is not set                  |
+| P1             | paychannel error                           |
+| I1             | Illegal request address                    |
+| T1             | Parameter missing(version或tranType)     |
+| T2             | Txntype error                              |
+| T3             | transaction is not exist or fail           |
+| T4             | The maximum amount exceeds the upper limit |
+| 99             | System error  

+ 1 - 9
docs/zh/wx/README.md

@@ -3,12 +3,4 @@
 [上海偶可贝网络科技有限公司](https://www.allpayx.com)
 
 * 版本信息:中文 V4.2.1
-* 更新时间:2018 年6 月
-
-## 1.概述
-
-AllPay为基于微信小程序开发的接口,以帮助客户实现快速、安全、集中式的接入支付渠道。 
-
-## 2.通用API说明
-
-商户服务器和 AllPay 网关对接的通用接口,每个渠道都具有的功能,包括:消费,退款,查询接口。
+* 更新时间:2018 年6 月