Browse Source

修改接口文档

tao.zhou 5 years ago
parent
commit
41fab6df08

File diff suppressed because it is too large
+ 1 - 1
AllPay_Integration_Specification_CH.md


+ 1 - 1
AllPay_Integration_Specification_EN.md

@@ -12,7 +12,7 @@ AllPay provides customers with unified API access to help them implement fast, s
 
 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 (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.
+2.At the end of String1, the signature Key (assigned at AllPay upon access) agreed by both parties is spliced directly (no need to connect with "&"), resulting in a stringSignTemp string, and an encryption on stringSignTemp to get the value of signature.
 
 3.Sample signature string: acqID=99020344&backURL=https://www.allpayx.com&charSet=UTF-8&detailInfo=W3siZ29vZHNfbmFtZSI6IuiLueaenCIsInF1YW50aXR5IjoiMyJ9LHsiZ29vZHNfbmFtZSI6IuapmOWtkCIsInF1YW50aXR5IjoiNyJ9XQ==&frontURL=https://www.baidu.com&goodsInfo=apple&merID=000000000000015&merReserve=iPhone&orderAmount=0.01&orderCurrency=USD&orderNum=20190104022800&paymentSchema=AP&signType=MD5&transTime=20190104022800&transType=PURC&version=VER0000000022f2c77e3718c47cfb47a89a6fbc9d361
 

+ 11 - 11
v5/android/Android_Integration_Specification_CH.md

@@ -18,18 +18,18 @@ AllPay 为基于移动端 APP 支付的客户提供接入插件(下文简称“S
 
 商户网关将订单信息发送给 AllPay 网关,由 AllPay 网关进行处理后将交易流水号,即 tn,返回给商户网关,tn 作为调起手机 app 支付控件的参数。具体请参考[AllPay网关对接文档](https://git.allpayx.com/OpenAPI/common/src/master/AllPay_Integration_Specification_CH.md)
 
-启动支付控件的接口,接口定义如下:
+启动支付控件的接口,接口定义如下
 
 ```java
 public static void pay(Activity activity,String tn,boolean mode)
 ```
 
-::: tip 参数说明
+:::tip 参数说明
 activity —— 用于启动支付控件的活动对象
 
 tn —— 交易流水号,作为调起 sdk 支付的参数,商户从 AllPay 后台获取
 
-mode —— AllPay 后台环境标识,true表示从AllPay的正式环境发起交易,false表示从AllPay的测试环境发起交易
+mode —— AllPay 后台环境标识,true表示从AllPay的正式环境发起交易false表示从AllPay的测试环境发起交易
 :::
 
 ### 3.2 添加 SDK 包
@@ -50,7 +50,7 @@ repositories {
 
 ### 3.3 调用支付控件
 
-接着可以通过以下方式调用支付控件:
+接着可以通过以下方式调用支付控件
 
 ```java
 /**
@@ -62,7 +62,7 @@ AllPayEngine.Pay(ShopCartActivity.this, tn, false);
 
 ### 3.4 同步结果通知
 
-支付完成后,获取支付控件支付结果,并添加相应处理逻辑,只需实现调用 Activity 中的 onActivityResult()方法即可,实例代码如下:
+支付完成后,获取支付控件支付结果,并添加相应处理逻辑,只需实现调用 Activity 中的 onActivityResult()方法即可,实例代码如下
 
 ```java
 @Override
@@ -77,7 +77,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
 }
 ```
 
-pay_result,为 json 字符串,格式如下:
+pay_result 为 json 字符串,格式如下:
 
 ```text
 {
@@ -88,12 +88,12 @@ pay_result,为 json 字符串,格式如下:
 }
 ```
 
-报文说明:
+报文说明
 
-- state: "success"代表成功, "cancel"代表用户取消操作,"fail"代表失败,"query"代表 app 需要调用查询接口来确认订单状态
-- paymentSchema: 支付渠道, 详见[渠道列表](https://git.allpayx.com/OpenAPI/common/src/master/paymentSchema.md) 
-- orderNum: 订单号
-- errorDetail: 错误详情
+- state:"success"代表成功,"cancel"代表用户取消操作,"fail"代表失败,"query"代表 app 需要调用查询接口来确认订单状态
+- paymentSchema:支付渠道,详见[渠道列表](https://git.allpayx.com/OpenAPI/common/src/master/paymentSchema.md) 
+- orderNum订单号
+- errorDetail错误详情
 
 ## 4.渠道专属配置
 

+ 9 - 9
v5/ios/iOS_Integration_Specification_CH.md

@@ -16,9 +16,9 @@ AllPay 为基于移动端 APP 支付的客户提供接入插件(下文简称“S
 
 ### 3.1 接入说明 
 
-商户网关将订单信息发送给 AllPay 网关,由 AllPay 网关进行处理后将交易流水号,即 tn,返回给商户网关,tn 作为调起手机 app 支付控件的参数。[AllPay网关对接文档](https://git.allpayx.com/OpenAPI/common/src/master/AllPay_Integration_Specification_CH.md)
+商户网关将订单信息发送给 AllPay 网关,由 AllPay 网关进行处理后将交易流水号,即 tn,返回给商户网关,tn 作为调起手机 app 支付控件的参数。具体请参考[AllPay网关对接文档](https://git.allpayx.com/OpenAPI/common/src/master/AllPay_Integration_Specification_CH.md)
 
-启动支付控件的接口,接口定义如下:
+启动支付控件的接口,接口定义如下
 
 ```c
 [AllPaySDK pay:[diction objectForKey:@"tn"] mode:NO scheme:@"com.xxx.xxx" ViewController:self onResult: ^(NSDictionary *resultDic) {
@@ -33,16 +33,16 @@ tn: 交易流水号,作为调起 sdk 支付的参数,商户从 AllPay 后台
 
 mode:测试环境为NO,生产环境为YES。
 
-scheme: 可以为任意值,推荐填写成"com.xxx.xxx"形式, 有特殊配置的渠道会在渠道专属配置里面说明
+scheme: 可以为任意值,推荐填写成"com.xxx.xxx"形式有特殊配置的渠道会在渠道专属配置里面说明
 
-ViewController: 调用 SDK 时的 ViewController;
+ViewController: 调用 SDK 时的 ViewController
 
 onResult: 接收同步结果通知
 ```
 
 ### 3.2 添加 SDK 包
 
-1.将  allpaysdk 下的 AllPaySDK.h,libAllPaySDK.a文件添加到项目中
+1.将 allpaysdk 下的 AllPaySDK.h,libAllPaySDK.a文件添加到项目中
 
 2.在 APPDelegate.m 类中导入头文件: #import "allpaysdk/AllPaySDK.h",并添加如下方法
 
@@ -78,7 +78,7 @@ onResult: 接收同步结果通知
  }];
 ```
 
-resultDic,转为 json 字符串,格式如下:
+resultDic,转为 json 字符串,格式如下
 
 {
   "state": "cancel",
@@ -91,8 +91,8 @@ resultDic,转为 json 字符串,格式如下:
 
 | 参数          |                             说明                             |
 | ------------- | ---------------------------------------------------------- |
-| state         | "success"代表成功, "cancel"代表用户取消操作, "fail"代表失败  |
-| paymentSchema | 支付渠道, 详见[渠道列表](https://git.allpayx.com/OpenAPI/common/src/master/paymentSchema.md) |
+| state         | "success"代表成功,"cancel"代表用户取消操作,"fail"代表失败  |
+| paymentSchema | 支付渠道详见[渠道列表](https://git.allpayx.com/OpenAPI/common/src/master/paymentSchema.md) |
 | orderNum      | 订单号 |
 | errorDetail   | 错误详情 |
 
@@ -150,7 +150,7 @@ resultDic,转为 json 字符串,格式如下:
    CoreMotion. .framework
    ```
 
-3.点击项目名称,点击“Info”选项卡,在“URL Types”选项中,点击“+”,在“URL Schemes”中输入alipay,如图标红位置所示
+3.点击项目名称,点击“Info”选项卡,在“URL Types”选项中,点击“+”,在“URL Schemes”中输入alipay,如图标红位置所示:
 
   ![image](https://git.allpayx.com/OpenAPI/common/raw/master/images/ios_wx_01.jpg)