tao.zhou 4 years ago
parent
commit
07748779a5
46 changed files with 6693 additions and 6693 deletions
  1. 255 255
      AllPay_Customs_Integration_Specification_EN.md
  2. 631 631
      AllPay_Integration_Specification_CH.md
  3. 637 637
      AllPay_Integration_Specification_EN.md
  4. 62 62
      India_Netbanking_BankCode.md
  5. 20 20
      RevPayBankCode.md
  6. 37 37
      bindCardPayExclusive_CH.md
  7. 35 35
      bindCardPayExclusive_EN.md
  8. 32 32
      countrycode.md
  9. 549 549
      payExclusive_CH.md
  10. 542 542
      payExclusive_EN.md
  11. 19 19
      paymentSchema.md
  12. 118 118
      preAuthorizationExclusive_CH.md
  13. 117 117
      preAuthorizationExclusive_EN.md
  14. 10 10
      v5/android/android_sdk/Demo/.gitignore
  15. 1 1
      v5/android/android_sdk/Demo/app/.gitignore
  16. 44 44
      v5/android/android_sdk/Demo/app/build.gradle
  17. 25 25
      v5/android/android_sdk/Demo/app/proguard-rules.pro
  18. 26 26
      v5/android/android_sdk/Demo/app/src/androidTest/java/com/vtpayment/plugin/ExampleInstrumentedTest.java
  19. 47 47
      v5/android/android_sdk/Demo/app/src/main/AndroidManifest.xml
  20. 209 209
      v5/android/android_sdk/Demo/app/src/main/java/com/vtpayment/plugin/MainActivity.java
  21. 53 53
      v5/android/android_sdk/Demo/app/src/main/java/com/vtpayment/plugin/util/EncoderUtil.java
  22. 22 22
      v5/android/android_sdk/Demo/app/src/main/java/com/vtpayment/plugin/util/JsonUtil.java
  23. 30 30
      v5/android/android_sdk/Demo/app/src/main/java/com/vtpayment/plugin/util/PayOrder.java
  24. 64 64
      v5/android/android_sdk/Demo/app/src/main/java/com/vtpayment/plugin/util/PayUtil.java
  25. 18 18
      v5/android/android_sdk/Demo/app/src/main/res/drawable/buy_button_bg.xml
  26. 242 242
      v5/android/android_sdk/Demo/app/src/main/res/layout/activity_main.xml
  27. 6 6
      v5/android/android_sdk/Demo/app/src/main/res/values/colors.xml
  28. 13 13
      v5/android/android_sdk/Demo/app/src/main/res/values/strings.xml
  29. 11 11
      v5/android/android_sdk/Demo/app/src/main/res/values/styles.xml
  30. 16 16
      v5/android/android_sdk/Demo/app/src/test/java/com/vtpayment/plugin/ExampleUnitTest.java
  31. 24 24
      v5/android/android_sdk/Demo/build.gradle
  32. 17 17
      v5/android/android_sdk/Demo/gradle.properties
  33. 6 6
      v5/android/android_sdk/Demo/gradle/wrapper/gradle-wrapper.properties
  34. 160 160
      v5/android/android_sdk/Demo/gradlew
  35. 1 1
      v5/android/android_sdk/Demo/settings.gradle
  36. 799 799
      v5/ios/ios_sdk/Demo/Demo.xcodeproj/project.pbxproj
  37. 14 14
      v5/ios/ios_sdk/Demo/Demo/Demo.entitlements
  38. 84 84
      v5/ios/ios_sdk/Demo/Demo/Info.plist
  39. 1 1
      v5/ios/ios_sdk/Demo/Demo/allpaysdk/AliModule/AlipaySDK.bundle/bridge.js
  40. 56 56
      v5/ios/ios_sdk/Demo/Demo/allpaysdk/AliModule/AlipaySDK.framework/Headers/AFServiceCenter.h
  41. 43 43
      v5/ios/ios_sdk/Demo/Demo/allpaysdk/AliModule/AlipaySDK.framework/Headers/AFServiceResponse.h
  42. 33 33
      v5/ios/ios_sdk/Demo/Demo/allpaysdk/AliModule/AlipaySDK.framework/Headers/APayAuthInfo.h
  43. 223 223
      v5/ios/ios_sdk/Demo/Demo/allpaysdk/AliModule/AlipaySDK.framework/Headers/AlipaySDK.h
  44. 198 198
      v5/ios/ios_sdk/Demo/Demo/allpaysdk/WXModule/WXApi.h
  45. 1075 1075
      v5/ios/ios_sdk/Demo/Demo/allpaysdk/WXModule/WXApiObject.h
  46. 68 68
      v5/ios/ios_sdk/Demo/Demo/allpaysdk/WXModule/WechatAuthSDK.h

+ 255 - 255
AllPay_Customs_Integration_Specification_EN.md

@@ -1,256 +1,256 @@
-# GoAllPay customs declaration interface specification document V5.0.0
-[Shanghai GoAllPay Technology Co., Ltd.](https://www.goallpayx.com)
-
-* Version: English V5.0.0
-* Update Time: 2020/07
-
-## 1.Overview
-
-This document specifies the message interface used for online transactions of customs declaration products between merchants and GoAllPay.
-
-## 2.Description of verifying the signature 
-
-```
-1. For the request message sent to the GoAllPay 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 GoAllPay 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. Example of signing process: 
-
-String1: IDCard=411422199808080415&acqID=99020344&charSet=UTF-8&customerAccount=ab123456&customs_code=3302462548&customs_name=AAAA&customs_place=CUSTOMSHEADOFFICE&merID=000000000000015&merReserve=dd&name=shi kai feng&orderCurrency=CNY&orderNum=kfvWipRWHEboJPh71m7lXkUILutt&origOrderNum=VzVJhPdX18tDu3vgGfNOIgh71LjY&paymentSchema=UP&productPrice=80&signType=MD5&transTime=20181229171552&transType=DECL&transportPrice=10&version=VER000000005
-
-stringSignTemp: IDCard=411422199808080415&acqID=99020344&charSet=UTF-8&customerAccount=ab123456&customs_code=3302462548&customs_name=AAAA&customs_place=CUSTOMSHEADOFFICE&merID=000000000000015&merReserve=dd&name=shi kai feng&orderCurrency=CNY&orderNum=kfvWipRWHEboJPh71m7lXkUILutt&origOrderNum=VzVJhPdX18tDu3vgGfNOIgh71LjY&paymentSchema=UP&productPrice=80&signType=MD5&transTime=20181229171552&transType=DECL&transportPrice=10&version=VER0000000052f2c77e3718c47cfb47a89a6fbc9d361
-
-signature: 51aebe009a06d79c23524ea18fc2f413
-```
-
-## 3.API description 
-
-GoAllPay Customs declaration-related APIs, including declaration, declaration query, and declaration update.
-
-### 3.1 General API access URL 
-
-| Interface Name | Test URL | Production URL |
-| ------- | -------------- | ---------- |
-| Declaration | https://testapi.allpayx.com/custom/declare | https://api.allpayx.com/custom/declare |
-| Declaration Query | https://testapi.allpayx.com/custom/query   | https://api.allpayx.com/custom/query |
-| Declaration Update | https://testapi.allpayx.com/custom/update | https://api.allpayx.com/custom/update |
-
-### 3.2 Declaration Interface
-
-**1.Request parameters**
-
-| parameter | Type | Required | Description |
-| --------------- | ----------- | ---- | --------------------- |
-| version       | String(12)   | M    | "VER000000005" |
-| charSet       | String(6)    | M    | "UTF-8" |
-| transType       | String(4)   | M    | Transaction type: "DECL"  |
-| customsDeclarationNo | String(60)  | O    | The customs declaration order number is defined by the merchant. <br>Note: Alipay and WeChat can choose to send this field, but UnionPay cannot send this field. If Alipay and WeChat do not send this field, they will use orderNum as the customs declaration order number. |
-| orderNum        | String(60)  | M    | Transaction ID: defined by the merchant, it is necessary to ensure that the transaction ID under the same merchant number cannot be repeated. |
-| origOrderNum    | String(60)  | M    | Order number for successful payment |
-| productPrice    | String(12)  | M    | Commodity amount: such as 100CNY, expressed as 100 or 100.00 |
-| transportPrice  | String(12)  | M    | Shipping amount:such as 100CNY, expressed as 100 or 100.00 |
-| tarPrice        | String(12)  | M    | Tariff amount:such as 100CNY, expressed as 100 or 100.00 |
-| orderCurrency   | String(3)   | M    | Currency of the order: only "CNY" |
-| customs_code    | String(64)  | M    | Merchant Customs Record Code |
-| customs_name    | String(128) | M    | Merchant Customs Record Name |
-| customs_place   | String(128) | M    | Customs code, see Annex 1 Customs List for details |
-| name            | String(64)  | M    | Consumer name |
-| IDCard          | String(32)  | M    | Consumer ID number |
-| customerAccount | String(64)  | M    | Consumer's registered account at the merchant |
-| businessType    | String(2)   | O    | Bonded import: 1<br>Direct import: 2<br>If you don’t fill in, the default is 1 Bonded Import. |
-| merID           | String(15)  | M    | Merchant ID, assigned by GoAllPay |
-| acqID           | String(11)  | M    | Acquiring Bank ID: "99020344" |
-| paymentSchema   | String(10)  | M    | Channel ID.<br>UnionPay:UP<br>WeChat Pay:WX<br>Alipay:AP |
-| transTime       | String(14)  | M    | Transaction time, format :" yyyyMMddHHmmss" |
-| signType        | String(10)  | M    | "MD5" or "SHA256" |
-| signature       | String(32)  | M    | MD5 or SHA256 signature |
-
-**2.Response parameters**
-
-| Parameter          | Type         | Required | Description          |
-| -------------- | ----------- | ---- | --------------------------------------------- |
-| version       | String(12)   | M    | "VER000000005" |
-| charSet       | String(6)    | M    | "UTF-8" |
-| transType      | String(4)   | M    | "DECL" |
-| orderNum       | String(60)  | M    | Transaction ID  |
-| RespCode       | String(2)   | M    | Response Code. "00" stands for success. See Annex 2 for details.  |
-| RespMsg        | String(128) | M    | Response Message. |
-| customs_code   | String(64)  | M    | Merchant Customs Record Code |
-| customs_name   | String(128) | M    | Merchant Customs Record Name |
-| customs_place  | String(128) | M    | Customs code, see Annex 1 Customs List for details. |
-| allpayOrderNum | String(64)  | M    | Conversion merchant order number of GoAllPay system. |
-| schemaTransId  | String(64)  | M    | The transaction ID of the payment channel.<br/>Note: UnionPay customs declaration needs to use this field as the customs declaration number of the logistics and sales orders. |
-| merID          | String(15)  | M    | Merchant ID, assigned by GoAllPay |
-| acqID          | String(11)  | M    | Acquiring Bank ID: "99020344" |
-| paymentSchema   | String(10)  | M    | Channel ID.<br>UnionPay:UP<br>WeChat Pay:WX<br>Alipay:AP |
-| transTime       | String(14)  | M    | Transaction time, format :" yyyyMMddHHmmss" |
-| signType        | String(10)  | M    | "MD5" or "SHA256" |
-| signature       | String(32)  | M    | MD5 or SHA256 signature |
-
-### 3.3 Declaration Query Interface
-
-**1.Request parameters**
-
-| Parameter | Type | Required | Description |
-| ------------- | ---------- | ---- | --------------------------------------------- |
-| version       | String(12)   | M    | "VER000000005" |
-| charSet       | String(6)    | M    | "UTF-8" |
-| transType     | String(4)  | M    | Transaction type: "INQY"  |
-| orderNum      | String(60) | M    | Transaction ID |
-| merID         | String(15) | M    | Merchant ID, assigned by GoAllPay. |
-| acqID         | String(11) | M    | Acquiring Bank ID: "99020344" |
-| paymentSchema   | String(10)  | M    | Channel ID.<br>UnionPay:UP<br>WeChat Pay:WX<br>Alipay:AP |
-| transTime       | String(14)  | M    | Transaction time, format :" yyyyMMddHHmmss" |
-| signType        | String(10)  | M    | "MD5" or "SHA256" |
-| signature       | String(32)  | M    | MD5 or SHA256 signature |
-
-**2.Response parameters**
-
-| Parameter  | Type | Required | Description |
-| ------------- | ----------- | ---- | --------------------- |
-| version       | String(12)   | M    | "VER000000005" |
-| charSet       | String(6)    | M    | "UTF-8" |
-| transType      | String(4)   | M    | "DECL"|
-| orderNum       | String(60)  | M    | Transaction ID |
-| RespCode       | String(2)   | M    | Response Code. "00" stands for success. See Annex 2 for details. |
-| RespMsg        | String(128) | M    | Response Message. |
-| customs_code   | String(64)  | M    | Merchant Customs Record Code |
-| customs_name   | String(128) | M    | Merchant Customs Record Name |
-| customs_place  | String(128) | M    | Customs code, see Annex 1 Customs List for details. |
-| allpayOrderNum | String(64)  | M    | Conversion merchant order number of GoAllPay system. |
-| schemaTransId  | String(64)  | M    | The transaction ID of the payment channel. |
-| merID          | String(15)  | M    | Merchant ID, assigned by GoAllPay. |
-| acqID          | String(11)  | M    | Acquiring Bank ID: "99020344" |
-| paymentSchema   | String(10)  | M    | Channel ID.<br>UnionPay:UP<br>WeChat Pay:WX<br>Alipay:AP |
-| transTime       | String(14)  | M    | Transaction time, format :" yyyyMMddHHmmss" |
-| signType        | String(10)  | M    | "MD5" or "SHA256" |
-| signature       | String(32)  | M    | MD5 or SHA256 signature |
-
-### 3.4 Declaration Update Interface
-
-**1.Request parameters**
-
-| Parameter | Type | Required | Description |
-| ----------- | ----------- | ---- | ----------- |
-| version | String(12)   | M    | "VER000000005" |
-| charSet | String(6)    | M    | "UTF-8" |
-| transType | String(4)   | M    | Transaction type: "DECL"  |
-| customsDeclarationNo | String(60)  | O    | The customs declaration order number is defined by the merchant. <br>Note: Alipay and WeChat can choose to send this field, but UnionPay cannot send this field. If Alipay and WeChat do not send this field, they will use orderNum as the customs declaration order number. |
-| orderNum        | String(60)  | M    | Transaction ID in the declaration interface. |
-| origOrderNum    | String(60)  | M    | Order number for successful payment |
-| productPrice    | String(12)  | M    | Commodity amount: such as 100CNY, expressed as 100 or 100.00 |
-| transportPrice  | String(12)  | M    | Shipping amount:such as 100CNY, expressed as 100 or 100.00 |
-| tarPrice        | String(12)  | M    | Tariff amount:such as 100CNY, expressed as 100 or 100.00 |
-| orderCurrency   | String(3)   | M    | Currency of the order: only "CNY" |
-| customs_code    | String(64)  | M    | Merchant Customs Record Code |
-| customs_name    | String(128) | M    | Merchant Customs Record Name |
-| customs_place   | String(128) | M    | Customs code, see Annex 1 Customs List for details |
-| name            | String(64)  | M    | Consumer name |
-| IDCard          | String(32)  | M    | Consumer ID number |
-| customerAccount | String(64)  | M    | Consumer's registered account at the merchant |
-| businessType    | String(2)   | O    | Bonded import: 1<br>Direct import: 2<br>If you don’t fill in, the default is 1 Bonded Import. |
-| merID           | String(15)  | M    | Merchant ID, assigned by GoAllPay |
-| acqID           | String(11)  | M    | Acquiring Bank ID: "99020344" |
-| paymentSchema   | String(10)  | M    | Channel ID.<br>UnionPay:UP<br>WeChat Pay:WX<br>Alipay:AP |
-| transTime       | String(14)  | M    | Transaction time, format :" yyyyMMddHHmmss" |
-| signType        | String(10)  | M    | "MD5" or "SHA256" |
-| signature       | String(32)  | M    | MD5 or SHA256 signature |
-
-**2.Response parameters**
-
-| Parameter          | Type         | Required | Description          |
-| -------------- | ----------- | ---- | -------------------------- |
-| version       | String(12)   | M    | "VER000000005" |
-| charSet       | String(6)    | M    | "UTF-8" |
-| transType      | String(4)   | M    | "DECL" |
-| orderNum       | String(60)  | M    | Transaction ID |
-| RespCode       | String(2)   | M    | Response Code. "00" stands for success. See Annex 2 for details. |
-| RespMsg        | String(128) | M    | Response Message. |
-| customs_code   | String(64)  | M    | Merchant Customs Record Code |
-| customs_name   | String(128) | M    | Merchant Customs Record Name |
-| customs_place  | String(128) | M    | Customs code, see Annex 1 Customs List for details. |
-| allpayOrderNum | String(64)  | M    | Conversion merchant order number of GoAllPay system. |
-| schemaTransId  | String(64)  | M    | The transaction ID of the payment channel. |
-| merID          | String(15)  | M    | Merchant ID, assigned by GoAllPay. |
-| acqID          | String(11)  | M    | Acquiring Bank ID: "99020344" |
-| paymentSchema   | String(10)  | M    | Channel ID.<br>UnionPay:UP<br>WeChat Pay:WX<br>Alipay:AP |
-| transTime       | String(14)  | M    | Transaction time, format :" yyyyMMddHHmmss" |
-| signType        | String(10)  | M    | "MD5" or "SHA256" |
-| signature       | String(32)  | M    | MD5 or SHA256 signature |
-
-## 4.Annex 1 Customs List
-
-### 4.1 Alipay customs list
-
-| 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 |
-| 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 |
-
-### 4.2 WeChat Pay customs list
-
-| Customs name | Customs code |
-| ----------- | -------- |
-| Guangzhou (General Administration Edition) | GUANGZHOU_ZS |
-| Guangzhou Huangpu National Inspection (Orders pushed to Huangpu National Inspection need to be pushed to Guangzhou (General Administration version) and Guangzhou Huangpu National Inspection respectively, that is, two customs declaration interfaces need to be requested) | GUANGZHOU_HP_GJ |
-| Guangzhou Nansha National Inspection (Orders pushed to Nansha National Inspection need to be pushed to Guangzhou (General Administration version) and Guangzhou Nansha National Inspection respectively, that is, two customs declaration interfaces need to be requested) | GUANGZHOU_NS_GJ |
-| Hangzhou (General Administration Edition) | HANGZHOU_ZS |
-| Ningbo | NINGBO |
-| Zhengzhou (Bonded Logistics Center) | ZHENGZHOU_BS |
-| Chongqing | CHONGQING |
-| Shanghai (General Administration Edition) | SHANGHAI_ZS |
-| Shenzhen | SHENZHEN |
-| Zhengzhou Comprehensive Insurance (General Administration Edition) | ZHENGZHOU_ZH_ZS |
-| Tianjin | TIANJIN |
-
-### 4.3 UnionPay customs list
-
-| Customs name | Customs code |
-| ----------- | -------- |
-| General Administration of Customs | CUSTOMSHEADOFFICE |
-| Beijing | CUSTOMSHEADOFFICE |
-| Guangzhou | GUANGZHOU |
-| Ningbo | NINGBO |
-| Shanghai | SHANGHAI |
-
-The above list of customs is the customs that supports customs declaration through API for each payment channel. The actual support situation is subject to the update of each payment channel.
-
-## 5.Annex 2 Response code
-
-| RespCode | Description      |
-| ------ | --------- |
-| 00     | Success |
-| 01     | Fail |
-| 04     | Processing |
-| 61     | Exceed the limit |
-| U1     | Merchant ID is not exsit |
-| U2     | Signature is not correct |
-| U3     | Message is tampered |
-| U4     | Missing parameter   |
-| U5     | Invalid parameter |
-| U6     | Repeat order number |
-| U7     | Order is not exist  |
-| U8     | Parameter is null   |
-| U9     | System error   |
-| P1     | Channel is not setted  |
-| P2     | Currency is not setted  |
-| E1     | Identity information does not match |
-
-***Note: If the response code is 04 when using Unionpay custom declaration, it means the declaration is still processing now. Merchant needs to to call the declaration query API to get the final status later.**
-
-## 6.Technical support
-
+# GoAllPay customs declaration interface specification document V5.0.0
+[Shanghai GoAllPay Technology Co., Ltd.](https://www.goallpayx.com)
+
+* Version: English V5.0.0
+* Update Time: 2020/07
+
+## 1.Overview
+
+This document specifies the message interface used for online transactions of customs declaration products between merchants and GoAllPay.
+
+## 2.Description of verifying the signature 
+
+```
+1. For the request message sent to the GoAllPay 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 GoAllPay 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. Example of signing process: 
+
+String1: IDCard=411422199808080415&acqID=99020344&charSet=UTF-8&customerAccount=ab123456&customs_code=3302462548&customs_name=AAAA&customs_place=CUSTOMSHEADOFFICE&merID=000000000000015&merReserve=dd&name=shi kai feng&orderCurrency=CNY&orderNum=kfvWipRWHEboJPh71m7lXkUILutt&origOrderNum=VzVJhPdX18tDu3vgGfNOIgh71LjY&paymentSchema=UP&productPrice=80&signType=MD5&transTime=20181229171552&transType=DECL&transportPrice=10&version=VER000000005
+
+stringSignTemp: IDCard=411422199808080415&acqID=99020344&charSet=UTF-8&customerAccount=ab123456&customs_code=3302462548&customs_name=AAAA&customs_place=CUSTOMSHEADOFFICE&merID=000000000000015&merReserve=dd&name=shi kai feng&orderCurrency=CNY&orderNum=kfvWipRWHEboJPh71m7lXkUILutt&origOrderNum=VzVJhPdX18tDu3vgGfNOIgh71LjY&paymentSchema=UP&productPrice=80&signType=MD5&transTime=20181229171552&transType=DECL&transportPrice=10&version=VER0000000052f2c77e3718c47cfb47a89a6fbc9d361
+
+signature: 51aebe009a06d79c23524ea18fc2f413
+```
+
+## 3.API description 
+
+GoAllPay Customs declaration-related APIs, including declaration, declaration query, and declaration update.
+
+### 3.1 General API access URL 
+
+| Interface Name | Test URL | Production URL |
+| ------- | -------------- | ---------- |
+| Declaration | https://testapi.allpayx.com/custom/declare | https://api.allpayx.com/custom/declare |
+| Declaration Query | https://testapi.allpayx.com/custom/query   | https://api.allpayx.com/custom/query |
+| Declaration Update | https://testapi.allpayx.com/custom/update | https://api.allpayx.com/custom/update |
+
+### 3.2 Declaration Interface
+
+**1.Request parameters**
+
+| parameter | Type | Required | Description |
+| --------------- | ----------- | ---- | --------------------- |
+| version       | String(12)   | M    | "VER000000005" |
+| charSet       | String(6)    | M    | "UTF-8" |
+| transType       | String(4)   | M    | Transaction type: "DECL"  |
+| customsDeclarationNo | String(60)  | O    | The customs declaration order number is defined by the merchant. <br>Note: Alipay and WeChat can choose to send this field, but UnionPay cannot send this field. If Alipay and WeChat do not send this field, they will use orderNum as the customs declaration order number. |
+| orderNum        | String(60)  | M    | Transaction ID: defined by the merchant, it is necessary to ensure that the transaction ID under the same merchant number cannot be repeated. |
+| origOrderNum    | String(60)  | M    | Order number for successful payment |
+| productPrice    | String(12)  | M    | Commodity amount: such as 100CNY, expressed as 100 or 100.00 |
+| transportPrice  | String(12)  | M    | Shipping amount:such as 100CNY, expressed as 100 or 100.00 |
+| tarPrice        | String(12)  | M    | Tariff amount:such as 100CNY, expressed as 100 or 100.00 |
+| orderCurrency   | String(3)   | M    | Currency of the order: only "CNY" |
+| customs_code    | String(64)  | M    | Merchant Customs Record Code |
+| customs_name    | String(128) | M    | Merchant Customs Record Name |
+| customs_place   | String(128) | M    | Customs code, see Annex 1 Customs List for details |
+| name            | String(64)  | M    | Consumer name |
+| IDCard          | String(32)  | M    | Consumer ID number |
+| customerAccount | String(64)  | M    | Consumer's registered account at the merchant |
+| businessType    | String(2)   | O    | Bonded import: 1<br>Direct import: 2<br>If you don’t fill in, the default is 1 Bonded Import. |
+| merID           | String(15)  | M    | Merchant ID, assigned by GoAllPay |
+| acqID           | String(11)  | M    | Acquiring Bank ID: "99020344" |
+| paymentSchema   | String(10)  | M    | Channel ID.<br>UnionPay:UP<br>WeChat Pay:WX<br>Alipay:AP |
+| transTime       | String(14)  | M    | Transaction time, format :" yyyyMMddHHmmss" |
+| signType        | String(10)  | M    | "MD5" or "SHA256" |
+| signature       | String(32)  | M    | MD5 or SHA256 signature |
+
+**2.Response parameters**
+
+| Parameter          | Type         | Required | Description          |
+| -------------- | ----------- | ---- | --------------------------------------------- |
+| version       | String(12)   | M    | "VER000000005" |
+| charSet       | String(6)    | M    | "UTF-8" |
+| transType      | String(4)   | M    | "DECL" |
+| orderNum       | String(60)  | M    | Transaction ID  |
+| RespCode       | String(2)   | M    | Response Code. "00" stands for success. See Annex 2 for details.  |
+| RespMsg        | String(128) | M    | Response Message. |
+| customs_code   | String(64)  | M    | Merchant Customs Record Code |
+| customs_name   | String(128) | M    | Merchant Customs Record Name |
+| customs_place  | String(128) | M    | Customs code, see Annex 1 Customs List for details. |
+| allpayOrderNum | String(64)  | M    | Conversion merchant order number of GoAllPay system. |
+| schemaTransId  | String(64)  | M    | The transaction ID of the payment channel.<br/>Note: UnionPay customs declaration needs to use this field as the customs declaration number of the logistics and sales orders. |
+| merID          | String(15)  | M    | Merchant ID, assigned by GoAllPay |
+| acqID          | String(11)  | M    | Acquiring Bank ID: "99020344" |
+| paymentSchema   | String(10)  | M    | Channel ID.<br>UnionPay:UP<br>WeChat Pay:WX<br>Alipay:AP |
+| transTime       | String(14)  | M    | Transaction time, format :" yyyyMMddHHmmss" |
+| signType        | String(10)  | M    | "MD5" or "SHA256" |
+| signature       | String(32)  | M    | MD5 or SHA256 signature |
+
+### 3.3 Declaration Query Interface
+
+**1.Request parameters**
+
+| Parameter | Type | Required | Description |
+| ------------- | ---------- | ---- | --------------------------------------------- |
+| version       | String(12)   | M    | "VER000000005" |
+| charSet       | String(6)    | M    | "UTF-8" |
+| transType     | String(4)  | M    | Transaction type: "INQY"  |
+| orderNum      | String(60) | M    | Transaction ID |
+| merID         | String(15) | M    | Merchant ID, assigned by GoAllPay. |
+| acqID         | String(11) | M    | Acquiring Bank ID: "99020344" |
+| paymentSchema   | String(10)  | M    | Channel ID.<br>UnionPay:UP<br>WeChat Pay:WX<br>Alipay:AP |
+| transTime       | String(14)  | M    | Transaction time, format :" yyyyMMddHHmmss" |
+| signType        | String(10)  | M    | "MD5" or "SHA256" |
+| signature       | String(32)  | M    | MD5 or SHA256 signature |
+
+**2.Response parameters**
+
+| Parameter  | Type | Required | Description |
+| ------------- | ----------- | ---- | --------------------- |
+| version       | String(12)   | M    | "VER000000005" |
+| charSet       | String(6)    | M    | "UTF-8" |
+| transType      | String(4)   | M    | "DECL"|
+| orderNum       | String(60)  | M    | Transaction ID |
+| RespCode       | String(2)   | M    | Response Code. "00" stands for success. See Annex 2 for details. |
+| RespMsg        | String(128) | M    | Response Message. |
+| customs_code   | String(64)  | M    | Merchant Customs Record Code |
+| customs_name   | String(128) | M    | Merchant Customs Record Name |
+| customs_place  | String(128) | M    | Customs code, see Annex 1 Customs List for details. |
+| allpayOrderNum | String(64)  | M    | Conversion merchant order number of GoAllPay system. |
+| schemaTransId  | String(64)  | M    | The transaction ID of the payment channel. |
+| merID          | String(15)  | M    | Merchant ID, assigned by GoAllPay. |
+| acqID          | String(11)  | M    | Acquiring Bank ID: "99020344" |
+| paymentSchema   | String(10)  | M    | Channel ID.<br>UnionPay:UP<br>WeChat Pay:WX<br>Alipay:AP |
+| transTime       | String(14)  | M    | Transaction time, format :" yyyyMMddHHmmss" |
+| signType        | String(10)  | M    | "MD5" or "SHA256" |
+| signature       | String(32)  | M    | MD5 or SHA256 signature |
+
+### 3.4 Declaration Update Interface
+
+**1.Request parameters**
+
+| Parameter | Type | Required | Description |
+| ----------- | ----------- | ---- | ----------- |
+| version | String(12)   | M    | "VER000000005" |
+| charSet | String(6)    | M    | "UTF-8" |
+| transType | String(4)   | M    | Transaction type: "DECL"  |
+| customsDeclarationNo | String(60)  | O    | The customs declaration order number is defined by the merchant. <br>Note: Alipay and WeChat can choose to send this field, but UnionPay cannot send this field. If Alipay and WeChat do not send this field, they will use orderNum as the customs declaration order number. |
+| orderNum        | String(60)  | M    | Transaction ID in the declaration interface. |
+| origOrderNum    | String(60)  | M    | Order number for successful payment |
+| productPrice    | String(12)  | M    | Commodity amount: such as 100CNY, expressed as 100 or 100.00 |
+| transportPrice  | String(12)  | M    | Shipping amount:such as 100CNY, expressed as 100 or 100.00 |
+| tarPrice        | String(12)  | M    | Tariff amount:such as 100CNY, expressed as 100 or 100.00 |
+| orderCurrency   | String(3)   | M    | Currency of the order: only "CNY" |
+| customs_code    | String(64)  | M    | Merchant Customs Record Code |
+| customs_name    | String(128) | M    | Merchant Customs Record Name |
+| customs_place   | String(128) | M    | Customs code, see Annex 1 Customs List for details |
+| name            | String(64)  | M    | Consumer name |
+| IDCard          | String(32)  | M    | Consumer ID number |
+| customerAccount | String(64)  | M    | Consumer's registered account at the merchant |
+| businessType    | String(2)   | O    | Bonded import: 1<br>Direct import: 2<br>If you don’t fill in, the default is 1 Bonded Import. |
+| merID           | String(15)  | M    | Merchant ID, assigned by GoAllPay |
+| acqID           | String(11)  | M    | Acquiring Bank ID: "99020344" |
+| paymentSchema   | String(10)  | M    | Channel ID.<br>UnionPay:UP<br>WeChat Pay:WX<br>Alipay:AP |
+| transTime       | String(14)  | M    | Transaction time, format :" yyyyMMddHHmmss" |
+| signType        | String(10)  | M    | "MD5" or "SHA256" |
+| signature       | String(32)  | M    | MD5 or SHA256 signature |
+
+**2.Response parameters**
+
+| Parameter          | Type         | Required | Description          |
+| -------------- | ----------- | ---- | -------------------------- |
+| version       | String(12)   | M    | "VER000000005" |
+| charSet       | String(6)    | M    | "UTF-8" |
+| transType      | String(4)   | M    | "DECL" |
+| orderNum       | String(60)  | M    | Transaction ID |
+| RespCode       | String(2)   | M    | Response Code. "00" stands for success. See Annex 2 for details. |
+| RespMsg        | String(128) | M    | Response Message. |
+| customs_code   | String(64)  | M    | Merchant Customs Record Code |
+| customs_name   | String(128) | M    | Merchant Customs Record Name |
+| customs_place  | String(128) | M    | Customs code, see Annex 1 Customs List for details. |
+| allpayOrderNum | String(64)  | M    | Conversion merchant order number of GoAllPay system. |
+| schemaTransId  | String(64)  | M    | The transaction ID of the payment channel. |
+| merID          | String(15)  | M    | Merchant ID, assigned by GoAllPay. |
+| acqID          | String(11)  | M    | Acquiring Bank ID: "99020344" |
+| paymentSchema   | String(10)  | M    | Channel ID.<br>UnionPay:UP<br>WeChat Pay:WX<br>Alipay:AP |
+| transTime       | String(14)  | M    | Transaction time, format :" yyyyMMddHHmmss" |
+| signType        | String(10)  | M    | "MD5" or "SHA256" |
+| signature       | String(32)  | M    | MD5 or SHA256 signature |
+
+## 4.Annex 1 Customs List
+
+### 4.1 Alipay customs list
+
+| 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 |
+| 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 |
+
+### 4.2 WeChat Pay customs list
+
+| Customs name | Customs code |
+| ----------- | -------- |
+| Guangzhou (General Administration Edition) | GUANGZHOU_ZS |
+| Guangzhou Huangpu National Inspection (Orders pushed to Huangpu National Inspection need to be pushed to Guangzhou (General Administration version) and Guangzhou Huangpu National Inspection respectively, that is, two customs declaration interfaces need to be requested) | GUANGZHOU_HP_GJ |
+| Guangzhou Nansha National Inspection (Orders pushed to Nansha National Inspection need to be pushed to Guangzhou (General Administration version) and Guangzhou Nansha National Inspection respectively, that is, two customs declaration interfaces need to be requested) | GUANGZHOU_NS_GJ |
+| Hangzhou (General Administration Edition) | HANGZHOU_ZS |
+| Ningbo | NINGBO |
+| Zhengzhou (Bonded Logistics Center) | ZHENGZHOU_BS |
+| Chongqing | CHONGQING |
+| Shanghai (General Administration Edition) | SHANGHAI_ZS |
+| Shenzhen | SHENZHEN |
+| Zhengzhou Comprehensive Insurance (General Administration Edition) | ZHENGZHOU_ZH_ZS |
+| Tianjin | TIANJIN |
+
+### 4.3 UnionPay customs list
+
+| Customs name | Customs code |
+| ----------- | -------- |
+| General Administration of Customs | CUSTOMSHEADOFFICE |
+| Beijing | CUSTOMSHEADOFFICE |
+| Guangzhou | GUANGZHOU |
+| Ningbo | NINGBO |
+| Shanghai | SHANGHAI |
+
+The above list of customs is the customs that supports customs declaration through API for each payment channel. The actual support situation is subject to the update of each payment channel.
+
+## 5.Annex 2 Response code
+
+| RespCode | Description      |
+| ------ | --------- |
+| 00     | Success |
+| 01     | Fail |
+| 04     | Processing |
+| 61     | Exceed the limit |
+| U1     | Merchant ID is not exsit |
+| U2     | Signature is not correct |
+| U3     | Message is tampered |
+| U4     | Missing parameter   |
+| U5     | Invalid parameter |
+| U6     | Repeat order number |
+| U7     | Order is not exist  |
+| U8     | Parameter is null   |
+| U9     | System error   |
+| P1     | Channel is not setted  |
+| P2     | Currency is not setted  |
+| E1     | Identity information does not match |
+
+***Note: If the response code is 04 when using Unionpay custom declaration, it means the declaration is still processing now. Merchant needs to to call the declaration query API to get the final status later.**
+
+## 6.Technical support
+
 If you have problems with debugging, please contact us: support@allpayx.com

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


File diff suppressed because it is too large
+ 637 - 637
AllPay_Integration_Specification_EN.md


+ 62 - 62
India_Netbanking_BankCode.md

@@ -1,63 +1,63 @@
-# BankCode list
-| Bank Name                              | Bank Code |
-| ------------------------------------- | -------- |
-| Aditya Birla Idea Payments Bank        | ABPB      |
-| Airtel Payments Bank                   | AIRP      |
-| Allahabad Bank                         | ALLA      |
-| Andhra Bank                            | ANDB      |
-| Bank of Baroda - Retail Banking        | BARB_R    |
-| Bank of Bahrein and Kuwait             | BBKM      |
-| Dena Bank                              | BKDN      |
-| Bank of India                          | BKID      |
-| Central Bank of India                  | CBIN      |
-| City Union Bank                        | CIUB      |
-| Canara Bank                            | CNRB      |
-| Corporation Bank                       | CORP      |
-| Cosmos Co-operative Bank               | COSB      |
-| Catholic Syrian Bank                   | CSBK      |
-| Development Bank of Singapore          | DBSS      |
-| DCB Bank                               | DCBL      |
-| Deutsche Bank                          | DEUT      |
-| Dhanlaxmi Bank                         | DLXB      |
-| Equitas Small Finance Bank             | ESFB      |
-| Federal Bank                           | FDRL      |
-| HDFC Bank                              | HDFC      |
-| IDBI                                   | IBKL      |
-| ICICI Bank                             | ICIC      |
-| IDFC FIRST Bank                        | IDFB      |
-| Indian Bank                            | IDIB      |
-| Indusind Bank                          | INDB      |
-| Indian Overseas Bank                   | IOBA      |
-| Jammu and Kashmir Bank                 | JAKA      |
-| Janata Sahakari Bank (Pune)            | JSBP      |
-| Karnataka Bank                         | KARB      |
-| Kotak Mahindra Bank                    | KKBK      |
-| Karur Vysya Bank                       | KVBL      |
-| Lakshmi Vilas Bank - Corporate Banking | LAVB_C    |
-| Lakshmi Vilas Bank - Retail Banking    | LAVB_R    |
-| Bank of Maharashtra                    | MAHB      |
-| NKGSB Co-operative Bank                | NKGS      |
-| Oriental Bank of Commerce              | ORBC      |
-| Punjab & Maharashtra Co-operative Bank | PMCB      |
-| Punjab & Sind Bank                     | PSIB      |
-| Punjab National Bank - Retail Banking  | PUNB_R    |
-| RBL Bank                               | RATN      |
-| State Bank of Bikaner and Jaipur       | SBBJ      |
-| State Bank of Hyderabad                | SBHY      |
-| State Bank of India                    | SBIN      |
-| State Bank of Mysore                   | SBMY      |
-| State Bank of Travancore               | SBTR      |
-| Standard Chartered Bank                | SCBL      |
-| South Indian Bank                      | SIBL      |
-| Saraswat Co-operative Bank             | SRCB      |
-| State Bank of Patiala                  | STBP      |
-| Shamrao Vithal Co-operative Bank       | SVCB      |
-| Syndicate Bank                         | SYNB      |
-| Tamilnadu Mercantile Bank              | TMBL      |
-| Tamilnadu State Apex Co-operative Bank | TNSC      |
-| Union Bank of India                    | UBIN      |
-| UCO Bank                               | UCBA      |
-| United Bank of India                   | UTBI      |
-| Axis Bank                              | UTIB      |
-| Vijaya Bank                            | VIJB      |
+# BankCode list
+| Bank Name                              | Bank Code |
+| ------------------------------------- | -------- |
+| Aditya Birla Idea Payments Bank        | ABPB      |
+| Airtel Payments Bank                   | AIRP      |
+| Allahabad Bank                         | ALLA      |
+| Andhra Bank                            | ANDB      |
+| Bank of Baroda - Retail Banking        | BARB_R    |
+| Bank of Bahrein and Kuwait             | BBKM      |
+| Dena Bank                              | BKDN      |
+| Bank of India                          | BKID      |
+| Central Bank of India                  | CBIN      |
+| City Union Bank                        | CIUB      |
+| Canara Bank                            | CNRB      |
+| Corporation Bank                       | CORP      |
+| Cosmos Co-operative Bank               | COSB      |
+| Catholic Syrian Bank                   | CSBK      |
+| Development Bank of Singapore          | DBSS      |
+| DCB Bank                               | DCBL      |
+| Deutsche Bank                          | DEUT      |
+| Dhanlaxmi Bank                         | DLXB      |
+| Equitas Small Finance Bank             | ESFB      |
+| Federal Bank                           | FDRL      |
+| HDFC Bank                              | HDFC      |
+| IDBI                                   | IBKL      |
+| ICICI Bank                             | ICIC      |
+| IDFC FIRST Bank                        | IDFB      |
+| Indian Bank                            | IDIB      |
+| Indusind Bank                          | INDB      |
+| Indian Overseas Bank                   | IOBA      |
+| Jammu and Kashmir Bank                 | JAKA      |
+| Janata Sahakari Bank (Pune)            | JSBP      |
+| Karnataka Bank                         | KARB      |
+| Kotak Mahindra Bank                    | KKBK      |
+| Karur Vysya Bank                       | KVBL      |
+| Lakshmi Vilas Bank - Corporate Banking | LAVB_C    |
+| Lakshmi Vilas Bank - Retail Banking    | LAVB_R    |
+| Bank of Maharashtra                    | MAHB      |
+| NKGSB Co-operative Bank                | NKGS      |
+| Oriental Bank of Commerce              | ORBC      |
+| Punjab & Maharashtra Co-operative Bank | PMCB      |
+| Punjab & Sind Bank                     | PSIB      |
+| Punjab National Bank - Retail Banking  | PUNB_R    |
+| RBL Bank                               | RATN      |
+| State Bank of Bikaner and Jaipur       | SBBJ      |
+| State Bank of Hyderabad                | SBHY      |
+| State Bank of India                    | SBIN      |
+| State Bank of Mysore                   | SBMY      |
+| State Bank of Travancore               | SBTR      |
+| Standard Chartered Bank                | SCBL      |
+| South Indian Bank                      | SIBL      |
+| Saraswat Co-operative Bank             | SRCB      |
+| State Bank of Patiala                  | STBP      |
+| Shamrao Vithal Co-operative Bank       | SVCB      |
+| Syndicate Bank                         | SYNB      |
+| Tamilnadu Mercantile Bank              | TMBL      |
+| Tamilnadu State Apex Co-operative Bank | TNSC      |
+| Union Bank of India                    | UBIN      |
+| UCO Bank                               | UCBA      |
+| United Bank of India                   | UTBI      |
+| Axis Bank                              | UTIB      |
+| Vijaya Bank                            | VIJB      |
 | Yes Bank                               | YESB      |

+ 20 - 20
RevPayBankCode.md

@@ -1,21 +1,21 @@
-# BankCode list
-|No | Bank Code| Description|
-|---- | ----| ------|
-| 1 | ABB0233 |Affin Bank Berhad                     |
-| 2 | ABMB0212| Alliance Bank Malaysia Berhad        |
-| 3 | AMBB0209| AmBank Malaysia Berhad               |
-| 4 | BIMB0340| Bank Islam Malaysia Berhad           |
-| 5 | BKRM0602| Bank Kerjasama Rakyat Malaysia Berhad|
-| 6 | BMMB0341| Bank Muamalat Malaysia Berhad        |
-| 7 | BSN0601 |Bank Simpanan Nasional                |
-| 8 | BCBB0235| CIMB Bank Berhad                     |
-| 9 | HLB0224 |Hong Leong Bank Berhad                |
-| 10 | HSBC0223| HSBC Bank Malaysia Berhad           |
-| 11 | KFH0346 |Kuwait Finance House (Malaysia) Berhad|
-| 12 | MB2U0227| Malayan Banking Berhad (M2U)         |
-| 13 | MBB0228 |Malayan Banking Berhad (M2E)          |
-| 14 | OCBC0229| OCBC Bank Malaysia Berhad            |
-| 15 | PBB0233 |Public Bank Berhad                    |
-| 16 | RHB0218 |RHB Bank Berhad                       |
-| 17 | SCB0216 |Standard Chartered Bank               |
+# BankCode list
+|No | Bank Code| Description|
+|---- | ----| ------|
+| 1 | ABB0233 |Affin Bank Berhad                     |
+| 2 | ABMB0212| Alliance Bank Malaysia Berhad        |
+| 3 | AMBB0209| AmBank Malaysia Berhad               |
+| 4 | BIMB0340| Bank Islam Malaysia Berhad           |
+| 5 | BKRM0602| Bank Kerjasama Rakyat Malaysia Berhad|
+| 6 | BMMB0341| Bank Muamalat Malaysia Berhad        |
+| 7 | BSN0601 |Bank Simpanan Nasional                |
+| 8 | BCBB0235| CIMB Bank Berhad                     |
+| 9 | HLB0224 |Hong Leong Bank Berhad                |
+| 10 | HSBC0223| HSBC Bank Malaysia Berhad           |
+| 11 | KFH0346 |Kuwait Finance House (Malaysia) Berhad|
+| 12 | MB2U0227| Malayan Banking Berhad (M2U)         |
+| 13 | MBB0228 |Malayan Banking Berhad (M2E)          |
+| 14 | OCBC0229| OCBC Bank Malaysia Berhad            |
+| 15 | PBB0233 |Public Bank Berhad                    |
+| 16 | RHB0218 |RHB Bank Berhad                       |
+| 17 | SCB0216 |Standard Chartered Bank               |
 | 18 | UOB0226 |United Overseas Bank                  |

+ 37 - 37
bindCardPayExclusive_CH.md

@@ -1,38 +1,38 @@
-## 渠道专属配置
-
-### 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 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
 ```

+ 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 | M    | "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 | M    | "API"             |
-| cardno     | String | M    | Card number              |
-| cvv2       | String | M    | cvv2              |
-| ExpiryDate | String | M    | 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 | M    | "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 | M    | "API"             |
+| cardno     | String | M    | Card number              |
+| cvv2       | String | M    | cvv2              |
+| ExpiryDate | String | M    | Validity period: Format MM / YY |
+
+```javascript
+Test card:
+
+Card Number: 4761340000000019
+Expiry Date: 1217
+CVV2: 830
+
+Card Number: 5204730000002555
+Expiry Date: 1225
+CVV2: 123
 ```

File diff suppressed because it is too large
+ 32 - 32
countrycode.md


File diff suppressed because it is too large
+ 549 - 549
payExclusive_CH.md


File diff suppressed because it is too large
+ 542 - 542
payExclusive_EN.md


+ 19 - 19
paymentSchema.md

@@ -1,19 +1,19 @@
-# Channel list
-Channel name  |Channel ID
- -----|----
-WeChat Pay |WX
-Alipay |AP
-UnionPay |UP
-Apple Pay |APP
-CCAvenue |CA
-Mi Pay |MIPAY
-Easebuzz |EB
-PassPay |PF
-International card |FC
-Alipay HK |APHK
-RevPay |RevPay 
-AliPayLocal |AliPayLocal
-PO |PO
-India_Netbanking |India_Netbanking
-PayPal|PAYPAL
-
+# Channel list
+Channel name  |Channel ID
+ -----|----
+WeChat Pay |WX
+Alipay |AP
+UnionPay |UP
+Apple Pay |APP
+CCAvenue |CA
+Mi Pay |MIPAY
+Easebuzz |EB
+PassPay |PF
+International card |FC
+Alipay HK |APHK
+RevPay |RevPay 
+AliPayLocal |AliPayLocal
+PO |PO
+India_Netbanking |India_Netbanking
+PayPal|PAYPAL
+

+ 118 - 118
preAuthorizationExclusive_CH.md

@@ -1,119 +1,119 @@
-## 渠道专属配置
-
-### 1 UP渠道
-
-#### 1.1 H5支付,自适应PC和移动端
-
- 预授权接口专属字段
-
-| 参数      | 类型   | 属性 | 描述 |
-| --------- | ------ | ---- | ---- |
-| tradeFrom | String | M    | "H5" |
-
-#### 1.2 APP支付
-
- 预授权接口专属字段
-
-| 参数      | 类型   | 属性 | 描述  |
-| --------- | ------ | ---- | ----- |
-| tradeFrom | String | M    | "APP" |
-
-应答报文:
-
-| 参数     | 类型   | 属性 | 描述                                                      |
-| -------- | ------ | ---- | ------------------------------------------------------- |
-| RespCode | String | M    | 应答码 00-成功                                           |
-| RespMsg  | String | M    | 应答消息                                                 |
-| tn       | String | O    | 交易流水号,RespCode为“00”时返回,作为调起 sdk 支付的参数 |
-
-获取到tn后,根据APP对接文档调用SDK进行支付。
-
-```javascript
-测试卡:
-
-Credit card:6250947000000014
-mobile:+852 11112222
-cvn2:  123
-exp date: month 12 year 33
-SMS Code on PC: 111111
-SMS Code on Mobile: 123456
-
-Debit card:6223164991230014
-mobile:13012345678
-PIN: 111111
-cvn2:  123
-exp date: month 12 year 33
-SMS Code on PC:111111
-SMS Code on Mobile:123456
-
-Credit card:8171999927660000
-mobile:+852 11112222
-cvn2:  123
-exp date: month 12 year 30
-SMS Code on PC: 111111
-SMS Code on Mobile: 123456
-```
-
-### 2 FC渠道
-
-#### 2.1 H5支付
-
- 预授权接口专属字段
-
-| 参数      | 类型   | 属性 | 描述 |
-| --------- | ------ | ---- | ---- |
-| tradeFrom | String | M    | "H5" |
-
-```javascript
-测试卡:
-
-卡号: 4761340000000019
-有效期: 1217
-CVV2: 830
-
-卡号: 5204730000002555
-有效期: 1225
-CVV2: 123
-```
-
-### 3 RevPay渠道
-
-#### 3.1 H5支付
-
- 预授权接口专属字段
-
-| 参数      | 类型   | 属性 | 描述     |
-| --------- | ------ | ---- | -------- |
-| tradeFrom | String | M    | "H5"     |
-| bankCode  | String | M    | 银行代码。测试环境填写TEST0021,生产环境[点击此处查看详情](RevPayBankCode.md) |
-
-```javascript
-测试卡信息:
-FPX Test Card
-Payment ID : 3
-Bank Code : TEST0021
-Bank Name : SBI Bank A
-User Id : 1234
-Password : 1234
-```
-
-### 4 India_Netbanking渠道
-
-#### 4.1 H5支付
-
- 预授权接口专属字段
-
-| 参数      | 类型   | 属性 | 描述 |
-| --------- | ------ | ---- | ---- |
-| tradeFrom | String | M    | "H5" |
-| bank_code | String | M    |[见列表](India_Netbanking_BankCode.md) |
-| email | String | M    | Must contain valid e-mail of customer|
-| phone | String | M    | Must contain valid phone number of customer |
-| firstname | String | M    | Customer first name |
-| lastname | String | M    | Customer last name |
-| address | String | M    | address |
-| zip_code | String | M    | ZIP code |
-| city | String | M    | City |
-| country | String | M    |Country code in ISO 3166|
-| state | String | M    | State code in ISO 3166-2, required for USA and Canada |
+## 渠道专属配置
+
+### 1 UP渠道
+
+#### 1.1 H5支付,自适应PC和移动端
+
+ 预授权接口专属字段
+
+| 参数      | 类型   | 属性 | 描述 |
+| --------- | ------ | ---- | ---- |
+| tradeFrom | String | M    | "H5" |
+
+#### 1.2 APP支付
+
+ 预授权接口专属字段
+
+| 参数      | 类型   | 属性 | 描述  |
+| --------- | ------ | ---- | ----- |
+| tradeFrom | String | M    | "APP" |
+
+应答报文:
+
+| 参数     | 类型   | 属性 | 描述                                                      |
+| -------- | ------ | ---- | ------------------------------------------------------- |
+| RespCode | String | M    | 应答码 00-成功                                           |
+| RespMsg  | String | M    | 应答消息                                                 |
+| tn       | String | O    | 交易流水号,RespCode为“00”时返回,作为调起 sdk 支付的参数 |
+
+获取到tn后,根据APP对接文档调用SDK进行支付。
+
+```javascript
+测试卡:
+
+Credit card:6250947000000014
+mobile:+852 11112222
+cvn2:  123
+exp date: month 12 year 33
+SMS Code on PC: 111111
+SMS Code on Mobile: 123456
+
+Debit card:6223164991230014
+mobile:13012345678
+PIN: 111111
+cvn2:  123
+exp date: month 12 year 33
+SMS Code on PC:111111
+SMS Code on Mobile:123456
+
+Credit card:8171999927660000
+mobile:+852 11112222
+cvn2:  123
+exp date: month 12 year 30
+SMS Code on PC: 111111
+SMS Code on Mobile: 123456
+```
+
+### 2 FC渠道
+
+#### 2.1 H5支付
+
+ 预授权接口专属字段
+
+| 参数      | 类型   | 属性 | 描述 |
+| --------- | ------ | ---- | ---- |
+| tradeFrom | String | M    | "H5" |
+
+```javascript
+测试卡:
+
+卡号: 4761340000000019
+有效期: 1217
+CVV2: 830
+
+卡号: 5204730000002555
+有效期: 1225
+CVV2: 123
+```
+
+### 3 RevPay渠道
+
+#### 3.1 H5支付
+
+ 预授权接口专属字段
+
+| 参数      | 类型   | 属性 | 描述     |
+| --------- | ------ | ---- | -------- |
+| tradeFrom | String | M    | "H5"     |
+| bankCode  | String | M    | 银行代码。测试环境填写TEST0021,生产环境[点击此处查看详情](RevPayBankCode.md) |
+
+```javascript
+测试卡信息:
+FPX Test Card
+Payment ID : 3
+Bank Code : TEST0021
+Bank Name : SBI Bank A
+User Id : 1234
+Password : 1234
+```
+
+### 4 India_Netbanking渠道
+
+#### 4.1 H5支付
+
+ 预授权接口专属字段
+
+| 参数      | 类型   | 属性 | 描述 |
+| --------- | ------ | ---- | ---- |
+| tradeFrom | String | M    | "H5" |
+| bank_code | String | M    |[见列表](India_Netbanking_BankCode.md) |
+| email | String | M    | Must contain valid e-mail of customer|
+| phone | String | M    | Must contain valid phone number of customer |
+| firstname | String | M    | Customer first name |
+| lastname | String | M    | Customer last name |
+| address | String | M    | address |
+| zip_code | String | M    | ZIP code |
+| city | String | M    | City |
+| country | String | M    |Country code in ISO 3166|
+| state | String | M    | State code in ISO 3166-2, required for USA and Canada |
 | document_id | String | M    | Document ID of the consumer.|

+ 117 - 117
preAuthorizationExclusive_EN.md

@@ -1,117 +1,117 @@
-## Channel exclusive allocation
-
-### 1 UP
-
-#### 1.1 H5 mode, adaptive PC and mobile
-
- Pre-authorization interface specific fields
-
-| Parameter | Type   | Required | Description |
-| --------- | ------ | ---- | ---- |
-| tradeFrom | String | M    | "H5" |
-
-#### 1.2 APP mode
-
- Pre-authorization interface specific fields
-
-| Parameter | Type   | Required | Description |
-| --------- | ------ | ---- | ----- |
-| tradeFrom | String | M    | "APP" |
-
-Response message:
-
-| Parameter | Type   | Required | Description |
-| -------- | ------ | ---- | --------------------------------------------------------- |
-| RespCode | String | M    | 00 stands for success; 01 stands for fail. |
-| RespMsg  | String | M    | Response message |
-| tn       | String | O    | Transaction serial number. Required parameter for Wechat app payment. When RespCode=00 returns it. |
-
-After getting tn, call the SDK to pay according to APP document.
-
-```javascript
-Test cards:
-
-Credit card:6250947000000014
-mobile:+852 11112222
-cvn2:  123
-exp date: month 12 year 33
-SMS Code on PC: 111111
-SMS Code on Mobile: 123456
-
-Debit card:6223164991230014
-mobile:13012345678
-PIN: 111111
-cvn2:  123
-exp date: month 12 year 33
-SMS Code on PC:111111
-SMS Code on Mobile:123456
-
-Credit card:8171999927660000
-mobile:+852 11112222
-cvn2:  123
-exp date: month 12 year 30
-SMS Code on PC: 111111
-SMS Code on Mobile: 123456
-```
-
-### 2 FC
-
-#### 2.1 H5 mode
-
- Pre-authorization interface specific fields
-
-| Parameter | Type | Required | Description |
-| --------- | ------ | ---- | ---- |
-| tradeFrom | String | M    | "H5" |
-
-```javascript
-Test card:
-
-Card Number: 4761340000000019
-Expiry Date: 1217
-CVV2: 830
-
-Card Number: 5204730000002555
-Expiry Date: 1225
-CVV2: 123
-```
-
-### 3 RevPay
-
-#### 3.1 H5 mode
-
-| Parameter      | Type   | Required | Description     |
-| --------- | ------ | ---- | -------- |
-| tradeFrom | String | M    | "H5"     |
-| bankCode  | String | M    | Bank Code. Test environment filled in TEST0021, production environment [click here for details](RevPayBankCode.md) |
-
-```javascript
-Test card:
-FPX Test Card
-Payment ID : 3
-Bank Code : TEST0021
-Bank Name : SBI Bank A
-User Id : 1234
-Password : 1234
-```
-
-### 4 India_Netbanking
-
-#### 4.1 H5 mode
-
-You should add the following parameters:
-
-| Parameter      | Type   | Required | Description     |
-| --------- | ------ | ---- | ---- |
-| tradeFrom | String | M    | "H5" |
-| bank_code | String | M    | [bank list](India_Netbanking_BankCode.md) |
-| email | String | M    | Must contain valid e-mail of customer|
-| phone | String | M    | Must contain valid phone number of customer |
-| firstname | String | M    | Customer first name |
-| lastname | String | M    | Customer last name |
-| address | String | M    | address |
-| zip_code | String | M    | ZIP code |
-| city | String | M    | City |
-| country | String | M    |Country code in ISO 3166|
-| state | String | M    | State code in ISO 3166-2, required for USA and Canada |
-| document_id | String | M    | Document ID of the consumer.|
+## Channel exclusive allocation
+
+### 1 UP
+
+#### 1.1 H5 mode, adaptive PC and mobile
+
+ Pre-authorization interface specific fields
+
+| Parameter | Type   | Required | Description |
+| --------- | ------ | ---- | ---- |
+| tradeFrom | String | M    | "H5" |
+
+#### 1.2 APP mode
+
+ Pre-authorization interface specific fields
+
+| Parameter | Type   | Required | Description |
+| --------- | ------ | ---- | ----- |
+| tradeFrom | String | M    | "APP" |
+
+Response message:
+
+| Parameter | Type   | Required | Description |
+| -------- | ------ | ---- | --------------------------------------------------------- |
+| RespCode | String | M    | 00 stands for success; 01 stands for fail. |
+| RespMsg  | String | M    | Response message |
+| tn       | String | O    | Transaction serial number. Required parameter for Wechat app payment. When RespCode=00 returns it. |
+
+After getting tn, call the SDK to pay according to APP document.
+
+```javascript
+Test cards:
+
+Credit card:6250947000000014
+mobile:+852 11112222
+cvn2:  123
+exp date: month 12 year 33
+SMS Code on PC: 111111
+SMS Code on Mobile: 123456
+
+Debit card:6223164991230014
+mobile:13012345678
+PIN: 111111
+cvn2:  123
+exp date: month 12 year 33
+SMS Code on PC:111111
+SMS Code on Mobile:123456
+
+Credit card:8171999927660000
+mobile:+852 11112222
+cvn2:  123
+exp date: month 12 year 30
+SMS Code on PC: 111111
+SMS Code on Mobile: 123456
+```
+
+### 2 FC
+
+#### 2.1 H5 mode
+
+ Pre-authorization interface specific fields
+
+| Parameter | Type | Required | Description |
+| --------- | ------ | ---- | ---- |
+| tradeFrom | String | M    | "H5" |
+
+```javascript
+Test card:
+
+Card Number: 4761340000000019
+Expiry Date: 1217
+CVV2: 830
+
+Card Number: 5204730000002555
+Expiry Date: 1225
+CVV2: 123
+```
+
+### 3 RevPay
+
+#### 3.1 H5 mode
+
+| Parameter      | Type   | Required | Description     |
+| --------- | ------ | ---- | -------- |
+| tradeFrom | String | M    | "H5"     |
+| bankCode  | String | M    | Bank Code. Test environment filled in TEST0021, production environment [click here for details](RevPayBankCode.md) |
+
+```javascript
+Test card:
+FPX Test Card
+Payment ID : 3
+Bank Code : TEST0021
+Bank Name : SBI Bank A
+User Id : 1234
+Password : 1234
+```
+
+### 4 India_Netbanking
+
+#### 4.1 H5 mode
+
+You should add the following parameters:
+
+| Parameter      | Type   | Required | Description     |
+| --------- | ------ | ---- | ---- |
+| tradeFrom | String | M    | "H5" |
+| bank_code | String | M    | [bank list](India_Netbanking_BankCode.md) |
+| email | String | M    | Must contain valid e-mail of customer|
+| phone | String | M    | Must contain valid phone number of customer |
+| firstname | String | M    | Customer first name |
+| lastname | String | M    | Customer last name |
+| address | String | M    | address |
+| zip_code | String | M    | ZIP code |
+| city | String | M    | City |
+| country | String | M    |Country code in ISO 3166|
+| state | String | M    | State code in ISO 3166-2, required for USA and Canada |
+| document_id | String | M    | Document ID of the consumer.|

+ 10 - 10
v5/android/android_sdk/Demo/.gitignore

@@ -1,10 +1,10 @@
-*.iml
-.gradle
-/local.properties
-/.idea
-.DS_Store
-/build
-/captures
-.externalNativeBuild
-.bugtags.log
-/PushSDK
+*.iml
+.gradle
+/local.properties
+/.idea
+.DS_Store
+/build
+/captures
+.externalNativeBuild
+.bugtags.log
+/PushSDK

+ 1 - 1
v5/android/android_sdk/Demo/app/.gitignore

@@ -1 +1 @@
-/build
+/build

+ 44 - 44
v5/android/android_sdk/Demo/app/build.gradle

@@ -1,44 +1,44 @@
-apply plugin: 'com.android.application'
-
-android {
-    compileSdkVersion 28
-    buildToolsVersion "28.0.3"
-    defaultConfig {
-        applicationId "com.vtpayment.plugin"
-        minSdkVersion 19
-        targetSdkVersion 28
-        versionCode 1
-        versionName "1.0"
-        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
-    }
-    buildTypes {
-        release {
-            minifyEnabled false
-            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
-        }
-    }
-
-
-
-
-}
-
-dependencies {
-    compile fileTree(include: ['*.jar'], dir: 'libs')
-    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
-        exclude group: 'com.android.support', module: 'support-annotations'
-    })
-    compile 'com.android.support:appcompat-v7:25.3.1'
-    compile 'com.android.support.constraint:constraint-layout:1.0.0-beta1'
-    testCompile 'junit:junit:4.12'
-    compile(name: 'allpaysdk', ext: 'aar')
-    compile(name: 'alipaySdk', ext: 'aar')
-    compile 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+'
-}
-
-
-repositories {
-    flatDir {
-        dirs 'libs'
-    }
-}
+apply plugin: 'com.android.application'
+
+android {
+    compileSdkVersion 28
+    buildToolsVersion "28.0.3"
+    defaultConfig {
+        applicationId "com.vtpayment.plugin"
+        minSdkVersion 19
+        targetSdkVersion 28
+        versionCode 1
+        versionName "1.0"
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+    }
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+    }
+
+
+
+
+}
+
+dependencies {
+    compile fileTree(include: ['*.jar'], dir: 'libs')
+    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
+        exclude group: 'com.android.support', module: 'support-annotations'
+    })
+    compile 'com.android.support:appcompat-v7:25.3.1'
+    compile 'com.android.support.constraint:constraint-layout:1.0.0-beta1'
+    testCompile 'junit:junit:4.12'
+    compile(name: 'allpaysdk', ext: 'aar')
+    compile(name: 'alipaySdk', ext: 'aar')
+    compile 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+'
+}
+
+
+repositories {
+    flatDir {
+        dirs 'libs'
+    }
+}

+ 25 - 25
v5/android/android_sdk/Demo/app/proguard-rules.pro

@@ -1,25 +1,25 @@
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in /Users/bensonzhang/Library/Android/sdk/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the proguardFiles
-# directive in build.gradle.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in /Users/bensonzhang/Library/Android/sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile

+ 26 - 26
v5/android/android_sdk/Demo/app/src/androidTest/java/com/vtpayment/plugin/ExampleInstrumentedTest.java

@@ -1,26 +1,26 @@
-package com.vtpayment.plugin;
-
-import android.content.Context;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.junit.Assert.*;
-
-/**
- * Instrumentation test, which will execute on an Android device.
- *
- * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
- */
-@RunWith(AndroidJUnit4.class)
-public class ExampleInstrumentedTest {
-    @Test
-    public void useAppContext() throws Exception {
-        // Context of the app under test.
-        Context appContext = InstrumentationRegistry.getTargetContext();
-
-        assertEquals("com.vtpayment.plugin", appContext.getPackageName());
-    }
-}
+package com.vtpayment.plugin;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumentation test, which will execute on an Android device.
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+    @Test
+    public void useAppContext() throws Exception {
+        // Context of the app under test.
+        Context appContext = InstrumentationRegistry.getTargetContext();
+
+        assertEquals("com.vtpayment.plugin", appContext.getPackageName());
+    }
+}

+ 47 - 47
v5/android/android_sdk/Demo/app/src/main/AndroidManifest.xml

@@ -1,48 +1,48 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.vtpayment.plugin">
-    <uses-permission android:name="android.permission.INTERNET" />
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
-    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
-
-    <application
-        android:allowBackup="true"
-        android:icon="@mipmap/ic_launcher"
-        android:label="@string/app_name"
-        android:roundIcon="@mipmap/ic_launcher_round"
-        android:supportsRtl="true"
-        android:theme="@style/AppTheme">
-
-
-        <activity android:name=".MainActivity"
-            android:theme="@style/Theme.AppCompat.Light.NoActionBar"
-            >
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-
-
-
-
-        <!-- 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 -->
-    </application>
-
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.vtpayment.plugin">
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
+
+    <application
+        android:allowBackup="true"
+        android:icon="@mipmap/ic_launcher"
+        android:label="@string/app_name"
+        android:roundIcon="@mipmap/ic_launcher_round"
+        android:supportsRtl="true"
+        android:theme="@style/AppTheme">
+
+
+        <activity android:name=".MainActivity"
+            android:theme="@style/Theme.AppCompat.Light.NoActionBar"
+            >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+
+
+
+
+        <!-- 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 -->
+    </application>
+
 </manifest>

+ 209 - 209
v5/android/android_sdk/Demo/app/src/main/java/com/vtpayment/plugin/MainActivity.java

@@ -1,210 +1,210 @@
-package com.vtpayment.plugin;
-
-import android.app.ProgressDialog;
-import android.content.Intent;
-import android.support.v7.app.AppCompatActivity;
-import android.os.Bundle;
-import android.text.TextUtils;
-import android.util.Log;
-import android.view.View;
-import android.widget.ArrayAdapter;
-import android.widget.EditText;
-import android.widget.Spinner;
-import android.widget.Toast;
-
-import com.allpayx.sdk.AllPayEngine;
-import com.allpayx.sdk.constants.AllPayConst;
-import com.allpayx.sdk.util.HttpUtil;
-
-import com.vtpayment.plugin.util.Base64;
-import com.vtpayment.plugin.util.JsonUtil;
-import com.vtpayment.plugin.util.PayUtil;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-
-public class MainActivity extends AppCompatActivity {
-
-    private final String TAG = "MainActivity";
-
-    private static final String[] currency = {"CNY","USD","INR","JPY"};
-    private static String payType[];
-    private static final String[] paymentSchemas = {"APMP","WX","UP","CA"};
-
-    private ProgressDialog progressDialog;
-    Map<String, String> params = new HashMap<String, String>();
-    private EditText mAmoutEidt;
-    private EditText mOrderNumEidt;
-    private EditText mMerID;
-    private Spinner mPaymentSchemaSpinner;
-    private Spinner mCurrencySpinner;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_main);
-        payType = new String[4];
-        payType[0] = getResources().getString(R.string.pay_type_apmp);
-        payType[1] = getResources().getString(R.string.pay_type_wx);
-        payType[2] = getResources().getString(R.string.pay_type_up);
-        payType[3] = getResources().getString(R.string.pay_type_ca);
-        // 通用参数
-
-        params.put("version", "VER000000005");
-        params.put("charSet", "UTF-8");
-        params.put("transType", "PURC");
-        params.put("orderNum", getOrderNum());
-        params.put("orderAmount", "0.1");
-        params.put("orderCurrency", "CNY");
-        params.put("frontURL", "nil");
-        params.put("merReserve", "一个又大又圆的苹果");
-        params.put("acqID", "99020344");
-        params.put("backURL", "https://testapi.allpayx.com/test");
-        params.put("merID", "000000000000015");
-        params.put("paymentSchema", "APMP");
-        params.put("goodsInfo", "一个又大又圆的苹果");
-        params.put("transTime", getTransTime());
-        params.put("signType", "MD5");
-        params.put("tradeFrom", "APP");
-
-        String detailInfo = "[{\"goods_name\":\"一个又大又圆的苹果\",\"quantity\":\"1\"},{\"goods_name\":\"华为P20 plus\",\"quantity\":\"4\"}]";
-        try {
-            detailInfo = Base64.encodeBytes(detailInfo.getBytes("utf-8"));
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-        params.put("detailInfo", detailInfo);
-
-
-        initLayout();
-        initListener();
-        update();
-
-    }
-
-    private void initLayout() {
-        mAmoutEidt = (EditText) findViewById(R.id.edit_amount);
-        mOrderNumEidt = (EditText) findViewById(R.id.edit_ordernum);
-        mMerID = (EditText) findViewById(R.id.edit_merid);
-        ArrayAdapter<String> currencyArrayAdapter = new ArrayAdapter<String>(
-                this, android.R.layout.simple_spinner_item, currency);
-        currencyArrayAdapter
-                .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
-
-        mCurrencySpinner = (Spinner) findViewById(R.id.spinner_currency);
-        mCurrencySpinner.setAdapter(currencyArrayAdapter);
-
-        ArrayAdapter<String> paymentSchemaArrayAdapter = new ArrayAdapter<String>(
-                this, android.R.layout.simple_spinner_item, payType);
-        paymentSchemaArrayAdapter
-                .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
-
-        mPaymentSchemaSpinner = (Spinner) findViewById(R.id.spinner_paymentschema);
-        mPaymentSchemaSpinner.setAdapter(paymentSchemaArrayAdapter);
-
-    }
-
-    private void initListener() {
-        findViewById(R.id.submit).setOnClickListener(new View.OnClickListener() {
-
-            @Override
-            public void onClick(View v) {
-                params.put("orderAmount", mAmoutEidt.getText().toString());
-                params.put("orderCurrency", mCurrencySpinner.getSelectedItem().toString());
-                String paymentSchema = paymentSchemas[mPaymentSchemaSpinner.getSelectedItemPosition()];
-                params.put("paymentSchema", paymentSchema);
-
-                switch (paymentSchema) {
-
-                }
-
-                pay(params);
-            }
-        });
-    }
-
-    private void update() {
-        params.put("orderNum", getOrderNum());
-        mMerID.setText(params.get("merID"));
-        mOrderNumEidt.setText(params.get("orderNum"));
-        mAmoutEidt.setText(params.get("orderAmount"));
-    }
-
-
-    private void pay(final Map<String, String> params) {
-        progressDialog = ProgressDialog.show(this, "", "模拟网关获取tn...");
-
-        new Thread(new Runnable() {
-            @Override
-            public void run() {
-                params.remove("signature");
-                params.put("signature", PayUtil.getSign(params, "2f2c77e3718c47cfb47a89a6fbc9d361", "MD5"));
-                //String result = HttpUtil.reqStr("http://172.30.1.103:8080/app/pay", params, HttpUtil.METHOD_POST); //本地
-                // String result = HttpUtil.reqStr("https://api.allpayx.com/app/pay", params, HttpUtil.METHOD_POST); //生产
-                // final String result = HttpUtil.reqStr("http://172.30.1.112:8080/api/unifiedorder", params, HttpUtil.METHOD_POST);//测试
-
-                final String result = HttpUtil.reqStr("https://testapi.allpayx.com/api/unifiedorder", params, HttpUtil.METHOD_POST); //生产
-
-                progressDialog.dismiss();
-                Log.i(TAG, "result=" + result);
-                String tn = JsonUtil.getParam(result, "tn");
-                if (!TextUtils.isEmpty(tn)) {
-
-                    Log.i(TAG, "tn=" + tn);
-                    AllPayEngine.pay(MainActivity.this, tn, false);
-                } else {
-                    runOnUiThread(new Runnable() {
-                        public void run() {
-                            Toast toast = Toast.makeText(
-                                    getApplicationContext(), "获取tn失败:" + result,
-                                    Toast.LENGTH_SHORT);
-                            toast.show();
-
-                        }
-                    });
-                }
-            }
-        }).start();
-
-    }
-
-
-    private String getOrderNum() {
-        Date now = new Date();
-        SimpleDateFormat spf = new SimpleDateFormat("yyyyMMddHHmmss");
-        return "ap" + spf.format(now).substring(1);
-    }
-
-
-    private String getTransTime() {
-        Date now = new Date();
-        SimpleDateFormat spf = new SimpleDateFormat("yyyyMMddHHmmss");
-        return spf.format(now);
-    }
-
-    @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) {
-
-            update();
-            String result = data.getExtras().getString("pay_result");
-            Toast toast = Toast.makeText(getApplicationContext(), result,
-                    Toast.LENGTH_SHORT);
-            toast.show();
-
-        }
-
-    }
-
-
+package com.vtpayment.plugin;
+
+import android.app.ProgressDialog;
+import android.content.Intent;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.View;
+import android.widget.ArrayAdapter;
+import android.widget.EditText;
+import android.widget.Spinner;
+import android.widget.Toast;
+
+import com.allpayx.sdk.AllPayEngine;
+import com.allpayx.sdk.constants.AllPayConst;
+import com.allpayx.sdk.util.HttpUtil;
+
+import com.vtpayment.plugin.util.Base64;
+import com.vtpayment.plugin.util.JsonUtil;
+import com.vtpayment.plugin.util.PayUtil;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+
+public class MainActivity extends AppCompatActivity {
+
+    private final String TAG = "MainActivity";
+
+    private static final String[] currency = {"CNY","USD","INR","JPY"};
+    private static String payType[];
+    private static final String[] paymentSchemas = {"APMP","WX","UP","CA"};
+
+    private ProgressDialog progressDialog;
+    Map<String, String> params = new HashMap<String, String>();
+    private EditText mAmoutEidt;
+    private EditText mOrderNumEidt;
+    private EditText mMerID;
+    private Spinner mPaymentSchemaSpinner;
+    private Spinner mCurrencySpinner;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+        payType = new String[4];
+        payType[0] = getResources().getString(R.string.pay_type_apmp);
+        payType[1] = getResources().getString(R.string.pay_type_wx);
+        payType[2] = getResources().getString(R.string.pay_type_up);
+        payType[3] = getResources().getString(R.string.pay_type_ca);
+        // 通用参数
+
+        params.put("version", "VER000000005");
+        params.put("charSet", "UTF-8");
+        params.put("transType", "PURC");
+        params.put("orderNum", getOrderNum());
+        params.put("orderAmount", "0.1");
+        params.put("orderCurrency", "CNY");
+        params.put("frontURL", "nil");
+        params.put("merReserve", "一个又大又圆的苹果");
+        params.put("acqID", "99020344");
+        params.put("backURL", "https://testapi.allpayx.com/test");
+        params.put("merID", "000000000000015");
+        params.put("paymentSchema", "APMP");
+        params.put("goodsInfo", "一个又大又圆的苹果");
+        params.put("transTime", getTransTime());
+        params.put("signType", "MD5");
+        params.put("tradeFrom", "APP");
+
+        String detailInfo = "[{\"goods_name\":\"一个又大又圆的苹果\",\"quantity\":\"1\"},{\"goods_name\":\"华为P20 plus\",\"quantity\":\"4\"}]";
+        try {
+            detailInfo = Base64.encodeBytes(detailInfo.getBytes("utf-8"));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        params.put("detailInfo", detailInfo);
+
+
+        initLayout();
+        initListener();
+        update();
+
+    }
+
+    private void initLayout() {
+        mAmoutEidt = (EditText) findViewById(R.id.edit_amount);
+        mOrderNumEidt = (EditText) findViewById(R.id.edit_ordernum);
+        mMerID = (EditText) findViewById(R.id.edit_merid);
+        ArrayAdapter<String> currencyArrayAdapter = new ArrayAdapter<String>(
+                this, android.R.layout.simple_spinner_item, currency);
+        currencyArrayAdapter
+                .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+
+        mCurrencySpinner = (Spinner) findViewById(R.id.spinner_currency);
+        mCurrencySpinner.setAdapter(currencyArrayAdapter);
+
+        ArrayAdapter<String> paymentSchemaArrayAdapter = new ArrayAdapter<String>(
+                this, android.R.layout.simple_spinner_item, payType);
+        paymentSchemaArrayAdapter
+                .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+
+        mPaymentSchemaSpinner = (Spinner) findViewById(R.id.spinner_paymentschema);
+        mPaymentSchemaSpinner.setAdapter(paymentSchemaArrayAdapter);
+
+    }
+
+    private void initListener() {
+        findViewById(R.id.submit).setOnClickListener(new View.OnClickListener() {
+
+            @Override
+            public void onClick(View v) {
+                params.put("orderAmount", mAmoutEidt.getText().toString());
+                params.put("orderCurrency", mCurrencySpinner.getSelectedItem().toString());
+                String paymentSchema = paymentSchemas[mPaymentSchemaSpinner.getSelectedItemPosition()];
+                params.put("paymentSchema", paymentSchema);
+
+                switch (paymentSchema) {
+
+                }
+
+                pay(params);
+            }
+        });
+    }
+
+    private void update() {
+        params.put("orderNum", getOrderNum());
+        mMerID.setText(params.get("merID"));
+        mOrderNumEidt.setText(params.get("orderNum"));
+        mAmoutEidt.setText(params.get("orderAmount"));
+    }
+
+
+    private void pay(final Map<String, String> params) {
+        progressDialog = ProgressDialog.show(this, "", "模拟网关获取tn...");
+
+        new Thread(new Runnable() {
+            @Override
+            public void run() {
+                params.remove("signature");
+                params.put("signature", PayUtil.getSign(params, "2f2c77e3718c47cfb47a89a6fbc9d361", "MD5"));
+                //String result = HttpUtil.reqStr("http://172.30.1.103:8080/app/pay", params, HttpUtil.METHOD_POST); //本地
+                // String result = HttpUtil.reqStr("https://api.allpayx.com/app/pay", params, HttpUtil.METHOD_POST); //生产
+                // final String result = HttpUtil.reqStr("http://172.30.1.112:8080/api/unifiedorder", params, HttpUtil.METHOD_POST);//测试
+
+                final String result = HttpUtil.reqStr("https://testapi.allpayx.com/api/unifiedorder", params, HttpUtil.METHOD_POST); //生产
+
+                progressDialog.dismiss();
+                Log.i(TAG, "result=" + result);
+                String tn = JsonUtil.getParam(result, "tn");
+                if (!TextUtils.isEmpty(tn)) {
+
+                    Log.i(TAG, "tn=" + tn);
+                    AllPayEngine.pay(MainActivity.this, tn, false);
+                } else {
+                    runOnUiThread(new Runnable() {
+                        public void run() {
+                            Toast toast = Toast.makeText(
+                                    getApplicationContext(), "获取tn失败:" + result,
+                                    Toast.LENGTH_SHORT);
+                            toast.show();
+
+                        }
+                    });
+                }
+            }
+        }).start();
+
+    }
+
+
+    private String getOrderNum() {
+        Date now = new Date();
+        SimpleDateFormat spf = new SimpleDateFormat("yyyyMMddHHmmss");
+        return "ap" + spf.format(now).substring(1);
+    }
+
+
+    private String getTransTime() {
+        Date now = new Date();
+        SimpleDateFormat spf = new SimpleDateFormat("yyyyMMddHHmmss");
+        return spf.format(now);
+    }
+
+    @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) {
+
+            update();
+            String result = data.getExtras().getString("pay_result");
+            Toast toast = Toast.makeText(getApplicationContext(), result,
+                    Toast.LENGTH_SHORT);
+            toast.show();
+
+        }
+
+    }
+
+
 }

+ 53 - 53
v5/android/android_sdk/Demo/app/src/main/java/com/vtpayment/plugin/util/EncoderUtil.java

@@ -1,53 +1,53 @@
-package com.vtpayment.plugin.util;
-
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-
-public class EncoderUtil {
-	public static String Encrypt(String strSrc,String encName) {
-		//parameter strSrc is a string will be encrypted,
-		//parameter encName is the algorithm name will be used.
-		//encName dafault to "MD5"
-		MessageDigest md=null;
-		String strDes=null;
-
-		byte[] bt=strSrc.getBytes();
-		try {
-		if (encName==null||encName.equals("")) {
-		encName="MD5";
-		}
-		md=MessageDigest.getInstance(encName);
-		md.update(bt);
-		strDes=bytes2Hex(md.digest()); //to HexString
-		}
-		catch (NoSuchAlgorithmException e) {
-		System.out.println("Invalid algorithm.");
-		return null;
-		}
-		return strDes;
-		}
-
-		private static String bytes2Hex(byte[]bts) {
-		String des="";
-		String tmp=null;
-		for (int i=0;i<bts.length;i++) {
-		tmp=(Integer.toHexString(bts[i] & 0xFF));
-		if (tmp.length()==1) {
-		des+="0";
-		}
-		des+=tmp;
-		}
-		return des;
-		}
-
-//		public static void main(String[]args) {
-//		TestEncrypt te=new TestEncrypt();
-//		String strSrc="可以加密汉字.Oh,and english";
-//		System.out.println("Source String:"+strSrc);
-//		System.out.println("Encrypted String:");
-//		System.out.println("Use Def:"+te.Encrypt(strSrc,null));
-//		System.out.println("Use MD5:"+te.Encrypt(strSrc,"MD5"));
-//		System.out.println("Use SHA:"+te.Encrypt(strSrc,"SHA-1"));
-//		System.out.println("Use SHA-256:"+te.Encrypt(strSrc,"SHA-256"));
-//		}
-}
+package com.vtpayment.plugin.util;
+
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+
+public class EncoderUtil {
+	public static String Encrypt(String strSrc,String encName) {
+		//parameter strSrc is a string will be encrypted,
+		//parameter encName is the algorithm name will be used.
+		//encName dafault to "MD5"
+		MessageDigest md=null;
+		String strDes=null;
+
+		byte[] bt=strSrc.getBytes();
+		try {
+		if (encName==null||encName.equals("")) {
+		encName="MD5";
+		}
+		md=MessageDigest.getInstance(encName);
+		md.update(bt);
+		strDes=bytes2Hex(md.digest()); //to HexString
+		}
+		catch (NoSuchAlgorithmException e) {
+		System.out.println("Invalid algorithm.");
+		return null;
+		}
+		return strDes;
+		}
+
+		private static String bytes2Hex(byte[]bts) {
+		String des="";
+		String tmp=null;
+		for (int i=0;i<bts.length;i++) {
+		tmp=(Integer.toHexString(bts[i] & 0xFF));
+		if (tmp.length()==1) {
+		des+="0";
+		}
+		des+=tmp;
+		}
+		return des;
+		}
+
+//		public static void main(String[]args) {
+//		TestEncrypt te=new TestEncrypt();
+//		String strSrc="可以加密汉字.Oh,and english";
+//		System.out.println("Source String:"+strSrc);
+//		System.out.println("Encrypted String:");
+//		System.out.println("Use Def:"+te.Encrypt(strSrc,null));
+//		System.out.println("Use MD5:"+te.Encrypt(strSrc,"MD5"));
+//		System.out.println("Use SHA:"+te.Encrypt(strSrc,"SHA-1"));
+//		System.out.println("Use SHA-256:"+te.Encrypt(strSrc,"SHA-256"));
+//		}
+}

+ 22 - 22
v5/android/android_sdk/Demo/app/src/main/java/com/vtpayment/plugin/util/JsonUtil.java

@@ -1,22 +1,22 @@
-package com.vtpayment.plugin.util;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-
-public class JsonUtil {
-public static String getParam(String jsonString,String key){
-	String value="";
-	JSONObject jsonObject=null;
-	try {
-		jsonObject = new JSONObject(jsonString);
-	} catch (JSONException e) {
-		// TODO Auto-generated catch block
-		e.printStackTrace();
-	}
-	if(jsonObject!=null){
-		value=jsonObject.optString(key);
-	}
-	return value;
-}
-}
+package com.vtpayment.plugin.util;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+
+public class JsonUtil {
+public static String getParam(String jsonString,String key){
+	String value="";
+	JSONObject jsonObject=null;
+	try {
+		jsonObject = new JSONObject(jsonString);
+	} catch (JSONException e) {
+		// TODO Auto-generated catch block
+		e.printStackTrace();
+	}
+	if(jsonObject!=null){
+		value=jsonObject.optString(key);
+	}
+	return value;
+}
+}

+ 30 - 30
v5/android/android_sdk/Demo/app/src/main/java/com/vtpayment/plugin/util/PayOrder.java

@@ -1,30 +1,30 @@
-package com.vtpayment.plugin.util;
-
-import java.io.Serializable;
-
-public class PayOrder implements Serializable {
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-	public String orderNum;
-	public String orderAmount;
-	public String orderCurrency;
-	public String backURL;
-	public String merID;
-	public String secretKey;
-	public String  paymentSchema;
-	public String  version;
-	public String charSet;
-	public String transType;
-	public String frontURL;
-	public String merReserve;
-	public String acqID;
-	public String transTime;
-	public String OrderDesc;
-	public String signType;
-	public String signature;
-	public String language;
-	public String customerId;
-	
-}
+package com.vtpayment.plugin.util;
+
+import java.io.Serializable;
+
+public class PayOrder implements Serializable {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	public String orderNum;
+	public String orderAmount;
+	public String orderCurrency;
+	public String backURL;
+	public String merID;
+	public String secretKey;
+	public String  paymentSchema;
+	public String  version;
+	public String charSet;
+	public String transType;
+	public String frontURL;
+	public String merReserve;
+	public String acqID;
+	public String transTime;
+	public String OrderDesc;
+	public String signType;
+	public String signature;
+	public String language;
+	public String customerId;
+	
+}

+ 64 - 64
v5/android/android_sdk/Demo/app/src/main/java/com/vtpayment/plugin/util/PayUtil.java

@@ -1,64 +1,64 @@
-package com.vtpayment.plugin.util;
-
-import android.util.Log;
-
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.TreeMap;
-
-/**
- * Created by bensonzhang on 2017/12/12.
- */
-
-public class PayUtil {
-
-
-
-    public static String getSign(Map<String,String> params,String key,String signType) {
-        Map<String, String> resultMap = sortMapByKey(params);  //按Key进行排序
-        StringBuilder sb = new StringBuilder();
-        for (Map.Entry<String, String> entry : resultMap.entrySet()) {
-            sb.append(entry.getKey());
-            sb.append('=');
-            sb.append(entry.getValue());
-            sb.append('&');
-        }
-        sb.deleteCharAt(sb.lastIndexOf("&"));
-        sb.append(key);
-        Log.i("opp",sb.toString());
-        String sign =EncoderUtil.Encrypt(sb.toString(), signType) ;
-        Log.i("opp",sign);
-        return sign;
-    }
-
-    /**
-     * 使用 Map按key进行排序
-     * @param map
-     * @return
-     */
-    public static Map<String, String> sortMapByKey(Map<String, String> map) {
-        if (map == null || map.isEmpty()) {
-            return null;
-        }
-
-        Map<String, String> sortMap = new TreeMap<>(
-                new MapKeyComparator());
-
-        sortMap.putAll(map);
-
-        return sortMap;
-    }
-
-
-  static   class MapKeyComparator implements Comparator<String> {
-
-        @Override
-        public int compare(String str1, String str2) {
-
-            return str1.compareTo(str2);
-        }
-    }
-
-
-}
+package com.vtpayment.plugin.util;
+
+import android.util.Log;
+
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TreeMap;
+
+/**
+ * Created by bensonzhang on 2017/12/12.
+ */
+
+public class PayUtil {
+
+
+
+    public static String getSign(Map<String,String> params,String key,String signType) {
+        Map<String, String> resultMap = sortMapByKey(params);  //按Key进行排序
+        StringBuilder sb = new StringBuilder();
+        for (Map.Entry<String, String> entry : resultMap.entrySet()) {
+            sb.append(entry.getKey());
+            sb.append('=');
+            sb.append(entry.getValue());
+            sb.append('&');
+        }
+        sb.deleteCharAt(sb.lastIndexOf("&"));
+        sb.append(key);
+        Log.i("opp",sb.toString());
+        String sign =EncoderUtil.Encrypt(sb.toString(), signType) ;
+        Log.i("opp",sign);
+        return sign;
+    }
+
+    /**
+     * 使用 Map按key进行排序
+     * @param map
+     * @return
+     */
+    public static Map<String, String> sortMapByKey(Map<String, String> map) {
+        if (map == null || map.isEmpty()) {
+            return null;
+        }
+
+        Map<String, String> sortMap = new TreeMap<>(
+                new MapKeyComparator());
+
+        sortMap.putAll(map);
+
+        return sortMap;
+    }
+
+
+  static   class MapKeyComparator implements Comparator<String> {
+
+        @Override
+        public int compare(String str1, String str2) {
+
+            return str1.compareTo(str2);
+        }
+    }
+
+
+}

+ 18 - 18
v5/android/android_sdk/Demo/app/src/main/res/drawable/buy_button_bg.xml

@@ -1,18 +1,18 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-  <item android:state_pressed="false"  > 
-    <shape>
-        <stroke android:width="2px" android:color="#DDA755" /><!--边框颜色-->
-        <solid android:color="#DDA755" /><!--填充色-->
-        <corners android:radius="4dp" />
-    </shape>
-  </item>
-  
-    <item  android:state_pressed="true" > 
-    <shape>
-        <stroke android:width="2px" android:color="#BB8533" /><!--边框颜色-->
-        <solid android:color="#BB8533" /><!--填充色-->
-        <corners android:radius="4dp" />
-    </shape>
-  </item>
-</selector>
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+  <item android:state_pressed="false"  > 
+    <shape>
+        <stroke android:width="2px" android:color="#DDA755" /><!--边框颜色-->
+        <solid android:color="#DDA755" /><!--填充色-->
+        <corners android:radius="4dp" />
+    </shape>
+  </item>
+  
+    <item  android:state_pressed="true" > 
+    <shape>
+        <stroke android:width="2px" android:color="#BB8533" /><!--边框颜色-->
+        <solid android:color="#BB8533" /><!--填充色-->
+        <corners android:radius="4dp" />
+    </shape>
+  </item>
+</selector>

+ 242 - 242
v5/android/android_sdk/Demo/app/src/main/res/layout/activity_main.xml

@@ -1,243 +1,243 @@
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical"
-    tools:context="com.vtpayment.plugin.MainActivity" >
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="60dp"
-        android:background="#DDA755" >
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="AllPay演示Demo"
-            android:layout_centerInParent="true"
-            android:textStyle="bold"
-            android:textColor="#ffffff"
-            />
-    </RelativeLayout>
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="30dp"
-        >
-
-
-
-        <TextView
-            android:id="@+id/text_merid"
-            android:layout_width="80dp"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="30dp"
-            android:text="商户号:"
-            android:textSize="15sp"
-            android:textStyle="bold"
-            android:textColor="#000000"
-            android:layout_centerVertical="true"
-            />
-
-
-        <EditText
-            android:id="@+id/edit_merid"
-            android:layout_width="180dp"
-            android:layout_height="40dp"
-            android:layout_marginLeft="20dp"
-            android:layout_toRightOf="@id/text_merid"
-            android:textSize="15sp"
-            android:textStyle="bold"
-            android:textColor="#888888"
-            android:inputType="numberDecimal"
-            android:enabled="false"
-            android:focusable="false"
-            android:layout_centerVertical="true"
-            />
-    </RelativeLayout>
-
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="10dp"
-        >
-
-
-
-        <TextView
-            android:id="@+id/text_ordernum"
-            android:layout_width="80dp"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="30dp"
-            android:text="订单号:"
-            android:textSize="15sp"
-            android:textStyle="bold"
-            android:textColor="#000000"
-            android:layout_centerVertical="true"
-            />
-
-
-        <EditText
-            android:id="@+id/edit_ordernum"
-            android:layout_width="180dp"
-            android:layout_height="40dp"
-            android:layout_marginLeft="20dp"
-            android:layout_toRightOf="@id/text_ordernum"
-            android:textSize="15sp"
-            android:textStyle="bold"
-            android:textColor="#888888"
-            android:inputType="numberDecimal"
-            android:enabled="false"
-            android:focusable="false"
-            android:layout_centerVertical="true"
-            />
-    </RelativeLayout>
-
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="10dp"
-        >
-
-        <TextView
-            android:id="@+id/text_amount"
-            android:layout_width="80dp"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="30dp"
-            android:text="订单金额:"
-            android:textSize="15sp"
-            android:textStyle="bold"
-            android:textColor="#000000"
-            android:layout_centerVertical="true"
-            />
-
-
-        <EditText
-            android:id="@+id/edit_amount"
-            android:layout_width="180dp"
-            android:layout_height="40dp"
-            android:layout_marginLeft="20dp"
-            android:layout_toRightOf="@id/text_amount"
-            android:textSize="15sp"
-            android:textStyle="bold"
-            android:textColor="#000000"
-            android:inputType="numberDecimal"
-            android:layout_centerVertical="true"
-            />
-    </RelativeLayout>
-
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="10dp"
-        >
-
-        <TextView
-            android:id="@+id/text_currency"
-            android:layout_width="80dp"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="30dp"
-            android:text="币种:"
-            android:textSize="15sp"
-            android:textStyle="bold"
-            android:textColor="#000000"
-            android:layout_centerVertical="true"
-            />
-
-
-        <Spinner android:id="@+id/spinner_currency"
-            android:layout_width="180dp"
-            android:layout_height="35dp"
-            android:layout_toRightOf="@id/text_currency"
-            android:layout_marginLeft="20dp"
-            android:paddingLeft="5dp"
-            android:background="#ffffff"
-            >
-
-        </Spinner>
-    </RelativeLayout>
-
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="10dp"
-        >
-
-        <TextView
-            android:id="@+id/text_paymentschema"
-            android:layout_width="80dp"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="30dp"
-            android:text="支付渠道:"
-            android:textSize="15sp"
-            android:textStyle="bold"
-            android:textColor="#000000"
-            android:layout_centerVertical="true"
-            />
-
-
-        <Spinner android:id="@+id/spinner_paymentschema"
-            android:layout_width="180dp"
-            android:layout_height="35dp"
-            android:layout_toRightOf="@id/text_paymentschema"
-            android:layout_marginLeft="20dp"
-            android:paddingLeft="5dp"
-            android:background="#ffffff"
-            >
-
-        </Spinner>
-    </RelativeLayout>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_marginTop="100dp"
-        android:orientation="vertical"
-        android:gravity="center_horizontal"
-        >
-
-        <Button
-            android:id="@+id/submit"
-            android:layout_width="200dp"
-            android:layout_height="50dp"
-            android:layout_margin="10dp"
-            android:text="提交订单"
-            android:background="@drawable/buy_button_bg"
-
-            />
-
-        <Button
-            android:id="@+id/union_pay"
-            android:layout_width="100dp"
-            android:layout_height="wrap_content"
-            android:layout_margin="10dp"
-            android:text="UnionPay"
-            android:visibility="gone"
-            />
-
-        <Button
-            android:id="@+id/ali_pay"
-            android:layout_width="100dp"
-            android:layout_height="wrap_content"
-            android:layout_margin="10dp"
-            android:text="AliPay"
-            android:visibility="gone"
-            />
-
-        <Button
-            android:id="@+id/wx_pay"
-            android:layout_width="100dp"
-            android:layout_height="wrap_content"
-            android:layout_margin="10dp"
-            android:text="WeChat Pay"
-            android:visibility="gone"
-            />
-
-    </LinearLayout>
-
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    tools:context="com.vtpayment.plugin.MainActivity" >
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="60dp"
+        android:background="#DDA755" >
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="AllPay演示Demo"
+            android:layout_centerInParent="true"
+            android:textStyle="bold"
+            android:textColor="#ffffff"
+            />
+    </RelativeLayout>
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="30dp"
+        >
+
+
+
+        <TextView
+            android:id="@+id/text_merid"
+            android:layout_width="80dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="30dp"
+            android:text="商户号:"
+            android:textSize="15sp"
+            android:textStyle="bold"
+            android:textColor="#000000"
+            android:layout_centerVertical="true"
+            />
+
+
+        <EditText
+            android:id="@+id/edit_merid"
+            android:layout_width="180dp"
+            android:layout_height="40dp"
+            android:layout_marginLeft="20dp"
+            android:layout_toRightOf="@id/text_merid"
+            android:textSize="15sp"
+            android:textStyle="bold"
+            android:textColor="#888888"
+            android:inputType="numberDecimal"
+            android:enabled="false"
+            android:focusable="false"
+            android:layout_centerVertical="true"
+            />
+    </RelativeLayout>
+
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="10dp"
+        >
+
+
+
+        <TextView
+            android:id="@+id/text_ordernum"
+            android:layout_width="80dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="30dp"
+            android:text="订单号:"
+            android:textSize="15sp"
+            android:textStyle="bold"
+            android:textColor="#000000"
+            android:layout_centerVertical="true"
+            />
+
+
+        <EditText
+            android:id="@+id/edit_ordernum"
+            android:layout_width="180dp"
+            android:layout_height="40dp"
+            android:layout_marginLeft="20dp"
+            android:layout_toRightOf="@id/text_ordernum"
+            android:textSize="15sp"
+            android:textStyle="bold"
+            android:textColor="#888888"
+            android:inputType="numberDecimal"
+            android:enabled="false"
+            android:focusable="false"
+            android:layout_centerVertical="true"
+            />
+    </RelativeLayout>
+
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="10dp"
+        >
+
+        <TextView
+            android:id="@+id/text_amount"
+            android:layout_width="80dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="30dp"
+            android:text="订单金额:"
+            android:textSize="15sp"
+            android:textStyle="bold"
+            android:textColor="#000000"
+            android:layout_centerVertical="true"
+            />
+
+
+        <EditText
+            android:id="@+id/edit_amount"
+            android:layout_width="180dp"
+            android:layout_height="40dp"
+            android:layout_marginLeft="20dp"
+            android:layout_toRightOf="@id/text_amount"
+            android:textSize="15sp"
+            android:textStyle="bold"
+            android:textColor="#000000"
+            android:inputType="numberDecimal"
+            android:layout_centerVertical="true"
+            />
+    </RelativeLayout>
+
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="10dp"
+        >
+
+        <TextView
+            android:id="@+id/text_currency"
+            android:layout_width="80dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="30dp"
+            android:text="币种:"
+            android:textSize="15sp"
+            android:textStyle="bold"
+            android:textColor="#000000"
+            android:layout_centerVertical="true"
+            />
+
+
+        <Spinner android:id="@+id/spinner_currency"
+            android:layout_width="180dp"
+            android:layout_height="35dp"
+            android:layout_toRightOf="@id/text_currency"
+            android:layout_marginLeft="20dp"
+            android:paddingLeft="5dp"
+            android:background="#ffffff"
+            >
+
+        </Spinner>
+    </RelativeLayout>
+
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="10dp"
+        >
+
+        <TextView
+            android:id="@+id/text_paymentschema"
+            android:layout_width="80dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="30dp"
+            android:text="支付渠道:"
+            android:textSize="15sp"
+            android:textStyle="bold"
+            android:textColor="#000000"
+            android:layout_centerVertical="true"
+            />
+
+
+        <Spinner android:id="@+id/spinner_paymentschema"
+            android:layout_width="180dp"
+            android:layout_height="35dp"
+            android:layout_toRightOf="@id/text_paymentschema"
+            android:layout_marginLeft="20dp"
+            android:paddingLeft="5dp"
+            android:background="#ffffff"
+            >
+
+        </Spinner>
+    </RelativeLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_marginTop="100dp"
+        android:orientation="vertical"
+        android:gravity="center_horizontal"
+        >
+
+        <Button
+            android:id="@+id/submit"
+            android:layout_width="200dp"
+            android:layout_height="50dp"
+            android:layout_margin="10dp"
+            android:text="提交订单"
+            android:background="@drawable/buy_button_bg"
+
+            />
+
+        <Button
+            android:id="@+id/union_pay"
+            android:layout_width="100dp"
+            android:layout_height="wrap_content"
+            android:layout_margin="10dp"
+            android:text="UnionPay"
+            android:visibility="gone"
+            />
+
+        <Button
+            android:id="@+id/ali_pay"
+            android:layout_width="100dp"
+            android:layout_height="wrap_content"
+            android:layout_margin="10dp"
+            android:text="AliPay"
+            android:visibility="gone"
+            />
+
+        <Button
+            android:id="@+id/wx_pay"
+            android:layout_width="100dp"
+            android:layout_height="wrap_content"
+            android:layout_margin="10dp"
+            android:text="WeChat Pay"
+            android:visibility="gone"
+            />
+
+    </LinearLayout>
+
 </LinearLayout>

+ 6 - 6
v5/android/android_sdk/Demo/app/src/main/res/values/colors.xml

@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-    <color name="colorPrimary">#3F51B5</color>
-    <color name="colorPrimaryDark">#303F9F</color>
-    <color name="colorAccent">#FF4081</color>
-</resources>
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <color name="colorPrimary">#3F51B5</color>
+    <color name="colorPrimaryDark">#303F9F</color>
+    <color name="colorAccent">#FF4081</color>
+</resources>

+ 13 - 13
v5/android/android_sdk/Demo/app/src/main/res/values/strings.xml

@@ -1,13 +1,13 @@
-<resources>
-    <string name="app_name">Demo</string>
-    <string name="hello_world">Hello world!</string>
-    <string name="action_settings">Settings</string>
-    <string name="pay_type_yl">银联(易联)</string>
-    <string name="pay_type_apmp">支付宝</string>
-    <string name="pay_type_wx">微信</string>
-    <string name="pay_type_up">银联</string>
-    <string name="pay_type_mup">银联信用卡</string>
-    <string name="pay_type_dp">国际卡</string>
-    <string name="pay_type_eb">Easebuzz</string>
-    <string name="pay_type_ca">CCAvenue</string>
-</resources>
+<resources>
+    <string name="app_name">Demo</string>
+    <string name="hello_world">Hello world!</string>
+    <string name="action_settings">Settings</string>
+    <string name="pay_type_yl">银联(易联)</string>
+    <string name="pay_type_apmp">支付宝</string>
+    <string name="pay_type_wx">微信</string>
+    <string name="pay_type_up">银联</string>
+    <string name="pay_type_mup">银联信用卡</string>
+    <string name="pay_type_dp">国际卡</string>
+    <string name="pay_type_eb">Easebuzz</string>
+    <string name="pay_type_ca">CCAvenue</string>
+</resources>

+ 11 - 11
v5/android/android_sdk/Demo/app/src/main/res/values/styles.xml

@@ -1,11 +1,11 @@
-<resources>
-
-    <!-- Base application theme. -->
-    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
-        <!-- Customize your theme here. -->
-        <item name="colorPrimary">@color/colorPrimary</item>
-        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
-        <item name="colorAccent">@color/colorAccent</item>
-    </style>
-
-</resources>
+<resources>
+
+    <!-- Base application theme. -->
+    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+        <!-- Customize your theme here. -->
+        <item name="colorPrimary">@color/colorPrimary</item>
+        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
+        <item name="colorAccent">@color/colorAccent</item>
+    </style>
+
+</resources>

+ 16 - 16
v5/android/android_sdk/Demo/app/src/test/java/com/vtpayment/plugin/ExampleUnitTest.java

@@ -1,17 +1,17 @@
-package com.vtpayment.plugin;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
- */
-public class ExampleUnitTest {
-    @Test
-    public void addition_isCorrect() throws Exception {
-        assertEquals(4, 2 + 2);
-    }
+package com.vtpayment.plugin;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+public class ExampleUnitTest {
+    @Test
+    public void addition_isCorrect() throws Exception {
+        assertEquals(4, 2 + 2);
+    }
 }

+ 24 - 24
v5/android/android_sdk/Demo/build.gradle

@@ -1,24 +1,24 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
-    repositories {
-        jcenter()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.3'
-
-        // NOTE: Do not place your application dependencies here; they belong
-        // in the individual module build.gradle files
-    }
-}
-
-allprojects {
-    repositories {
-        jcenter()
-
-    }
-}
-
-task clean(type: Delete) {
-    delete rootProject.buildDir
-}
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+    repositories {
+        jcenter()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:2.2.3'
+
+        // NOTE: Do not place your application dependencies here; they belong
+        // in the individual module build.gradle files
+    }
+}
+
+allprojects {
+    repositories {
+        jcenter()
+
+    }
+}
+
+task clean(type: Delete) {
+    delete rootProject.buildDir
+}

+ 17 - 17
v5/android/android_sdk/Demo/gradle.properties

@@ -1,17 +1,17 @@
-# Project-wide Gradle settings.
-
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx1536m
-
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx1536m
+
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true

+ 6 - 6
v5/android/android_sdk/Demo/gradle/wrapper/gradle-wrapper.properties

@@ -1,6 +1,6 @@
-#Tue Dec 12 16:12:26 CST 2017
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
+#Tue Dec 12 16:12:26 CST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

+ 160 - 160
v5/android/android_sdk/Demo/gradlew

@@ -1,160 +1,160 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-##  Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
-    echo "$*"
-}
-
-die ( ) {
-    echo
-    echo "$*"
-    echo
-    exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
-  CYGWIN* )
-    cygwin=true
-    ;;
-  Darwin* )
-    darwin=true
-    ;;
-  MINGW* )
-    msys=true
-    ;;
-esac
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-        PRG="$link"
-    else
-        PRG=`dirname "$PRG"`"/$link"
-    fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-        # IBM's JDK on AIX uses strange locations for the executables
-        JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-        JAVACMD="$JAVA_HOME/bin/java"
-    fi
-    if [ ! -x "$JAVACMD" ] ; then
-        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-    fi
-else
-    JAVACMD="java"
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
-    MAX_FD_LIMIT=`ulimit -H -n`
-    if [ $? -eq 0 ] ; then
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
-            MAX_FD="$MAX_FD_LIMIT"
-        fi
-        ulimit -n $MAX_FD
-        if [ $? -ne 0 ] ; then
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
-        fi
-    else
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
-    fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-    JAVACMD=`cygpath --unix "$JAVACMD"`
-
-    # We build the pattern for arguments to be converted via cygpath
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
-    SEP=""
-    for dir in $ROOTDIRSRAW ; do
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
-        SEP="|"
-    done
-    OURCYGPATTERN="(^($ROOTDIRS))"
-    # Add a user-defined pattern to the cygpath arguments
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
-    fi
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
-    i=0
-    for arg in "$@" ; do
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
-
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
-        else
-            eval `echo args$i`="\"$arg\""
-        fi
-        i=$((i+1))
-    done
-    case $i in
-        (0) set -- ;;
-        (1) set -- "$args0" ;;
-        (2) set -- "$args0" "$args1" ;;
-        (3) set -- "$args0" "$args1" "$args2" ;;
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
-    esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
-    JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
+#!/usr/bin/env bash
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+    JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

+ 1 - 1
v5/android/android_sdk/Demo/settings.gradle

@@ -1 +1 @@
-include ':app'
+include ':app'

File diff suppressed because it is too large
+ 799 - 799
v5/ios/ios_sdk/Demo/Demo.xcodeproj/project.pbxproj


+ 14 - 14
v5/ios/ios_sdk/Demo/Demo/Demo.entitlements

@@ -1,14 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>com.apple.developer.associated-domains</key>
-	<array>
-		<string>testapi.allpayx.com</string>
-	</array>
-	<key>com.apple.developer.in-app-payments</key>
-	<array>
-		<string>merchant.allpay.pay</string>
-	</array>
-</dict>
-</plist>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>com.apple.developer.associated-domains</key>
+	<array>
+		<string>testapi.allpayx.com</string>
+	</array>
+	<key>com.apple.developer.in-app-payments</key>
+	<array>
+		<string>merchant.allpay.pay</string>
+	</array>
+</dict>
+</plist>

+ 84 - 84
v5/ios/ios_sdk/Demo/Demo/Info.plist

@@ -1,84 +1,84 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>en</string>
-	<key>CFBundleExecutable</key>
-	<string>$(EXECUTABLE_NAME)</string>
-	<key>CFBundleIdentifier</key>
-	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>$(PRODUCT_NAME)</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleURLTypes</key>
-	<array>
-		<dict>
-			<key>CFBundleTypeRole</key>
-			<string>Editor</string>
-			<key>CFBundleURLName</key>
-			<string>alipay</string>
-			<key>CFBundleURLSchemes</key>
-			<array>
-				<string>com.xxx.xxx</string>
-			</array>
-		</dict>
-		<dict>
-			<key>CFBundleTypeRole</key>
-			<string>Editor</string>
-			<key>CFBundleURLName</key>
-			<string>wxpay</string>
-			<key>CFBundleURLSchemes</key>
-			<array>
-				<string>wx0d48a98252a2fe7a</string>
-			</array>
-		</dict>
-	</array>
-	<key>CFBundleVersion</key>
-	<string>1</string>
-	<key>LSApplicationQueriesSchemes</key>
-	<array>
-		<string>weixin</string>
-		<string>weixinULAPI</string>
-		<string>uppaysdk</string>
-		<string>uppaywallet</string>
-		<string>uppayx1</string>
-		<string>uppayx2</string>
-		<string>uppayx3</string>
-	</array>
-	<key>NSAppTransportSecurity</key>
-	<dict>
-		<key>NSAllowsArbitraryLoads</key>
-		<true/>
-	</dict>
-	<key>UILaunchStoryboardName</key>
-	<string>LaunchScreen</string>
-	<key>UIMainStoryboardFile</key>
-	<string>Main</string>
-	<key>UIRequiredDeviceCapabilities</key>
-	<array>
-		<string>armv7</string>
-	</array>
-	<key>UISupportedInterfaceOrientations</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationLandscapeRight</string>
-	</array>
-	<key>UISupportedInterfaceOrientations~ipad</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationPortraitUpsideDown</string>
-		<string>UIInterfaceOrientationLandscapeLeft</string>
-		<string>UIInterfaceOrientationLandscapeRight</string>
-	</array>
-	<key>requires iPhone envir Application onment</key>
-	<false/>
-</dict>
-</plist>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>$(PRODUCT_NAME)</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleURLTypes</key>
+	<array>
+		<dict>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>CFBundleURLName</key>
+			<string>alipay</string>
+			<key>CFBundleURLSchemes</key>
+			<array>
+				<string>com.xxx.xxx</string>
+			</array>
+		</dict>
+		<dict>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>CFBundleURLName</key>
+			<string>wxpay</string>
+			<key>CFBundleURLSchemes</key>
+			<array>
+				<string>wx0d48a98252a2fe7a</string>
+			</array>
+		</dict>
+	</array>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+	<key>LSApplicationQueriesSchemes</key>
+	<array>
+		<string>weixin</string>
+		<string>weixinULAPI</string>
+		<string>uppaysdk</string>
+		<string>uppaywallet</string>
+		<string>uppayx1</string>
+		<string>uppayx2</string>
+		<string>uppayx3</string>
+	</array>
+	<key>NSAppTransportSecurity</key>
+	<dict>
+		<key>NSAllowsArbitraryLoads</key>
+		<true/>
+	</dict>
+	<key>UILaunchStoryboardName</key>
+	<string>LaunchScreen</string>
+	<key>UIMainStoryboardFile</key>
+	<string>Main</string>
+	<key>UIRequiredDeviceCapabilities</key>
+	<array>
+		<string>armv7</string>
+	</array>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>requires iPhone envir Application onment</key>
+	<false/>
+</dict>
+</plist>

File diff suppressed because it is too large
+ 1 - 1
v5/ios/ios_sdk/Demo/Demo/allpaysdk/AliModule/AlipaySDK.bundle/bridge.js


+ 56 - 56
v5/ios/ios_sdk/Demo/Demo/allpaysdk/AliModule/AlipaySDK.framework/Headers/AFServiceCenter.h

@@ -1,56 +1,56 @@
-//
-//  AFServiceCenter.h
-//  AFServiceSDK
-//
-//  Created by jiajunchen on 02/01/2018.
-//  Copyright © 2018 antfin. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@class AFServiceResponse;
-
-/**
- SDK支持的业务枚举值
-
- - AFServiceEInvoice: 电子发票
- - AFServiceAuth: 账户授权
- */
-typedef NS_ENUM(NSUInteger, AFService) {
-    AFServiceEInvoice,
-    AFServiceAuth,
-    AFServiceDeduct
-};
-
-
-extern NSString * const kAFServiceOptionBizParams;      // 钱包服务调用入参
-extern NSString * const kAFServiceOptionCallbackScheme; // 业务回跳当前app的scheme
-extern NSString * const kAFServiceOptionNotUseLanding;  // 不使用支付宝提示下载页做补偿,为true时需要商户自己处理用户未安装支付宝的情况
-extern NSString * const kAFServiceBizParamsKeyUrl;      // 独立签约入参url
-
-typedef void(^AFServiceResultBlock)(AFServiceResponse *response);
-
-@interface AFServiceCenter : NSObject
-
-/**
- 调用钱包服务
-
- @param service 业务service, 见AFService枚举值
- @param params  参数Dictionary, key值详情参见kAFServiceOptionBizParams、kAFServiceOptionCallbackScheme注释
- @param block   业务结果回调的block, block参数是AFServiceResponse类型,业务结果通过result属性获取,如果未用户未安装支付宝并且kAFServiceOptionNotUseLanding未设置为true,会使用H5landing页做补偿,这种情况下不会有block回调结果。
- */
-+ (void)callService:(AFService)service
-         withParams:(NSDictionary *)params
-      andCompletion:(AFServiceResultBlock)block;
-
-
-/**
- 处理钱包服务回跳APP的URL
-
- @param url 回跳URL
- @param block 业务结果回掉的block,详情见调用接口入参上的block。注意此接口上的block只有在跳转钱包后,当前APP被系统回收的情况下回跳才生效
- */
-+ (void)handleResponseURL:(NSURL *)url
-           withCompletion:(AFServiceResultBlock)block;
-
-@end
+//
+//  AFServiceCenter.h
+//  AFServiceSDK
+//
+//  Created by jiajunchen on 02/01/2018.
+//  Copyright © 2018 antfin. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@class AFServiceResponse;
+
+/**
+ SDK支持的业务枚举值
+
+ - AFServiceEInvoice: 电子发票
+ - AFServiceAuth: 账户授权
+ */
+typedef NS_ENUM(NSUInteger, AFService) {
+    AFServiceEInvoice,
+    AFServiceAuth,
+    AFServiceDeduct
+};
+
+
+extern NSString * const kAFServiceOptionBizParams;      // 钱包服务调用入参
+extern NSString * const kAFServiceOptionCallbackScheme; // 业务回跳当前app的scheme
+extern NSString * const kAFServiceOptionNotUseLanding;  // 不使用支付宝提示下载页做补偿,为true时需要商户自己处理用户未安装支付宝的情况
+extern NSString * const kAFServiceBizParamsKeyUrl;      // 独立签约入参url
+
+typedef void(^AFServiceResultBlock)(AFServiceResponse *response);
+
+@interface AFServiceCenter : NSObject
+
+/**
+ 调用钱包服务
+
+ @param service 业务service, 见AFService枚举值
+ @param params  参数Dictionary, key值详情参见kAFServiceOptionBizParams、kAFServiceOptionCallbackScheme注释
+ @param block   业务结果回调的block, block参数是AFServiceResponse类型,业务结果通过result属性获取,如果未用户未安装支付宝并且kAFServiceOptionNotUseLanding未设置为true,会使用H5landing页做补偿,这种情况下不会有block回调结果。
+ */
++ (void)callService:(AFService)service
+         withParams:(NSDictionary *)params
+      andCompletion:(AFServiceResultBlock)block;
+
+
+/**
+ 处理钱包服务回跳APP的URL
+
+ @param url 回跳URL
+ @param block 业务结果回掉的block,详情见调用接口入参上的block。注意此接口上的block只有在跳转钱包后,当前APP被系统回收的情况下回跳才生效
+ */
++ (void)handleResponseURL:(NSURL *)url
+           withCompletion:(AFServiceResultBlock)block;
+
+@end

+ 43 - 43
v5/ios/ios_sdk/Demo/Demo/allpaysdk/AliModule/AlipaySDK.framework/Headers/AFServiceResponse.h

@@ -1,43 +1,43 @@
-//
-//  AFServiceResponse.h
-//  AFServiceSDK
-//
-//  Created by jiajunchen on 08/01/2018.
-//  Copyright © 2018 antfin. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-/**
- 钱包服务调用结果状态吗
-
- - AFResSuccess: 默认值,业务调用成功,结果数据参见result字段
- - AFResInvalidService: service枚举值错误
- - AFResInvalidURL: 钱包回跳URL错误
- - AFResRepeatCall: 业务重复调用(3s内)
- - AFResOpenURLErr: 跳转失败
- */
-typedef NS_ENUM(NSUInteger, AFResCode) {
-    AFResSuccess = 0,
-    AFResInvalidService = 100,
-    AFResInvalidURL,
-    AFResRepeatCall,
-    AFResOpenURLErr,
-};
-
-
-@interface AFServiceResponse : NSObject
-
-
-/**
- 业务调用状态吗
- */
-@property (nonatomic, assign) AFResCode responseCode;
-
-
-/**
- 业务结果Dictionary, 内容请参考具体业务方接入文档
- */
-@property (readonly) NSDictionary *result;
-
-@end
+//
+//  AFServiceResponse.h
+//  AFServiceSDK
+//
+//  Created by jiajunchen on 08/01/2018.
+//  Copyright © 2018 antfin. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+/**
+ 钱包服务调用结果状态吗
+
+ - AFResSuccess: 默认值,业务调用成功,结果数据参见result字段
+ - AFResInvalidService: service枚举值错误
+ - AFResInvalidURL: 钱包回跳URL错误
+ - AFResRepeatCall: 业务重复调用(3s内)
+ - AFResOpenURLErr: 跳转失败
+ */
+typedef NS_ENUM(NSUInteger, AFResCode) {
+    AFResSuccess = 0,
+    AFResInvalidService = 100,
+    AFResInvalidURL,
+    AFResRepeatCall,
+    AFResOpenURLErr,
+};
+
+
+@interface AFServiceResponse : NSObject
+
+
+/**
+ 业务调用状态吗
+ */
+@property (nonatomic, assign) AFResCode responseCode;
+
+
+/**
+ 业务结果Dictionary, 内容请参考具体业务方接入文档
+ */
+@property (readonly) NSDictionary *result;
+
+@end

+ 33 - 33
v5/ios/ios_sdk/Demo/Demo/allpaysdk/AliModule/AlipaySDK.framework/Headers/APayAuthInfo.h

@@ -1,33 +1,33 @@
-//
-//  APAuthInfo.h
-//  APAuth
-//
-//  Created by antfin on 17-10-24.
-//  Copyright (c) 2017年 AntFin. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@interface APayAuthInfo : NSObject
-
-@property(nonatomic, copy)NSString *appID;
-@property(nonatomic, copy)NSString *pid;
-@property(nonatomic, copy)NSString *redirectUri;
-
-/**
- *  初始化AuthInfo
- *
- *  @param appIDStr     应用ID
- *  @param pidStr       商户ID   可不填
- *  @param uriStr       授权的应用回调地址  比如:alidemo://auth
- *
- *  @return authinfo实例
- */
-- (id)initWithAppID:(NSString *)appIDStr
-                pid:(NSString *)pidStr
-        redirectUri:(NSString *)uriStr;
-
-- (NSString *)description;
-- (NSString *)wapDescription;
-
-@end
+//
+//  APAuthInfo.h
+//  APAuth
+//
+//  Created by antfin on 17-10-24.
+//  Copyright (c) 2017年 AntFin. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface APayAuthInfo : NSObject
+
+@property(nonatomic, copy)NSString *appID;
+@property(nonatomic, copy)NSString *pid;
+@property(nonatomic, copy)NSString *redirectUri;
+
+/**
+ *  初始化AuthInfo
+ *
+ *  @param appIDStr     应用ID
+ *  @param pidStr       商户ID   可不填
+ *  @param uriStr       授权的应用回调地址  比如:alidemo://auth
+ *
+ *  @return authinfo实例
+ */
+- (id)initWithAppID:(NSString *)appIDStr
+                pid:(NSString *)pidStr
+        redirectUri:(NSString *)uriStr;
+
+- (NSString *)description;
+- (NSString *)wapDescription;
+
+@end

+ 223 - 223
v5/ios/ios_sdk/Demo/Demo/allpaysdk/AliModule/AlipaySDK.framework/Headers/AlipaySDK.h

@@ -1,223 +1,223 @@
-//
-//  AlipaySDK.h
-//  AlipaySDK
-//
-//  Created by antfin on 17-10-24.
-//  Copyright (c) 2017年 AntFin. All rights reserved.
-//
-
-
-////////////////////////////////////////////////////////
-///////////////// 支付宝标准版本支付SDK ///////////////////
-///////// version:15.7.6  motify:2020.04.28///////////
-////////////////////////////////////////////////////////
-
-#import <UIKit/UIKit.h>
-#import "APayAuthInfo.h"
-#import "AFServiceCenter.h"
-#import "AFServiceResponse.h"
-
-typedef void(^CompletionBlock)(NSDictionary *resultDic);
-
-typedef enum {
-    ALIPAY_TIDFACTOR_IMEI,
-    ALIPAY_TIDFACTOR_IMSI,
-    ALIPAY_TIDFACTOR_TID,
-    ALIPAY_TIDFACTOR_CLIENTKEY,
-    ALIPAY_TIDFACTOR_VIMEI,
-    ALIPAY_TIDFACTOR_VIMSI,
-    ALIPAY_TIDFACTOR_CLIENTID,
-    ALIPAY_TIDFACTOR_APDID,
-    ALIPAY_TIDFACTOR_MAX
-} AlipayTidFactor;
-
-@interface AlipaySDK : NSObject
-
-/**
- *  创建支付单例服务
- *
- *  @return 返回单例对象
- */
-+ (AlipaySDK *)defaultService;
-
-/**
- *  用于设置SDK使用的window,如果没有自行创建window无需设置此接口
- */
-@property (nonatomic, weak) UIWindow *targetWindow;
-
-//////////////////////////////////////////////////////////////////////////////////////////////
-//////////////////////////支付宝支付相关接口/////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////////////////////
-
-/**
- *  支付接口
- *
- *  @param orderStr        支付订单信息字串
- *  @param schemeStr       调用支付的app注册在info.plist中的scheme
- *  @param completionBlock 支付结果回调Block,用于wap支付结果回调
-                           跳转支付宝支付时只有当processOrderWithPaymentResult接口的completionBlock为nil时会使用这个bolock
- */
-- (void)payOrder:(NSString *)orderStr
-      fromScheme:(NSString *)schemeStr
-        callback:(CompletionBlock)completionBlock;
-
-/**
- *  支付接口 v2
- *
- *  @param orderStr        支付订单信息字串
- *  @param dynamicLaunch   是否使用动态配置策略跳转支付宝支付
- *  @param schemeStr       调用支付的app注册在info.plist中的scheme
- *  @param completionBlock 支付结果回调Block,用于wap支付结果回调
- 跳转支付宝支付时只有当processOrderWithPaymentResult接口的completionBlock为nil时会使用这个bolock
- */
-- (void)payOrder:(NSString *)orderStr
-   dynamicLaunch:(BOOL)dynamicLaunch
-      fromScheme:(NSString *)schemeStr
-        callback:(CompletionBlock)completionBlock;
-
-/**
- *  处理支付宝app支付后跳回商户app携带的支付结果Url
- *
- *  @param resultUrl        支付宝app返回的支付结果url
- *  @param completionBlock  支付结果回调 为nil时默认使用支付接口的completionBlock
- */
-- (void)processOrderWithPaymentResult:(NSURL *)resultUrl
-                      standbyCallback:(CompletionBlock)completionBlock;
-
-/**
- *  获取交易token。
- *
- *  @return 交易token,若无则为空。
- */
-- (NSString *)fetchTradeToken;
-
-
-//////////////////////////////////////////////////////////////////////////////////////////////
-//////////////////////////支付宝授权 2.0 相关接口////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////////////////////
-
-/**
- *  快登授权2.0
- *
- *  @param infoStr          授权请求信息字串
- *  @param schemeStr        调用授权的app注册在info.plist中的scheme
- *  @param completionBlock  授权结果回调,需要调用方在appDelegate中调用processAuth_V2Result:standbyCallback:方法获取授权结果
- *                          若在授权过程中,调用方应用被系统终止则此block无效(此时会调用'processAuth_V2Result:standbyCallback:'传入的standbyCallback)
- */
-- (void)auth_V2WithInfo:(NSString *)infoStr
-             fromScheme:(NSString *)schemeStr
-               callback:(CompletionBlock)completionBlock;
-
-/**
- *  处理支付宝app授权后跳回商户app携带的授权结果Url
- *
- *  @param resultUrl        支付宝app返回的授权结果url
- *  @param completionBlock  授权结果回调,用于处理跳转支付宝授权过程中商户APP被系统终止的情况
- */
-- (void)processAuth_V2Result:(NSURL *)resultUrl
-             standbyCallback:(CompletionBlock)completionBlock;
-
-
-//////////////////////////////////////////////////////////////////////////////////////////////
-//////////////////////////支付宝授权 1.0 相关接口////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////////////////////
-
-
-/**
- *  快登授权
- *  @param authInfo         授权相关信息
- *  @param completionBlock  授权结果回调,若在授权过程中,调用方应用被系统终止,则此block无效,
-                            需要调用方在appDelegate中调用processAuth_V2Result:standbyCallback:方法获取授权结果
- */
-- (void)authWithInfo:(APayAuthInfo *)authInfo
-            callback:(CompletionBlock)completionBlock;
-
-/**
- *  处理支付宝app授权后跳回商户app携带的授权结果Url
- *
- *  @param resultUrl        支付宝app返回的授权结果url
- *  @param completionBlock  授权结果回调
- */
-- (void)processAuthResult:(NSURL *)resultUrl
-          standbyCallback:(CompletionBlock)completionBlock;
-
-
-//////////////////////////////////////////////////////////////////////////////////////////////
-//////////////////////////支付宝 h5 支付转 native 支付接口////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////////////////////
-/**
- *  从h5链接中获取订单串并支付接口(自版本15.4.0起,推荐使用该接口)
- *
- *  @param urlStr     拦截的 url string
- *
- *  @return YES为成功获取订单信息并发起支付流程;NO为无法获取订单信息,输入url是普通url
- */
-- (BOOL)payInterceptorWithUrl:(NSString *)urlStr
-                   fromScheme:(NSString *)schemeStr
-                     callback:(CompletionBlock)completionBlock;
-
-
-
-//////////////////////////////////////////////////////////////////////////////////////////////
-//////////////////////////支付宝 tid 相关信息获取接口/////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////////////////////
-
-/**
- *  获取当前tid相关信息
- *
- *  @return tid相关信息
- */
-- (NSString*)queryTidFactor:(AlipayTidFactor)factor;
-
-
-
-//////////////////////////////////////////////////////////////////////////////////////////////
-//////////////////////////支付宝支付环境相关信息接口//////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////////////////////
-
-/**
- *  是否已经使用过
- *
- *  @return YES为已经使用过,NO反之
- */
-- (BOOL)isLogined;
-
-/**
- *  获取当前版本号
- *
- *  @return 当前版本字符串
- */
-- (NSString *)currentVersion;
-
-/**
- *  測試所用,realse包无效
- *
- *  @param url  测试环境
- */
-- (void)setUrl:(NSString *)url;
-
-/**
- *  支付前主动更新本地配置
- *
- *  @param block 更新请求结果回调
- */
-- (void)fetchSdkConfigWithBlock:(void(^)(BOOL success))block;
-
-
-typedef void(^APLogBlock)(NSString *log);
-
-/**
-*   接收AlipaySDK的log信息
-*
-*  @param logBlock 打印log的回调block
-*/
-+ (void)startLogWithBlock:(APLogBlock)logBlock;
-
-/**
-*   停止输出log,会释放logBlock
-*
-*
-*/
-+ (void)stopLog;
-
-@end
+//
+//  AlipaySDK.h
+//  AlipaySDK
+//
+//  Created by antfin on 17-10-24.
+//  Copyright (c) 2017年 AntFin. All rights reserved.
+//
+
+
+////////////////////////////////////////////////////////
+///////////////// 支付宝标准版本支付SDK ///////////////////
+///////// version:15.7.6  motify:2020.04.28///////////
+////////////////////////////////////////////////////////
+
+#import <UIKit/UIKit.h>
+#import "APayAuthInfo.h"
+#import "AFServiceCenter.h"
+#import "AFServiceResponse.h"
+
+typedef void(^CompletionBlock)(NSDictionary *resultDic);
+
+typedef enum {
+    ALIPAY_TIDFACTOR_IMEI,
+    ALIPAY_TIDFACTOR_IMSI,
+    ALIPAY_TIDFACTOR_TID,
+    ALIPAY_TIDFACTOR_CLIENTKEY,
+    ALIPAY_TIDFACTOR_VIMEI,
+    ALIPAY_TIDFACTOR_VIMSI,
+    ALIPAY_TIDFACTOR_CLIENTID,
+    ALIPAY_TIDFACTOR_APDID,
+    ALIPAY_TIDFACTOR_MAX
+} AlipayTidFactor;
+
+@interface AlipaySDK : NSObject
+
+/**
+ *  创建支付单例服务
+ *
+ *  @return 返回单例对象
+ */
++ (AlipaySDK *)defaultService;
+
+/**
+ *  用于设置SDK使用的window,如果没有自行创建window无需设置此接口
+ */
+@property (nonatomic, weak) UIWindow *targetWindow;
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//////////////////////////支付宝支付相关接口/////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  支付接口
+ *
+ *  @param orderStr        支付订单信息字串
+ *  @param schemeStr       调用支付的app注册在info.plist中的scheme
+ *  @param completionBlock 支付结果回调Block,用于wap支付结果回调
+                           跳转支付宝支付时只有当processOrderWithPaymentResult接口的completionBlock为nil时会使用这个bolock
+ */
+- (void)payOrder:(NSString *)orderStr
+      fromScheme:(NSString *)schemeStr
+        callback:(CompletionBlock)completionBlock;
+
+/**
+ *  支付接口 v2
+ *
+ *  @param orderStr        支付订单信息字串
+ *  @param dynamicLaunch   是否使用动态配置策略跳转支付宝支付
+ *  @param schemeStr       调用支付的app注册在info.plist中的scheme
+ *  @param completionBlock 支付结果回调Block,用于wap支付结果回调
+ 跳转支付宝支付时只有当processOrderWithPaymentResult接口的completionBlock为nil时会使用这个bolock
+ */
+- (void)payOrder:(NSString *)orderStr
+   dynamicLaunch:(BOOL)dynamicLaunch
+      fromScheme:(NSString *)schemeStr
+        callback:(CompletionBlock)completionBlock;
+
+/**
+ *  处理支付宝app支付后跳回商户app携带的支付结果Url
+ *
+ *  @param resultUrl        支付宝app返回的支付结果url
+ *  @param completionBlock  支付结果回调 为nil时默认使用支付接口的completionBlock
+ */
+- (void)processOrderWithPaymentResult:(NSURL *)resultUrl
+                      standbyCallback:(CompletionBlock)completionBlock;
+
+/**
+ *  获取交易token。
+ *
+ *  @return 交易token,若无则为空。
+ */
+- (NSString *)fetchTradeToken;
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//////////////////////////支付宝授权 2.0 相关接口////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  快登授权2.0
+ *
+ *  @param infoStr          授权请求信息字串
+ *  @param schemeStr        调用授权的app注册在info.plist中的scheme
+ *  @param completionBlock  授权结果回调,需要调用方在appDelegate中调用processAuth_V2Result:standbyCallback:方法获取授权结果
+ *                          若在授权过程中,调用方应用被系统终止则此block无效(此时会调用'processAuth_V2Result:standbyCallback:'传入的standbyCallback)
+ */
+- (void)auth_V2WithInfo:(NSString *)infoStr
+             fromScheme:(NSString *)schemeStr
+               callback:(CompletionBlock)completionBlock;
+
+/**
+ *  处理支付宝app授权后跳回商户app携带的授权结果Url
+ *
+ *  @param resultUrl        支付宝app返回的授权结果url
+ *  @param completionBlock  授权结果回调,用于处理跳转支付宝授权过程中商户APP被系统终止的情况
+ */
+- (void)processAuth_V2Result:(NSURL *)resultUrl
+             standbyCallback:(CompletionBlock)completionBlock;
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//////////////////////////支付宝授权 1.0 相关接口////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+
+/**
+ *  快登授权
+ *  @param authInfo         授权相关信息
+ *  @param completionBlock  授权结果回调,若在授权过程中,调用方应用被系统终止,则此block无效,
+                            需要调用方在appDelegate中调用processAuth_V2Result:standbyCallback:方法获取授权结果
+ */
+- (void)authWithInfo:(APayAuthInfo *)authInfo
+            callback:(CompletionBlock)completionBlock;
+
+/**
+ *  处理支付宝app授权后跳回商户app携带的授权结果Url
+ *
+ *  @param resultUrl        支付宝app返回的授权结果url
+ *  @param completionBlock  授权结果回调
+ */
+- (void)processAuthResult:(NSURL *)resultUrl
+          standbyCallback:(CompletionBlock)completionBlock;
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//////////////////////////支付宝 h5 支付转 native 支付接口////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ *  从h5链接中获取订单串并支付接口(自版本15.4.0起,推荐使用该接口)
+ *
+ *  @param urlStr     拦截的 url string
+ *
+ *  @return YES为成功获取订单信息并发起支付流程;NO为无法获取订单信息,输入url是普通url
+ */
+- (BOOL)payInterceptorWithUrl:(NSString *)urlStr
+                   fromScheme:(NSString *)schemeStr
+                     callback:(CompletionBlock)completionBlock;
+
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//////////////////////////支付宝 tid 相关信息获取接口/////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  获取当前tid相关信息
+ *
+ *  @return tid相关信息
+ */
+- (NSString*)queryTidFactor:(AlipayTidFactor)factor;
+
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//////////////////////////支付宝支付环境相关信息接口//////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  是否已经使用过
+ *
+ *  @return YES为已经使用过,NO反之
+ */
+- (BOOL)isLogined;
+
+/**
+ *  获取当前版本号
+ *
+ *  @return 当前版本字符串
+ */
+- (NSString *)currentVersion;
+
+/**
+ *  測試所用,realse包无效
+ *
+ *  @param url  测试环境
+ */
+- (void)setUrl:(NSString *)url;
+
+/**
+ *  支付前主动更新本地配置
+ *
+ *  @param block 更新请求结果回调
+ */
+- (void)fetchSdkConfigWithBlock:(void(^)(BOOL success))block;
+
+
+typedef void(^APLogBlock)(NSString *log);
+
+/**
+*   接收AlipaySDK的log信息
+*
+*  @param logBlock 打印log的回调block
+*/
++ (void)startLogWithBlock:(APLogBlock)logBlock;
+
+/**
+*   停止输出log,会释放logBlock
+*
+*
+*/
++ (void)stopLog;
+
+@end

+ 198 - 198
v5/ios/ios_sdk/Demo/Demo/allpaysdk/WXModule/WXApi.h

@@ -1,198 +1,198 @@
-//
-//  WXApi.h
-//  所有Api接口
-//
-//  Created by Wechat on 12-2-28.
-//  Copyright (c) 2012年 Tencent. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import "WXApiObject.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-#pragma mark - WXApiDelegate
-/*! @brief 接收并处理来自微信终端程序的事件消息
- *
- * 接收并处理来自微信终端程序的事件消息,期间微信界面会切换到第三方应用程序。
- * WXApiDelegate 会在handleOpenURL:delegate:中使用并触发。
- */
-@protocol WXApiDelegate <NSObject>
-@optional
-
-/*! @brief 收到一个来自微信的请求,第三方应用程序处理完后调用sendResp向微信发送结果
- *
- * 收到一个来自微信的请求,异步处理完成后必须调用sendResp发送处理结果给微信。
- * 可能收到的请求有GetMessageFromWXReq、ShowMessageFromWXReq等。
- * @param req 具体请求内容,是自动释放的
- */
-- (void)onReq:(BaseReq*)req;
-
-
-
-/*! @brief 发送一个sendReq后,收到微信的回应
- *
- * 收到一个来自微信的处理结果。调用一次sendReq后会收到onResp。
- * 可能收到的处理结果有SendMessageToWXResp、SendAuthResp等。
- * @param resp具体的回应内容,是自动释放的
- */
-- (void)onResp:(BaseResp*)resp;
-
-@end
-
-#pragma mark - WXApiLogDelegate
-
-@protocol WXApiLogDelegate <NSObject>
-
-- (void)onLog:(NSString*)log logLevel:(WXLogLevel)level;
-
-@end
-
-
-#pragma mark - WXApi
-
-/*! @brief 微信Api接口函数类
- *
- * 该类封装了微信终端SDK的所有接口
- */
-@interface WXApi : NSObject
-
-/*! @brief WXApi的成员函数,向微信终端程序注册第三方应用。
- *
- * 需要在每次启动第三方应用程序时调用。
- * @attention 请保证在主线程中调用此函数
- * @param appid 微信开发者ID
- * @param universalLink 微信开发者Universal Link
- * @return 成功返回YES,失败返回NO。
- */
-+ (BOOL)registerApp:(NSString *)appid universalLink:(NSString *)universalLink;
-
-
-/*! @brief 处理旧版微信通过URL启动App时传递的数据
- *
- * 需要在 application:openURL:sourceApplication:annotation:或者application:handleOpenURL中调用。
- * @param url 微信启动第三方应用时传递过来的URL
- * @param delegate  WXApiDelegate对象,用来接收微信触发的消息。
- * @return 成功返回YES,失败返回NO。
- */
-+ (BOOL)handleOpenURL:(NSURL *)url delegate:(nullable id<WXApiDelegate>)delegate;
-
-
-/*! @brief 处理微信通过Universal Link启动App时传递的数据
- *
- * 需要在 application:continueUserActivity:restorationHandler:中调用。
- * @param userActivity 微信启动第三方应用时系统API传递过来的userActivity
- * @param delegate  WXApiDelegate对象,用来接收微信触发的消息。
- * @return 成功返回YES,失败返回NO。
- */
-+ (BOOL)handleOpenUniversalLink:(NSUserActivity *)userActivity delegate:(nullable id<WXApiDelegate>)delegate;
-
-
-/*! @brief 检查微信是否已被用户安装
- *
- * @return 微信已安装返回YES,未安装返回NO。
- */
-+ (BOOL)isWXAppInstalled;
-
-
-
-/*! @brief 判断当前微信的版本是否支持OpenApi
- *
- * @return 支持返回YES,不支持返回NO。
- */
-+ (BOOL)isWXAppSupportApi;
-
-
-
-/*! @brief 获取微信的itunes安装地址
- *
- * @return 微信的安装地址字符串。
- */
-+ (NSString *)getWXAppInstallUrl;
-
-
-
-/*! @brief 获取当前微信SDK的版本号
- *
- * @return 返回当前微信SDK的版本号
- */
-+ (NSString *)getApiVersion;
-
-
-
-/*! @brief 打开微信
- *
- * @return 成功返回YES,失败返回NO。
- */
-+ (BOOL)openWXApp;
-
-
-
-/*! @brief 发送请求到微信,等待微信返回onResp
- *
- * 函数调用后,会切换到微信的界面。第三方应用程序等待微信返回onResp。微信在异步处理完成后一定会调用onResp。支持以下类型
- * SendAuthReq、SendMessageToWXReq、PayReq等。
- * @param req 具体的发送请求。
- * @param completion 调用结果回调block
- */
-+ (void)sendReq:(BaseReq *)req completion:(void (^ __nullable)(BOOL success))completion;
-
-/*! @brief 收到微信onReq的请求,发送对应的应答给微信,并切换到微信界面
- *
- * 函数调用后,会切换到微信的界面。第三方应用程序收到微信onReq的请求,异步处理该请求,完成后必须调用该函数。可能发送的相应有
- * GetMessageFromWXResp、ShowMessageFromWXResp等。
- * @param resp 具体的应答内容
- * @param completion 调用结果回调block
- */
-+ (void)sendResp:(BaseResp*)resp completion:(void (^ __nullable)(BOOL success))completion;
-
-
-/*! @brief 发送Auth请求到微信,支持用户没安装微信,等待微信返回onResp
- *
- * 函数调用后,会切换到微信的界面。第三方应用程序等待微信返回onResp。微信在异步处理完成后一定会调用onResp。支持SendAuthReq类型。
- * @param req 具体的发送请求。
- * @param viewController 当前界面对象。
- * @param delegate  WXApiDelegate对象,用来接收微信触发的消息。
- * @param completion 调用结果回调block
- */
-+ (void)sendAuthReq:(SendAuthReq *)req viewController:(UIViewController*)viewController delegate:(nullable id<WXApiDelegate>)delegate completion:(void (^ __nullable)(BOOL success))completion;
-
-
-/*! @brief 测试函数,用于排查当前App通过Universal Link方式分享到微信的流程
-    注意1:  调用自检函数之前必须要先调用registerApp:universalLink接口, 并确认调用成功
-    注意2:  自检过程中会有Log产生,可以先调用startLogByLevel函数,根据Log排查问题
-    注意3:  会多次回调block
-    注意4:  仅用于新接入SDK时调试使用,请勿在正式环境的调用
- *
- *  当completion回调的step为WXULCheckStepFinal时,表示检测通过,Universal Link接入成功
- *  @param completion 回调Block
- */
-+ (void)checkUniversalLinkReady:(nonnull WXCheckULCompletion)completion;
-
-
-/*! @brief WXApi的成员函数,接受微信的log信息。byBlock
-    注意1:SDK会强引用这个block,注意不要导致内存泄漏,注意不要导致内存泄漏
-    注意2:调用过一次startLog by block之后,如果再调用一次任意方式的startLoad,会释放上一次logBlock,不再回调上一个logBlock
- *
- *  @param level 打印log的级别
- *  @param logBlock 打印log的回调block
- */
-
-+ (void)startLogByLevel:(WXLogLevel)level logBlock:(WXLogBolock)logBlock;
-
-/*! @brief WXApi的成员函数,接受微信的log信息。byDelegate 
-    注意1:sdk会弱引用这个delegate,这里可加任意对象为代理,不需要与WXApiDelegate同一个对象
-    注意2:调用过一次startLog by delegate之后,再调用一次任意方式的startLoad,不会再回调上一个logDelegate对象
- *  @param level 打印log的级别
- *  @param logDelegate 打印log的回调代理,
- */
-+ (void)startLogByLevel:(WXLogLevel)level logDelegate:(id<WXApiLogDelegate>)logDelegate;
-
-/*! @brief 停止打印log,会清理block或者delegate为空,释放block
- *  @param 
- */
-+ (void)stopLog;
-
-@end
-
-NS_ASSUME_NONNULL_END
+//
+//  WXApi.h
+//  所有Api接口
+//
+//  Created by Wechat on 12-2-28.
+//  Copyright (c) 2012年 Tencent. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "WXApiObject.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+#pragma mark - WXApiDelegate
+/*! @brief 接收并处理来自微信终端程序的事件消息
+ *
+ * 接收并处理来自微信终端程序的事件消息,期间微信界面会切换到第三方应用程序。
+ * WXApiDelegate 会在handleOpenURL:delegate:中使用并触发。
+ */
+@protocol WXApiDelegate <NSObject>
+@optional
+
+/*! @brief 收到一个来自微信的请求,第三方应用程序处理完后调用sendResp向微信发送结果
+ *
+ * 收到一个来自微信的请求,异步处理完成后必须调用sendResp发送处理结果给微信。
+ * 可能收到的请求有GetMessageFromWXReq、ShowMessageFromWXReq等。
+ * @param req 具体请求内容,是自动释放的
+ */
+- (void)onReq:(BaseReq*)req;
+
+
+
+/*! @brief 发送一个sendReq后,收到微信的回应
+ *
+ * 收到一个来自微信的处理结果。调用一次sendReq后会收到onResp。
+ * 可能收到的处理结果有SendMessageToWXResp、SendAuthResp等。
+ * @param resp具体的回应内容,是自动释放的
+ */
+- (void)onResp:(BaseResp*)resp;
+
+@end
+
+#pragma mark - WXApiLogDelegate
+
+@protocol WXApiLogDelegate <NSObject>
+
+- (void)onLog:(NSString*)log logLevel:(WXLogLevel)level;
+
+@end
+
+
+#pragma mark - WXApi
+
+/*! @brief 微信Api接口函数类
+ *
+ * 该类封装了微信终端SDK的所有接口
+ */
+@interface WXApi : NSObject
+
+/*! @brief WXApi的成员函数,向微信终端程序注册第三方应用。
+ *
+ * 需要在每次启动第三方应用程序时调用。
+ * @attention 请保证在主线程中调用此函数
+ * @param appid 微信开发者ID
+ * @param universalLink 微信开发者Universal Link
+ * @return 成功返回YES,失败返回NO。
+ */
++ (BOOL)registerApp:(NSString *)appid universalLink:(NSString *)universalLink;
+
+
+/*! @brief 处理旧版微信通过URL启动App时传递的数据
+ *
+ * 需要在 application:openURL:sourceApplication:annotation:或者application:handleOpenURL中调用。
+ * @param url 微信启动第三方应用时传递过来的URL
+ * @param delegate  WXApiDelegate对象,用来接收微信触发的消息。
+ * @return 成功返回YES,失败返回NO。
+ */
++ (BOOL)handleOpenURL:(NSURL *)url delegate:(nullable id<WXApiDelegate>)delegate;
+
+
+/*! @brief 处理微信通过Universal Link启动App时传递的数据
+ *
+ * 需要在 application:continueUserActivity:restorationHandler:中调用。
+ * @param userActivity 微信启动第三方应用时系统API传递过来的userActivity
+ * @param delegate  WXApiDelegate对象,用来接收微信触发的消息。
+ * @return 成功返回YES,失败返回NO。
+ */
++ (BOOL)handleOpenUniversalLink:(NSUserActivity *)userActivity delegate:(nullable id<WXApiDelegate>)delegate;
+
+
+/*! @brief 检查微信是否已被用户安装
+ *
+ * @return 微信已安装返回YES,未安装返回NO。
+ */
++ (BOOL)isWXAppInstalled;
+
+
+
+/*! @brief 判断当前微信的版本是否支持OpenApi
+ *
+ * @return 支持返回YES,不支持返回NO。
+ */
++ (BOOL)isWXAppSupportApi;
+
+
+
+/*! @brief 获取微信的itunes安装地址
+ *
+ * @return 微信的安装地址字符串。
+ */
++ (NSString *)getWXAppInstallUrl;
+
+
+
+/*! @brief 获取当前微信SDK的版本号
+ *
+ * @return 返回当前微信SDK的版本号
+ */
++ (NSString *)getApiVersion;
+
+
+
+/*! @brief 打开微信
+ *
+ * @return 成功返回YES,失败返回NO。
+ */
++ (BOOL)openWXApp;
+
+
+
+/*! @brief 发送请求到微信,等待微信返回onResp
+ *
+ * 函数调用后,会切换到微信的界面。第三方应用程序等待微信返回onResp。微信在异步处理完成后一定会调用onResp。支持以下类型
+ * SendAuthReq、SendMessageToWXReq、PayReq等。
+ * @param req 具体的发送请求。
+ * @param completion 调用结果回调block
+ */
++ (void)sendReq:(BaseReq *)req completion:(void (^ __nullable)(BOOL success))completion;
+
+/*! @brief 收到微信onReq的请求,发送对应的应答给微信,并切换到微信界面
+ *
+ * 函数调用后,会切换到微信的界面。第三方应用程序收到微信onReq的请求,异步处理该请求,完成后必须调用该函数。可能发送的相应有
+ * GetMessageFromWXResp、ShowMessageFromWXResp等。
+ * @param resp 具体的应答内容
+ * @param completion 调用结果回调block
+ */
++ (void)sendResp:(BaseResp*)resp completion:(void (^ __nullable)(BOOL success))completion;
+
+
+/*! @brief 发送Auth请求到微信,支持用户没安装微信,等待微信返回onResp
+ *
+ * 函数调用后,会切换到微信的界面。第三方应用程序等待微信返回onResp。微信在异步处理完成后一定会调用onResp。支持SendAuthReq类型。
+ * @param req 具体的发送请求。
+ * @param viewController 当前界面对象。
+ * @param delegate  WXApiDelegate对象,用来接收微信触发的消息。
+ * @param completion 调用结果回调block
+ */
++ (void)sendAuthReq:(SendAuthReq *)req viewController:(UIViewController*)viewController delegate:(nullable id<WXApiDelegate>)delegate completion:(void (^ __nullable)(BOOL success))completion;
+
+
+/*! @brief 测试函数,用于排查当前App通过Universal Link方式分享到微信的流程
+    注意1:  调用自检函数之前必须要先调用registerApp:universalLink接口, 并确认调用成功
+    注意2:  自检过程中会有Log产生,可以先调用startLogByLevel函数,根据Log排查问题
+    注意3:  会多次回调block
+    注意4:  仅用于新接入SDK时调试使用,请勿在正式环境的调用
+ *
+ *  当completion回调的step为WXULCheckStepFinal时,表示检测通过,Universal Link接入成功
+ *  @param completion 回调Block
+ */
++ (void)checkUniversalLinkReady:(nonnull WXCheckULCompletion)completion;
+
+
+/*! @brief WXApi的成员函数,接受微信的log信息。byBlock
+    注意1:SDK会强引用这个block,注意不要导致内存泄漏,注意不要导致内存泄漏
+    注意2:调用过一次startLog by block之后,如果再调用一次任意方式的startLoad,会释放上一次logBlock,不再回调上一个logBlock
+ *
+ *  @param level 打印log的级别
+ *  @param logBlock 打印log的回调block
+ */
+
++ (void)startLogByLevel:(WXLogLevel)level logBlock:(WXLogBolock)logBlock;
+
+/*! @brief WXApi的成员函数,接受微信的log信息。byDelegate 
+    注意1:sdk会弱引用这个delegate,这里可加任意对象为代理,不需要与WXApiDelegate同一个对象
+    注意2:调用过一次startLog by delegate之后,再调用一次任意方式的startLoad,不会再回调上一个logDelegate对象
+ *  @param level 打印log的级别
+ *  @param logDelegate 打印log的回调代理,
+ */
++ (void)startLogByLevel:(WXLogLevel)level logDelegate:(id<WXApiLogDelegate>)logDelegate;
+
+/*! @brief 停止打印log,会清理block或者delegate为空,释放block
+ *  @param 
+ */
++ (void)stopLog;
+
+@end
+
+NS_ASSUME_NONNULL_END

File diff suppressed because it is too large
+ 1075 - 1075
v5/ios/ios_sdk/Demo/Demo/allpaysdk/WXModule/WXApiObject.h


+ 68 - 68
v5/ios/ios_sdk/Demo/Demo/allpaysdk/WXModule/WechatAuthSDK.h

@@ -1,68 +1,68 @@
-//
-//  WechatAuthSDK.h
-//  WechatAuthSDK
-//
-//  Created by 李凯 on 13-11-29.
-//  Copyright (c) 2013年 Tencent. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import <UIKit/UIKit.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-enum  AuthErrCode {
-    WechatAuth_Err_Ok = 0,  //Auth成功
-    WechatAuth_Err_NormalErr = -1,  //普通错误
-    WechatAuth_Err_NetworkErr = -2, //网络错误
-    WechatAuth_Err_GetQrcodeFailed = -3,    //获取二维码失败
-    WechatAuth_Err_Cancel = -4,     //用户取消授权
-    WechatAuth_Err_Timeout = -5,    //超时
-};
-
-@protocol WechatAuthAPIDelegate<NSObject>
-@optional
-
-- (void)onAuthGotQrcode:(UIImage *)image;  //得到二维码
-- (void)onQrcodeScanned;    //二维码被扫描
-- (void)onAuthFinish:(int)errCode AuthCode:(nullable NSString *)authCode;    //成功登录
-
-@end
-
-@interface WechatAuthSDK : NSObject{
-    NSString *_sdkVersion;
-    __weak id<WechatAuthAPIDelegate> _delegate;
-}
-
-@property(nonatomic, weak, nullable) id<WechatAuthAPIDelegate> delegate;
-@property(nonatomic, readonly) NSString *sdkVersion;   //authSDK版本号
-
-/*! @brief 发送登录请求,等待WechatAuthAPIDelegate回调
- *
- * @param appId 微信开发者ID
- * @param nonceStr 一个随机的尽量不重复的字符串,用来使得每次的signature不同
- * @param timeStamp 时间戳
- * @param scope 应用授权作用域,拥有多个作用域用逗号(,)分隔
- * @param signature 签名
- * @param schemeData 会在扫码后拼在scheme后
- * @return 成功返回YES,失败返回NO
-    注:该实现只保证同时只有一个Auth在运行,Auth未完成或未Stop再次调用Auth接口时会返回NO。
- */
-
-- (BOOL)Auth:(NSString *)appId
-    nonceStr:(NSString *)nonceStr
-   timeStamp:(NSString *)timeStamp
-       scope:(NSString *)scope
-   signature:(NSString *)signature
-  schemeData:(nullable NSString *)schemeData;
-
-
-/*! @brief 暂停登录请求
- *
- * @return 成功返回YES,失败返回NO。
- */
-- (BOOL)StopAuth;
-
-@end
-
-NS_ASSUME_NONNULL_END
+//
+//  WechatAuthSDK.h
+//  WechatAuthSDK
+//
+//  Created by 李凯 on 13-11-29.
+//  Copyright (c) 2013年 Tencent. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+enum  AuthErrCode {
+    WechatAuth_Err_Ok = 0,  //Auth成功
+    WechatAuth_Err_NormalErr = -1,  //普通错误
+    WechatAuth_Err_NetworkErr = -2, //网络错误
+    WechatAuth_Err_GetQrcodeFailed = -3,    //获取二维码失败
+    WechatAuth_Err_Cancel = -4,     //用户取消授权
+    WechatAuth_Err_Timeout = -5,    //超时
+};
+
+@protocol WechatAuthAPIDelegate<NSObject>
+@optional
+
+- (void)onAuthGotQrcode:(UIImage *)image;  //得到二维码
+- (void)onQrcodeScanned;    //二维码被扫描
+- (void)onAuthFinish:(int)errCode AuthCode:(nullable NSString *)authCode;    //成功登录
+
+@end
+
+@interface WechatAuthSDK : NSObject{
+    NSString *_sdkVersion;
+    __weak id<WechatAuthAPIDelegate> _delegate;
+}
+
+@property(nonatomic, weak, nullable) id<WechatAuthAPIDelegate> delegate;
+@property(nonatomic, readonly) NSString *sdkVersion;   //authSDK版本号
+
+/*! @brief 发送登录请求,等待WechatAuthAPIDelegate回调
+ *
+ * @param appId 微信开发者ID
+ * @param nonceStr 一个随机的尽量不重复的字符串,用来使得每次的signature不同
+ * @param timeStamp 时间戳
+ * @param scope 应用授权作用域,拥有多个作用域用逗号(,)分隔
+ * @param signature 签名
+ * @param schemeData 会在扫码后拼在scheme后
+ * @return 成功返回YES,失败返回NO
+    注:该实现只保证同时只有一个Auth在运行,Auth未完成或未Stop再次调用Auth接口时会返回NO。
+ */
+
+- (BOOL)Auth:(NSString *)appId
+    nonceStr:(NSString *)nonceStr
+   timeStamp:(NSString *)timeStamp
+       scope:(NSString *)scope
+   signature:(NSString *)signature
+  schemeData:(nullable NSString *)schemeData;
+
+
+/*! @brief 暂停登录请求
+ *
+ * @return 成功返回YES,失败返回NO。
+ */
+- (BOOL)StopAuth;
+
+@end
+
+NS_ASSUME_NONNULL_END