소스 검색

Merge branch 'master' of https://git.allpayx.com/OpenAPI/common

benson 4 년 전
부모
커밋
c947e0f6dd

+ 12 - 13
AllPay_Customs_Integration_Specification_CH.md

@@ -187,18 +187,17 @@ signature: 51aebe009a06d79c23524ea18fc2f413
 
 | 海关名称                                                     | 海关编码               |
 | ------------------------------------------------------------ | ---------------------- |
-| 总署                                                          | ZONGSHU                |
-| 杭州海关                                                     | HANGZHOU_ZONGSHU       |
-| 河南保税物流中心                                             | ZHENGZHOU              |
-| 新郑综合保税区(空港)(先推送HENAN,再推送ZONGSHU)            | HENAN        |
-| 宁波海关                                                     | NINGBO                 |
-| 上海海关                                                     | SHANGHAI_CBT           |
-| 南沙国检                                                     | NANSHAGJ               |
-| 天津海关(先推送TIANJIN,再推送ZONGSHU)                       | TIANJIN     |
-| 广州海关(机场)(推送广州机场国检,备案信息需要传企业在广电的备案信息)| GUANGZHOU_AIRPORT   |
-| 广州海关(南沙)(推送广州南沙国检,备案信息需要传企业在广电的备案信息)| GUANGZHOU_NANSHA   |
-| 广州海关(黄埔)(推送广州黄埔国检,备案信息需要传企业在广电的备案信息)| GUANGZHOU_HUANGPU   |
-| 广州海关(沙田)(推送广州沙田国检,备案信息需要传企业在广电的备案信息)| GUANGZHOU_SHATIAN   |
+| 总署 | ZONGSHU                |
+| 河南保税物流中心 | ZHENGZHOU              |
+| 宁波海关 | NINGBO                 |
+| 新郑综合保税区(空港)(先推送HENAN,再推送ZONGSHU) | HENAN        |
+| 天津海关 | ZONGSHU     |
+| 上海海关 | SHANGHAI_CBT           |
+| 广州海关(机场)(推送广州机场国检,备案信息需要传企业在广电的备案信息)| ZONGSHU   |
+| 广州海关(南沙)(推送广州南沙国检,备案信息需要传企业在广电的备案信息)| ZONGSHU   |
+| 广州海关(黄埔)(推送广州黄埔国检,备案信息需要传企业在广电的备案信息)| ZONGSHU   |
+| 广州海关(沙田)(推送广州沙田国检,备案信息需要传企业在广电的备案信息)| ZONGSHU   |
+| 杭州海关 | ZONGSHU       |
 
 ### 4.2 微信海关列表
 
@@ -214,7 +213,7 @@ signature: 51aebe009a06d79c23524ea18fc2f413
 | 上海(总署版)                                               | SHANGHAI_ZS     |
 | 深圳                                                         | SHENZHEN        |
 | 郑州综保(总署版)                                           | ZHENGZHOU_ZH_ZS |
-| 天津                                                         | TIANJIN         |
+| 天津(推送订单至天津海关时,需要在商户管理后台同时配置天津海关备案信息与天津国检备案信息;调用报关接口时只需推送天津海关,即请求一次报关接口。) | TIANJIN |
 
 ### 4.3 银联海关列表
 

+ 8 - 9
AllPay_Customs_Integration_Specification_EN.md

@@ -188,17 +188,16 @@ Supported request methods including POST and GET, supported parameter formats in
 | Customs name | Customs code |
 | ---------- | ------------- |
 | General Administration of Customs | ZONGSHU |
-| Hangzhou | HANGZHOU_ZONGSHU |
 | Henan Bonded Logistics Center | ZHENGZHOU |
-| Xinzheng Comprehensive Bonded Zone (Airport) (Push HENAN first, then ZONGSHU) | HENAN |
 | Ningbo | NINGBO |
+| Xinzheng Comprehensive Bonded Zone (Airport) (Push HENAN first, then ZONGSHU) | HENAN |
+| Tianjin | ZONGSHU |
 | Shanghai | SHANGHAI_CBT |
-| Nansha National Inspection | NANSHAGJ |
-| Tianjin (first push TIANJIN, then ZONGSHU) | TIANJIN |
-| Guangzhou (Airport) (Need to fill in the company's filing information in Guangzhou Electronic Port) | GUANGZHOU_AIRPORT |
-| Guangzhou (Nansha) (Need to fill in the company's filing information in Guangzhou Electronic Port)| GUANGZHOU_NANSHA |
-| Guangzhou (Huangpu) (Need to fill in the company's filing information in Guangzhou Electronic Port)| GUANGZHOU_HUANGPU |
-| Guangzhou (Shatian) (Need to fill in the company's filing information in Guangzhou Electronic Port)| GUANGZHOU_SHATIAN |
+| Guangzhou (Airport) (Need to fill in the company's filing information in Guangzhou Electronic Port) | ZONGSHU |
+| Guangzhou (Nansha) (Need to fill in the company's filing information in Guangzhou Electronic Port)| ZONGSHU |
+| Guangzhou (Huangpu) (Need to fill in the company's filing information in Guangzhou Electronic Port)| ZONGSHU |
+| Guangzhou (Shatian) (Need to fill in the company's filing information in Guangzhou Electronic Port)| ZONGSHU |
+| Hangzhou | ZONGSHU |
 
 ### 4.2 WeChat Pay customs list
 
@@ -214,7 +213,7 @@ Supported request methods including POST and GET, supported parameter formats in
 | Shanghai (General Administration Edition) | SHANGHAI_ZS |
 | Shenzhen | SHENZHEN |
 | Zhengzhou Comprehensive Insurance (General Administration Edition) | ZHENGZHOU_ZH_ZS |
-| Tianjin | TIANJIN |
+| Tianjin (When pushing an order to Tianjin Customs, you need to configure both Tianjin Customs filing information and Tianjin National Inspection filing information in the merchant management background; when calling the customs declaration interface, you only need to push Tianjin Customs, that is, request a customs declaration interface.) | TIANJIN |
 
 ### 4.3 UnionPay customs list
 

+ 43 - 42
AllPay_Other_Integration_Specification_CH.md

@@ -1,18 +1,18 @@
-# AllPay其他接口文档V1.0.0
-[上海偶可贝网络科技有限公司](https://www.allpayx.com)
+# GoAllPay其他接口文档V1.0.0
+[上海偶可贝网络科技有限公司](https://www.goallpayx.com)
 
 * 版本信息:中文 V1.0.0
-* 更新时间:2019 年2 月
+* 更新时间:2020 年 12 月
 
 ## 1.概述
 
-AllPay 为客户提供统一的API接入,以帮助客户实 现快速、安全、集中式的接入支付渠道
+GoAllPay 为客户提供统一的 API 接入,以帮助客户实现快速、安全、集中式的接入服务
 
 ## 2.验签说明 
 ```
-1. 对于发送到 AllPay 系统的请求报文,其中所有传入参数(除 signature 参数外)按照字段名的 ASCII 码从小到大排序后(字典序),使用 URL 键值对的格式(即 key1=value1&key2=value2...)拼接成字符串 String1。
+1. 对于发送到 GoAllPay 系统的请求报文,其中所有传入参数(除 signature 参数外)按照字段名的 ASCII 码从小到大排序后(字典序),使用 URL 键值对的格式(即 key1=value1&key2=value2...)拼接成字符串 String1。
 
-2. 在 String1 最后直接拼接(不需要用“&”连接)双方约定的签名密钥 Key(接入 AllPay 时分配),得到 stringSignTemp 字符串,并对 stringSignTemp 进行加密运算,得到 signature 的值。
+2. 在 String1 最后直接拼接(不需要用“&”连接)双方约定的签名密钥 Key(接入 GoAllPay 时分配),得到 stringSignTemp 字符串,并对 stringSignTemp 进行加密运算,得到 signature 的值。
 
 3. 签名过程示例:
 String1: merID=000000000000015&signType=MD5&transID=MQkmUGAh3Gw2HEEi
@@ -22,38 +22,9 @@ signature: 16d93a9ac6ca89bfdefb018924f11965
 
 ## 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查询渠道流水的功能。
+该接口可通过支付响应中的transID查询渠道流水相关信息。
 
 | 测试环境地址                                  | 生产环境地址                              |
 | --------------------------------------------- | ----------------------------------------- |
@@ -63,8 +34,8 @@ signature: 16d93a9ac6ca89bfdefb018924f11965
 
 | 参数      | 类型       | 属性 | 描述                                  |
 | --------- | ---------- | ---- | ------------------------------------- |
-| merID     | String(15) | M    | 商户 ID,由AllPay 分配                |
-| transID   | String(6)  | M    | GW 系统生成的交易 ID,由AllPay系统返回 |
+| merID     | String(15) | M    | 商户 ID,由 GoAllPay 分配                |
+| transID   | String(6)  | M    | GW 系统生成的交易 ID,由 GoAllPay 系统返回 |
 | signType  | String(10) | M    | MD5或SHA256                            |
 | signature | String(60) | M    | 采用 MD5或SHA256 签名                  |
 
@@ -72,18 +43,48 @@ signature: 16d93a9ac6ca89bfdefb018924f11965
 
 | 参数           | 类型       | 属性 | 描述                                                         |
 | -------------- | ---------- | ---- | ------------------------------------------------------------ |
-| merID          | String(12) | M    | 商户 ID,由AllPay 分配                                       |
+| merID          | String(12) | M    | 商户 ID,由 GoAllPay 分配                                       |
 | orderNum       | String(6)  | M    | 商户订单号                                                   |
-| allpayOrderNum | String(4)  | M    | AllPay系统的转换商户订单号                                   |
-| schemaTransId  | String(60) | M    | 支付渠道的交易ID                                             |
+| allpayOrderNum | String(4)  | M    | GoAllPay系统的转换商户订单号                                   |
+| schemaTransId  | String(60) | O    | 支付渠道的交易ID                                             |
 | billCurrency   | String(3)  | O    | 扣账币种:“CNY”。目前只有支付宝和微信有值,其他渠道为空。 |
 | billAmount     | String(12) | O    | 扣账金额:人民币金额。目前只有支付宝和微信有值,其他渠道为空。 |
+| truncatePan     | String(32) | O   | 截断卡号。目前只支持外卡 |
 | paymentTime    | String(14) | O    | 支付完成时间,格式:"yyyyMMddHHmmss" |
 | transID        | String(32) | M    | GW 系统生成的交易 ID,每笔交易保持唯一                       |
 | paymentSchema  | String(10) | M    | 渠道代码:[点击这里](paymentSchema.md) |
 | RespCode       | String(2)  | M    | 应答码 00-成功                                               |
 | RespMsg        | String(20) | M    | 应答消息                                                     |
 
+### 3.2 汇率查询接口
+
+该接口提供银联、微信、支付宝渠道汇率查询的功能。
+
+| 测试环境地址                                  | 生产环境地址                              |
+| --------------------------------------------- | ----------------------------------------- |
+| https://test-sapi.allpayx.com/sapi/v1/get_exchange_rate | https://sapi.allpayx.com/sapi/v1/get_exchange_rate |
+
+1.请求交易参数
+
+| 参数      | 属性 | 描述                                  |
+| --------- | ---- | ------------------------------------- |
+| pid     | M    | 商户 ID,由 GoAllPay 分配 |
+| 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    | 参考汇率值                            |
+
 ## 4.应答码 
 
 | 应答码 | 描  述       |

+ 3 - 1
countrycode.md

@@ -18,7 +18,7 @@ p24|Przelewy24 only works for the countrycode "PL" and currencies "PLN" and "EUR
 safetypay|SafetyPay only works for country codes "AT", "BE", "BR", "CL", "CR", "DE", "EC", "ES", "MX", "NL", "PE" and currencies "EUR", "USD".
 qiwi|QIWI Payout only works for the countrycodes "RU", "KZ" and "UA", and - depending on your contract - currency "RUB" , "EUR" ,"KZT" and "USD".
 sepaddmodela|SEPA Direct Debit works for all SEPA countries and currency EUR.
-skrill|Skrill works for worldwide and currency EUR. In addition, the account holder name passed in the request has to be in the format <firstname><space><lastname>, with lastname having a minimum length of two characters and the total string a minimum length of five. Multiple first names are ok, valid examples are "John Dorian", "William Charles Dickinson". If these conditions are not met, the system will not accept the request.
+skrill|Skrill works for worldwide and currency EUR. In addition, the account holder name passed in the request has to be in the format &lt;firstname&gt;&lt;space&gt;&lt;lastname&gt;, with lastname having a minimum length of two characters and the total string a minimum length of five. Multiple first names are ok, valid examples are "John Dorian", "William Charles Dickinson". If these conditions are not met, the system will not accept the request.
 eps|eps only works for the countrycode "AT" and currency "EUR".
 ideal|iDEAL only works for the countrycode "NL" and currency "EUR".
 mybank|MyBank only works for the country code IT and currency EUR.
@@ -30,3 +30,5 @@ pagofacil|Pago Facil (Argentina) is available for currency USD and country code
 rapipago|Rapi Pago (Argentina) is available for currency USD and country code AR.
 konbini|Konbini only works for country code "JP" and currency "JPY".
 payeasy|Pay-easy only works for country code "JP" and currency "JPY".
+doku|DOKU Wallet only works for the countrycode "ID" and currency "IDR".
+ovo|OVO only works for the countrycode "ID" and currency "IDR".

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 102 - 71
payExclusive_CH.md


+ 144 - 124
v5/android/Android_Integration_Specification_CH.md

@@ -1,124 +1,144 @@
-# Android端控件支付产品接口规范文档V5.0.0
-
-[上海偶可贝网络科技有限公司](https://www.allpayx.com)
-
-* 版本信息:中文 V5.0.0
-* 更新时间:2019年4月
-
-## 1.概述
-
-AllPay 为基于移动端 APP 支付的客户提供接入插件(下文简称“SDK”),以帮助客户实现快速、安全、集中式的接入支付渠道。
-
-## 2.交易流程 
-  ![image](https://git.allpayx.com/OpenAPI/b2c/raw/master/images/moble_sdk_flowsheet.png)
-
-## 3.Android 客户端接入步骤 
-
-### 3.1 接入说明 
-
-商户网关将订单信息发送给 AllPay 网关,由 AllPay 网关进行处理后将交易流水号,即 tn,返回给商户网关,tn 作为调起手机 app 支付控件的参数。具体请参考[AllPay网关对接文档](../../AllPay_Integration_Specification_CH.md)
-
-启动支付控件的接口,接口定义如下:
-
-```java
-public static void pay(Activity activity,String tn,boolean mode)
-```
-
-:::tip 参数说明
-activity —— 用于启动支付控件的活动对象
-
-tn —— 交易流水号,作为调起 sdk 支付的参数,商户从 AllPay 后台获取
-
-mode —— AllPay 后台环境标识,true表示从AllPay的正式环境发起交易,false表示从AllPay的测试环境发起交易
-:::
-
-### 3.2 添加 SDK 包
-
-1.把allpaysdk.arr 拷贝到项目的libs下面
-
-2.在Application Module的build.gradle文件的dependencies下添加compile(name: 'allpaysdk', ext: 'aar')
-
-3.在Application Module的build.gradle文件中添加
-
-```java
-repositories {
-    flatDir {
-         dirs 'libs'
-    }
-}
-```
-
-### 3.3 调用支付控件
-
-接着可以通过以下方式调用支付控件:
-
-```java
-/**
- * tn——交易流水号,作为调起 sdk 支付的参数,商户从 AllPay 后台获取
- * false代表测试环境,true代表生产环境
- */
-AllPayEngine.Pay(ShopCartActivity.this, tn, false);
-```
-
-### 3.4 同步结果通知
-
-支付完成后,获取支付控件支付结果,并添加相应处理逻辑,只需实现调用 Activity 中的 onActivityResult()方法即可,实例代码如下:
-
-```java
-@Override
-protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-    if (data == null) {
-        return;
-    }
-
-    if (requestCode == AllPayConst.VTPAY_PAY_REQUESR_CODE&& resultCode == AllPayConst.VTPAY_PAY_RESULT_CODE) {
-        String result = data.getExtras().getString("pay_result");
-    }
-}
-```
-
-pay_result 为 json 字符串,格式如下:
-
-```text
-{
-    "state": "cancel",
-    "paymentSchema": "UP",
-    "orderNum": "604337497032",
-    "errorDetail": "user cancel operation "
-}
-```
-
-报文说明:
-
-- state:"success"代表成功,"cancel"代表用户取消操作,"fail"代表失败,"query"代表 app 需要调用查询接口来确认订单状态
-- paymentSchema:支付渠道,详见[渠道列表](../../paymentSchema.md) 
-- orderNum:订单号
-- errorDetail:错误详情
-
-## 4.渠道专属配置
-
-### 4.1 WX渠道
-
-  在Application Module的build.gradle文件的dependencies下添加
-
-  ```
-  compile 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+'
-  ```
-
-### 4.2 AP渠道
-
-1.把alipaySdk.arr 拷贝到项目的libs下面
-
-2.在Application Module的build.gradle文件的dependencies下添加
-
-```
-compile(name: 'alipaySdk', ext: 'aar')
-```
-
-## 5.SDK下载
-
-[安卓SDK下载地址](android_sdk.zip)
-
-## 6.技术支持
-
-如果您在调试时遇到问题,请与我们联系:support@allpayx.com
+# Android端控件支付产品接口规范文档V5.0.0
+
+[上海偶可贝网络科技有限公司](https://www.allpayx.com)
+
+* 版本信息:中文 V5.0.0
+* 更新时间:2019年4月
+
+## 1.概述
+
+AllPay 为基于移动端 APP 支付的客户提供接入插件(下文简称“SDK”),以帮助客户实现快速、安全、集中式的接入支付渠道。
+
+## 2.交易流程 
+  ![image](https://git.allpayx.com/OpenAPI/b2c/raw/master/images/moble_sdk_flowsheet.png)
+
+## 3.Android 客户端接入步骤 
+
+### 3.1 接入说明 
+
+商户网关将订单信息发送给 AllPay 网关,由 AllPay 网关进行处理后将交易流水号,即 tn,返回给商户网关,tn 作为调起手机 app 支付控件的参数。具体请参考[AllPay网关对接文档](../../AllPay_Integration_Specification_CH.md)
+
+启动支付控件的接口,接口定义如下:
+
+```java
+public static void pay(Activity activity,String tn,boolean mode)
+```
+
+:::tip 参数说明
+activity —— 用于启动支付控件的活动对象
+
+tn —— 交易流水号,作为调起 sdk 支付的参数,商户从 AllPay 后台获取
+
+mode —— AllPay 后台环境标识,true表示从AllPay的正式环境发起交易,false表示从AllPay的测试环境发起交易
+:::
+
+### 3.2 添加 SDK 包
+
+1.把allpaysdk.arr 拷贝到项目的libs下面
+
+2.在Application Module的build.gradle文件的dependencies下添加compile(name: 'allpaysdk', ext: 'aar')
+
+3.在Application Module的build.gradle文件中添加
+
+```java
+repositories {
+    flatDir {
+         dirs 'libs'
+    }
+}
+```
+
+### 3.3 调用支付控件
+
+接着可以通过以下方式调用支付控件:
+
+```java
+/**
+ * tn——交易流水号,作为调起 sdk 支付的参数,商户从 AllPay 后台获取
+ * false代表测试环境,true代表生产环境
+ */
+AllPayEngine.Pay(ShopCartActivity.this, tn, false);
+```
+
+### 3.4 同步结果通知
+
+支付完成后,获取支付控件支付结果,并添加相应处理逻辑,只需实现调用 Activity 中的 onActivityResult()方法即可,实例代码如下:
+
+```java
+@Override
+protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+    if (data == null) {
+        return;
+    }
+
+    if (requestCode == AllPayConst.VTPAY_PAY_REQUESR_CODE&& resultCode == AllPayConst.VTPAY_PAY_RESULT_CODE) {
+        String result = data.getExtras().getString("pay_result");
+    }
+}
+```
+
+pay_result 为 json 字符串,格式如下:
+
+```text
+{
+    "state": "cancel",
+    "paymentSchema": "UP",
+    "orderNum": "604337497032",
+    "errorDetail": "user cancel operation "
+}
+```
+
+报文说明:
+
+- state:"success"代表成功,"cancel"代表用户取消操作,"fail"代表失败,"query"代表 app 需要调用查询接口来确认订单状态
+- paymentSchema:支付渠道,详见[渠道列表](../../paymentSchema.md) 
+- orderNum:订单号
+- errorDetail:错误详情
+
+## 4.渠道专属配置
+
+### 4.1 WX渠道
+
+ (1) 在Application Module的build.gradle文件的dependencies下添加
+
+  ```
+  compile 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+'
+  ```
+  
+ (2)  在主项目的AndroidManifest.xml中添加下面配置
+ ```
+   <!-- wpay sdk begin -->
+
+
+        <activity
+            android:name="com.allpayx.sdk.wxapi.WXPayEntryActivity"
+            android:exported="true"
+            android:launchMode="singleTop" />
+
+
+        <activity-alias
+            android:name=".wxapi.WXPayEntryActivity"
+            android:exported="true"
+            android:launchMode="singleTop"
+            android:targetActivity="com.allpayx.sdk.wxapi.WXPayEntryActivity" />
+
+        <!-- wpay sdk end -->
+ ```
+
+### 4.2 AP渠道
+
+1.把alipaySdk.arr 拷贝到项目的libs下面
+
+2.在Application Module的build.gradle文件的dependencies下添加
+
+```
+compile(name: 'alipaySdk', ext: 'aar')
+```
+
+## 5.SDK下载
+
+[安卓SDK下载地址](android_sdk.zip)
+
+## 6.技术支持
+
+如果您在调试时遇到问题,请与我们联系:support@allpayx.com