ソースを参照

修改v5接口文档,以及增加汇率查询接口

tao.zhou 5 年 前
コミット
924af0ef74

+ 31 - 17
AllPay_Integration_Specification_CH.md

@@ -212,7 +212,7 @@ AllPay 为客户提供统一的API接入,以帮助客户实 现快速、安全
 
 ##### 5.1 WX渠道
 
-1.二维码无跳转模式
+###### 5.1.1 二维码无跳转模式
 
  该模式返回生成二维码的字符串,商户需要自己生成二维码。
 
@@ -230,7 +230,7 @@ AllPay 为客户提供统一的API接入,以帮助客户实 现快速、安全
 | RespMsg  | String | M    | 应答消息        |
 | code_url | String | O    | 二维码字符串。应答码为00返回该字段 |
 
-2.二维码跳转模式
+###### 5.1.2 二维码跳转模式
 
 该模式会为商户跳转到AllPay生成好的二维码页面,无需商户自己生成。
 
@@ -240,7 +240,7 @@ AllPay 为客户提供统一的API接入,以帮助客户实 现快速、安全
 | --------- | ------ | ---- | ------- |
 | tradeFrom | String | M    | "QUICK" |
 
-3.公众号支付
+###### 5.1.3 公众号支付
 
  消费接口专属字段
 
@@ -248,7 +248,7 @@ AllPay 为客户提供统一的API接入,以帮助客户实 现快速、安全
 | --------- | ------ | ---- | ------- |
 | tradeFrom | String | M    | "JSAPI" |
 
-4.小程序支付
+###### 5.1.4 小程序支付
 
  消费接口专属字段
 
@@ -267,7 +267,7 @@ AllPay 为客户提供统一的API接入,以帮助客户实 现快速、安全
 
 将上述返回数据放入微信小程序支付接口,即可调起微信小程序支付,具体方法,参考微信小程序api
 
-5.APP支付
+###### 5.1.5 APP支付
 
  消费接口专属字段
 
@@ -287,7 +287,7 @@ AllPay 为客户提供统一的API接入,以帮助客户实 现快速、安全
 
 ##### 5.2 AP渠道
 
-1.WebSite支付
+###### 5.2.1 WebSite支付
 
  消费接口专属字段
 
@@ -297,7 +297,7 @@ AllPay 为客户提供统一的API接入,以帮助客户实 现快速、安全
 
 ##### 5.3 APMP渠道
 
-1.H5支付
+###### 5.3.1 H5支付
 
  消费接口专属字段
 
@@ -305,7 +305,7 @@ AllPay 为客户提供统一的API接入,以帮助客户实 现快速、安全
 | --------- | ------ | ---- | ------- |
 | tradeFrom | String | M    | "JSAPI" |
 
-2.APP支付
+###### 5.3.2 APP支付
 
  消费接口专属字段
 
@@ -323,9 +323,7 @@ AllPay 为客户提供统一的API接入,以帮助客户实 现快速、安全
 
 获取到tn后,根据本文档第7节调用SDK进行支付。
 
-
-
-3.二维码无跳转模式
+###### 5.3.3 二维码无跳转模式
 
  该模式返回生成二维码的字符串,商户需要自己生成二维码。
 
@@ -343,11 +341,9 @@ AllPay 为客户提供统一的API接入,以帮助客户实 现快速、安全
 | RespMsg  | String | M    | 应答消息                           |
 | code_url | String | O    | 二维码字符串。应答码为00返回该字段 |
 
-
-
 ##### 5.4 UP渠道
 
-1.H5支付,自适应PC和移动端
+###### 5.4.1 H5支付,自适应PC和移动端
 
  消费接口专属字段
 
@@ -355,7 +351,7 @@ AllPay 为客户提供统一的API接入,以帮助客户实 现快速、安全
 | --------- | ------ | ---- | ---- |
 | tradeFrom | String | M    | "H5" |
 
-2.APP支付
+###### 5.4.2 APP支付
 
  消费接口专属字段
 
@@ -373,9 +369,27 @@ AllPay 为客户提供统一的API接入,以帮助客户实 现快速、安全
 
 获取到tn后,根据本文档第7节调用SDK进行支付。
 
+```javascript
+测试卡:
+
+Credit Card: 5200831111111113
+Mobile: 13552535506
+CVN2: 123
+Exp Date: month 11 year 19
+SMS Code on PC: 111111
+SMS Code on Mobile: 123456
+
+Credit Card: 6226388000000095
+Mobile: 18100000000
+CVN2: 248
+Exp Date: month 12 year 19
+SMS Code on PC: 111111
+SMS Code on Mobile: 123456
+```
+
 ##### 5.5 Apple Pay渠道
 
-1.APP支付
+###### 5.5.1 APP支付
 
  消费接口专属字段
 
@@ -395,7 +409,7 @@ AllPay 为客户提供统一的API接入,以帮助客户实 现快速、安全
 
 ##### 5.6 CA渠道
 
-1.APP支付
+###### 5.6.1 APP支付
 
  消费接口专属字段
 

+ 48 - 12
AllPay_Integration_Specification_EN.md

@@ -212,7 +212,7 @@ This interface provides the function of refund transaction for access merchants.
 
 ##### 5.1 WX
 
-1.QR code no jump mode
+###### 5.1.1 QR code no jump mode
 
  This mode returns the URL value of WeChat payment collection for parameter return, ask the merchant to convert it into QR code, generate the front interface of payment, and prompt the user to scan the code to pay.
 
@@ -230,7 +230,7 @@ Response message:
 | RespMsg  | String | M    | Response message        |
 | code_url | String | O    | Characters to generate QR code. When RespCode=00 returns it. |
 
-2.QR code jump mode
+###### 5.1.2 QR code jump mode
 
 It's jump mode, open the front-end page provided by AllPay, which contains WeChat QR code.
 
@@ -240,7 +240,7 @@ It's jump mode, open the front-end page provided by AllPay, which contains WeCha
 | --------- | ------ | ---- | ------- |
 | tradeFrom | String | M    | "QUICK" |
 
-3.WeChat Official Accounts payment
+###### 5.1.3 WeChat Official Accounts payment
 
  Purchase interface specific fields
 
@@ -248,7 +248,7 @@ It's jump mode, open the front-end page provided by AllPay, which contains WeCha
 | --------- | ------ | ---- | ------- |
 | tradeFrom | String | M    | "JSAPI" |
 
-4.WeChat Mini Programs payment
+###### 5.1.4 WeChat Mini Programs payment
 
  Purchase interface specific fields
 
@@ -267,7 +267,7 @@ Response message:
 
 Parameter sdk_params is used to call up the WeChat Mini Programs payment. Please refer to the Mini Programs integration specification.
 
-5.APP mode
+###### 5.1.5 APP mode
 
  Purchase interface specific fields
 
@@ -287,7 +287,7 @@ After getting tn, call the SDK to pay according to Section 7 of this document.
 
 ##### 5.2 AP
 
-1.WebSite mode
+###### 5.2.1 WebSite mode
 
  Purchase interface specific fields
 
@@ -297,7 +297,7 @@ After getting tn, call the SDK to pay according to Section 7 of this document.
 
 ##### 5.3 APMP
 
-1.H5 mode
+###### 5.3.1 H5 mode
 
  Purchase interface specific fields
 
@@ -305,7 +305,7 @@ After getting tn, call the SDK to pay according to Section 7 of this document.
 | --------- | ------ | ---- | ------- |
 | tradeFrom | String | M    | "JSAPI" |
 
-2.APP mode
+###### 5.3.2 APP mode
 
  Purchase interface specific fields
 
@@ -323,9 +323,27 @@ Response message:
 
 After getting tn, call the SDK to pay according to Section 7 of this document.
 
+###### 5.3.3 QR code no jump mode
+
+ This mode returns the URL value of WeChat payment collection for parameter return, ask the merchant to convert it into QR code, generate the front interface of payment, and prompt the user to scan the code to pay.
+
+ Purchase interface specific fields
+
+| Parameter      | Type   | Required | Description     |
+| --------- | ------ | ---- | -------- |
+| tradeFrom | String | M    | "QRCODE" |
+
+Response message:
+
+| Parameter     | Type   | Required | Description                            |
+| -------- | ------ | ---- | ------------------------------- |
+| RespCode | String | M    | 00 stands for success; 01 stands for fail.                       |
+| RespMsg  | String | M    | Response message        |
+| code_url | String | O    | Characters to generate QR code. When RespCode=00 returns it. |
+
 ##### 5.4 UP
 
-1.H5 mode, adaptive PC and mobile
+###### 5.4.1 H5 mode, adaptive PC and mobile
 
  Purchase interface specific fields
 
@@ -333,7 +351,7 @@ After getting tn, call the SDK to pay according to Section 7 of this document.
 | --------- | ------ | ---- | ---- |
 | tradeFrom | String | M    | "H5" |
 
-2.APP mode
+###### 5.4.2 APP mode
 
  Purchase interface specific fields
 
@@ -351,9 +369,27 @@ Response message:
 
 After getting tn, call the SDK to pay according to Section 7 of this document.
 
+```javascript
+Test cards:
+
+Credit Card: 5200831111111113
+Mobile: 13552535506
+CVN2: 123
+Exp Date: month 11 year 19
+SMS Code on PC: 111111
+SMS Code on Mobile: 123456
+
+Credit Card: 6226388000000095
+Mobile: 18100000000
+CVN2: 248
+Exp Date: month 12 year 19
+SMS Code on PC: 111111
+SMS Code on Mobile: 123456
+```
+
 ##### 5.5 Apple Pay
 
-1.APP mode
+###### 5.5.1 APP mode
 
  Purchase interface specific fields
 
@@ -373,7 +409,7 @@ After getting tn, call the SDK to pay according to Section 7 of this document.
 
 ##### 5.6 CA
 
-1.APP mode
+###### 5.6.1 APP mode
 
  Purchase interface specific fields
 

+ 32 - 3
AllPay_Other_Integration_Specification_CH.md

@@ -17,13 +17,42 @@ AllPay 为客户提供统一的API接入,以帮助客户实 现快速、安全
 3.示例签名串  merID=000000000000015&signType=MD5&transID=MQkmUGAh3Gw2HEEi2f2c77e3718c47cfb47a89a6fbc9d361
 ```
 
-#### 3. API 接口
+#### 3. API 说明
 
-##### 3.1. 获取渠道流水信息接口
+##### 3.1. 汇率查询接口
+
+该接口提供银联、微信、支付宝渠道汇率查询的功能。
+
+| 测试环境地址                                  | 生产环境地址                              |
+| --------------------------------------------- | ----------------------------------------- |
+| https://test-sapi.allpayx.com/sapi/v1/get_exchange_rate | https://sapi.allpayx.com/sapi/v1/get_exchange_rate |
+
+1.请求交易参数
+
+| 参数      | 属性 | 描述                                  |
+| --------- | ---- | ------------------------------------- |
+| pid     | M    | 商户 ID,由 AllPay 分配                |
+| issuer   | M    | 汇率的提供机构,取值:UPI银联国际,ALP支付宝,WXP微信支付 |
+| original_currency  | M    | 源币种,取值:USD,HKD,....                 |
+| conversion_currency | M    | 转换币种,取值:CNY(当前仅支持CNY)                  |
+| sign_type  | M    | sha256                            |
+| sign | M    | 签名                  |
+
+2.成功交易返回参数
+
+| 参数      | 属性 | 描述                                  |
+| --------- | ---- | ------------------------------------- |
+| rate_date     | M    | 汇率日期,8位日期格式YYYYMMDD                |
+| issuer   | M    | 汇率的提供机构,取值:UPI银联国际,ALP支付宝,WXP微信支付 |
+| original_currency  | M    | 源币种,取值:USD,HKD,....                 |
+| conversion_currency | M    | 转换币种,取值:CNY(当前仅支持CNY)                  |
+| exchange_rate  | M    | 参考汇率值                            |
+
+##### 3.2. 获取渠道流水信息接口
 
 该接口提供通过transID查询渠道流水的功能。
 
-| 开发调试地址                                  | 生产交易地址                              |
+| 测试环境地址                                  | 生产环境地址                              |
 | --------------------------------------------- | ----------------------------------------- |
 | https://testapi.allpayx.com/api/schemaTransId | https://api.allpayx.com/api/schemaTransId |