Bladeren bron

add wx apmp up渠道

benson 6 jaren geleden
bovenliggende
commit
ec2ec8dc7c
56 gewijzigde bestanden met toevoegingen van 409 en 76 verwijderingen
  1. 2 1
      Demo/.gitignore
  2. 38 3
      Demo/allpaysdk/build.gradle
  3. BIN
      Demo/allpaysdk/libs/AllPaySDK.jar
  4. BIN
      Demo/allpaysdk/libs/UPPayAssistEx.jar
  5. BIN
      Demo/allpaysdk/libs/UPPayPluginExPro.jar
  6. BIN
      Demo/allpaysdk/libs/alipaySdk-20180601.jar
  7. 26 0
      Demo/allpaysdk/src/androidTest/java/com/allpayx/sdk/ExampleInstrumentedTest.java
  8. 54 0
      Demo/allpaysdk/src/main/AndroidManifest.xml
  9. BIN
      Demo/allpaysdk/src/main/assets/data.bin
  10. BIN
      Demo/allpaysdk/src/main/jniLibs/arm64-v8a/libentryexpro.so
  11. BIN
      Demo/allpaysdk/src/main/jniLibs/arm64-v8a/libuptsmaddon.so
  12. BIN
      Demo/allpaysdk/src/main/jniLibs/arm64-v8a/libuptsmaddonmi.so
  13. BIN
      Demo/allpaysdk/src/main/jniLibs/armeabi-v7a/libentryexpro.so
  14. BIN
      Demo/allpaysdk/src/main/jniLibs/armeabi-v7a/libuptsmaddon.so
  15. BIN
      Demo/allpaysdk/src/main/jniLibs/armeabi-v7a/libuptsmaddonmi.so
  16. BIN
      Demo/allpaysdk/src/main/jniLibs/armeabi/libentryexpro.so
  17. BIN
      Demo/allpaysdk/src/main/jniLibs/armeabi/libuptsmaddon.so
  18. BIN
      Demo/allpaysdk/src/main/jniLibs/armeabi/libuptsmaddonmi.so
  19. BIN
      Demo/allpaysdk/src/main/jniLibs/x86/libentryexpro.so
  20. BIN
      Demo/allpaysdk/src/main/jniLibs/x86/libuptsmaddon.so
  21. BIN
      Demo/allpaysdk/src/main/jniLibs/x86/libuptsmaddonmi.so
  22. BIN
      Demo/allpaysdk/src/main/jniLibs/x86_64/libentryexpro.so
  23. BIN
      Demo/allpaysdk/src/main/jniLibs/x86_64/libuptsmaddon.so
  24. BIN
      Demo/allpaysdk/src/main/jniLibs/x86_64/libuptsmaddonmi.so
  25. 17 0
      Demo/allpaysdk/src/test/java/com/allpayx/sdk/ExampleUnitTest.java
  26. 5 0
      Demo/app/build.gradle
  27. 17 0
      Demo/app/src/main/AndroidManifest.xml
  28. 12 9
      Demo/app/src/main/java/com/vtpayment/plugin/MainActivity.java
  29. 1 2
      Demo/app/src/main/res/values/strings.xml
  30. 1 1
      Demo/build.gradle
  31. 28 6
      README.md
  32. 75 50
      allpaysdk/allpaysdk.iml
  33. 36 4
      allpaysdk/build.gradle
  34. BIN
      allpaysdk/libs/AllPaySDK.jar
  35. BIN
      allpaysdk/libs/UPPayAssistEx.jar
  36. BIN
      allpaysdk/libs/UPPayPluginExPro.jar
  37. BIN
      allpaysdk/libs/alipaySdk-20180601.jar
  38. 26 0
      allpaysdk/src/androidTest/java/com/allpayx/sdk/ExampleInstrumentedTest.java
  39. 54 0
      allpaysdk/src/main/AndroidManifest.xml
  40. BIN
      allpaysdk/src/main/assets/data.bin
  41. BIN
      allpaysdk/src/main/jniLibs/arm64-v8a/libentryexpro.so
  42. BIN
      allpaysdk/src/main/jniLibs/arm64-v8a/libuptsmaddon.so
  43. BIN
      allpaysdk/src/main/jniLibs/arm64-v8a/libuptsmaddonmi.so
  44. BIN
      allpaysdk/src/main/jniLibs/armeabi-v7a/libentryexpro.so
  45. BIN
      allpaysdk/src/main/jniLibs/armeabi-v7a/libuptsmaddon.so
  46. BIN
      allpaysdk/src/main/jniLibs/armeabi-v7a/libuptsmaddonmi.so
  47. BIN
      allpaysdk/src/main/jniLibs/armeabi/libentryexpro.so
  48. BIN
      allpaysdk/src/main/jniLibs/armeabi/libuptsmaddon.so
  49. BIN
      allpaysdk/src/main/jniLibs/armeabi/libuptsmaddonmi.so
  50. BIN
      allpaysdk/src/main/jniLibs/x86/libentryexpro.so
  51. BIN
      allpaysdk/src/main/jniLibs/x86/libuptsmaddon.so
  52. BIN
      allpaysdk/src/main/jniLibs/x86/libuptsmaddonmi.so
  53. BIN
      allpaysdk/src/main/jniLibs/x86_64/libentryexpro.so
  54. BIN
      allpaysdk/src/main/jniLibs/x86_64/libuptsmaddon.so
  55. BIN
      allpaysdk/src/main/jniLibs/x86_64/libuptsmaddonmi.so
  56. 17 0
      allpaysdk/src/test/java/com/allpayx/sdk/ExampleUnitTest.java

+ 2 - 1
Demo/.gitignore

@@ -6,4 +6,5 @@
 /build
 /captures
 .externalNativeBuild
-
+.bugtags.log
+/PushSDK

+ 38 - 3
Demo/allpaysdk/build.gradle

@@ -33,9 +33,16 @@ android {
         javaMaxHeapSize "4g"
     }
 
-
+    android {
+        lintOptions {
+            abortOnError false
+        }
     }
 
+
+
+}
+
 repositories {
     mavenCentral()
     flatDir {
@@ -44,13 +51,12 @@ repositories {
 }
 
 dependencies {
-    compile fileTree(dir: 'libs', include: ['*.jar'])
+    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'
     testCompile 'junit:junit:4.12'
-
     compile(name: 'peb-lib', ext: 'aar')
     compile 'com.android.support:cardview-v7:25.3.1'
     compile 'com.android.support:recyclerview-v7:25.3.1'
@@ -61,7 +67,36 @@ dependencies {
     compile 'com.squareup.retrofit2:retrofit:2.3.0'
     compile 'com.squareup.retrofit2:converter-gson:2.3.0'
     compile 'com.google.android.gms:play-services-auth:8.3.0'
+    compile 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+'
+    //微信
+    compile files('libs/UPPayAssistEx.jar')
+    compile files('libs/UPPayPluginExPro.jar')
+    compile files('libs/alipaySdk-20180601.jar')
     compile files('libs/AllPaySDK.jar')
+}
+
+
+
 
+task makeJar(type: Copy) {
+    //删除存在的
+    delete 'build/libs/AllPaySDK.jar'
+    //设置拷贝的文件
+    from('build/intermediates/bundles/release/')
+    //打进jar包后的文件目录
+    into('build/libs/')
+    //将classes.jar放入build/libs/目录下
+    exclude('com/allpayx/sdk/BuildConfig.class')
+    exclude('com/allpayx/sdk/BuildConfig\$*.class')
+    exclude('**/R.class')
+    exclude('**/R\$*.class')
 
+    exclude('com/unionpay/res/*')
+
+    include('classes.jar')
+    //重命名
+    rename ('classes.jar', 'AllPaySDK.jar')
 }
+
+makeJar.dependsOn(build)
+

BIN
Demo/allpaysdk/libs/AllPaySDK.jar


BIN
Demo/allpaysdk/libs/UPPayAssistEx.jar


BIN
Demo/allpaysdk/libs/UPPayPluginExPro.jar


BIN
Demo/allpaysdk/libs/alipaySdk-20180601.jar


+ 26 - 0
Demo/allpaysdk/src/androidTest/java/com/allpayx/sdk/ExampleInstrumentedTest.java

@@ -0,0 +1,26 @@
+package com.allpayx.sdk;
+
+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.allpayx.sdk.test", appContext.getPackageName());
+    }
+}

+ 54 - 0
Demo/allpaysdk/src/main/AndroidManifest.xml

@@ -1,10 +1,23 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
 
     package="com.allpayx.sdk">
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
+    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
     <uses-permission android:name="android.permission.READ_PHONE_STATE" />
+
+    <uses-permission android:name="org.simalliance.openmobileapi.SMARTCARD" />
+
+    <uses-permission android:name="android.permission.NFC" />
+    <uses-feature android:name="android.hardware.nfc.hce"/>
+
+
     <application android:allowBackup="true" android:label="@string/app_name"
         android:supportsRtl="true">
 
+
+
         <activity
             android:name="com.allpayx.sdk.activity.AllPayActivity"
             android:excludeFromRecents="true"
@@ -12,6 +25,47 @@
             android:theme="@android:style/Theme.Translucent.NoTitleBar" />
 
 
+        <!-- upay sdk begin -->
+
+        <uses-library android:name="org.simalliance.openmobileapi" android:required="false"/>
+        <activity
+            android:name="com.unionpay.uppay.PayActivity"
+            android:configChanges="orientation|keyboardHidden|keyboard"
+            android:screenOrientation="portrait">
+        </activity>
+
+        <activity
+            android:name="com.unionpay.UPPayWapActivity"
+            android:configChanges="orientation|keyboardHidden|fontScale"
+            android:screenOrientation="portrait"
+            android:windowSoftInputMode="adjustResize" >
+        </activity>
+        <!-- upay sdk end -->
+
+
+        <!-- alipay sdk begin -->
+
+        <activity
+            android:name="com.alipay.sdk.app.H5PayActivity"
+            android:configChanges="orientation|keyboardHidden|navigation"
+            android:exported="false"
+            android:screenOrientation="behind"
+            android:windowSoftInputMode="adjustResize|stateHidden" >
+        </activity>
+
+        <activity
+            android:name="com.alipay.sdk.app.H5AuthActivity"
+            android:configChanges="orientation|keyboardHidden|navigation"
+            android:exported="false"
+            android:screenOrientation="behind"
+            android:windowSoftInputMode="adjustResize|stateHidden" >
+        </activity>
+
+        <!-- alipay sdk end -->
+
     </application>
 
+
+
+
 </manifest>

BIN
Demo/allpaysdk/src/main/assets/data.bin


BIN
Demo/allpaysdk/src/main/jniLibs/arm64-v8a/libentryexpro.so


BIN
Demo/allpaysdk/src/main/jniLibs/arm64-v8a/libuptsmaddon.so


BIN
Demo/allpaysdk/src/main/jniLibs/arm64-v8a/libuptsmaddonmi.so


BIN
Demo/allpaysdk/src/main/jniLibs/armeabi-v7a/libentryexpro.so


BIN
Demo/allpaysdk/src/main/jniLibs/armeabi-v7a/libuptsmaddon.so


BIN
Demo/allpaysdk/src/main/jniLibs/armeabi-v7a/libuptsmaddonmi.so


BIN
Demo/allpaysdk/src/main/jniLibs/armeabi/libentryexpro.so


BIN
Demo/allpaysdk/src/main/jniLibs/armeabi/libuptsmaddon.so


BIN
Demo/allpaysdk/src/main/jniLibs/armeabi/libuptsmaddonmi.so


BIN
Demo/allpaysdk/src/main/jniLibs/x86/libentryexpro.so


BIN
Demo/allpaysdk/src/main/jniLibs/x86/libuptsmaddon.so


BIN
Demo/allpaysdk/src/main/jniLibs/x86/libuptsmaddonmi.so


BIN
Demo/allpaysdk/src/main/jniLibs/x86_64/libentryexpro.so


BIN
Demo/allpaysdk/src/main/jniLibs/x86_64/libuptsmaddon.so


BIN
Demo/allpaysdk/src/main/jniLibs/x86_64/libuptsmaddonmi.so


+ 17 - 0
Demo/allpaysdk/src/test/java/com/allpayx/sdk/ExampleUnitTest.java

@@ -0,0 +1,17 @@
+package com.allpayx.sdk;
+
+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);
+    }
+}

+ 5 - 0
Demo/app/build.gradle

@@ -17,6 +17,10 @@ android {
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
         }
     }
+
+
+
+
 }
 
 dependencies {
@@ -34,5 +38,6 @@ dependencies {
 repositories {
     flatDir {
         dirs project(':allpaysdk').file('libs')
+
     }
 }

+ 17 - 0
Demo/app/src/main/AndroidManifest.xml

@@ -26,6 +26,23 @@
 
 
 
+
+        <!-- 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>

+ 12 - 9
Demo/app/src/main/java/com/vtpayment/plugin/MainActivity.java

@@ -4,6 +4,7 @@ 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;
@@ -26,9 +27,9 @@ import java.util.Map;
 
 public class MainActivity extends AppCompatActivity {
 
-    private static final String[] currency = {"INR", "HKD", "CNY", "JPY", "EUR", "USD"};
+    private static final String[] currency = { "CNY", "HKD", "JPY", "EUR", "USD","INR"};
     private static String payType[];
-    private static final String[] paymentSchemas = {"EB"};
+    private static final String[] paymentSchemas = {"WX","EB","UP","APMP"};
 
     private ProgressDialog progressDialog;
     Map<String,String> params = new HashMap<String,String>();
@@ -42,9 +43,11 @@ public class MainActivity extends AppCompatActivity {
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_main);
-        payType = new String[1];
-        payType[0] = getResources().getString(R.string.pay_type_eb);
-
+        payType = new String[4];
+        payType[0] = getResources().getString(R.string.pay_type_wx);
+        payType[1] = getResources().getString(R.string.pay_type_eb);
+        payType[2] = getResources().getString(R.string.pay_type_up);
+        payType[3] = getResources().getString(R.string.pay_type_apmp);
         // 通用参数
 
         params.put("version", "VER000000002");
@@ -107,7 +110,7 @@ public class MainActivity extends AppCompatActivity {
                         params.put("trxn_firstname","benson zhang");
                         params.put("trxn_email_id","benson.zhang@allpayx.com");
                         params.put("trxn_phone","15026528888");
-                        params.put("trxn_is_coupon_enabled","1");
+                        params.put("trxn_is_coupon_enabled","0");
                         params.put("unique_id","abcde12345");//不能大于10位
 
                     }
@@ -145,9 +148,9 @@ public class MainActivity extends AppCompatActivity {
                 String result = HttpUtil.reqStr("https://testapi.allpayx.com/app/pay", params, HttpUtil.METHOD_POST);//测试
                 progressDialog.dismiss();
                 Log.i("opp", "result=" + result);
-                String code = JsonUtil.getParam(result, "code");
-                if (code.equals("00")) {
-                    String tn = JsonUtil.getParam(result, "tn");
+                String tn = JsonUtil.getParam(result, "tn");
+                if (!TextUtils.isEmpty(tn)) {
+
                     Log.i("opp", "tn=" + tn);
                     AllPayEngine.pay(MainActivity.this, tn, false);
                 } else {

+ 1 - 2
Demo/app/src/main/res/values/strings.xml

@@ -5,8 +5,7 @@
     <string name="pay_type_yl">银联(易联)</string>
     <string name="pay_type_apmp">支付宝</string>
     <string name="pay_type_wx">微信</string>
-    <string name="pay_type_upacp">银联(境内)</string>
-    <string name="pay_type_up">银联(境外)</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>

+ 1 - 1
Demo/build.gradle

@@ -5,7 +5,7 @@ buildscript {
         jcenter()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.3.3'
+        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

+ 28 - 6
README.md

@@ -1,9 +1,9 @@
-#Android端控件支付产品接口规范文档4.0.0
+#Android端控件支付产品接口规范文档4.0.2
 
 [上海偶可贝网络科技有限公司](https://www.allpayx.com)
 
-* 版本信息:中文 V4.0.0
-* 更新时间:2018 年4
+* 版本信息:中文 V4.0.2
+* 更新时间:2018 年7
 
 #### 1.概述
 AllPay 为基于移动端 APP 支付的客户提供接入插件(下文简称“SDK”),以帮助客户实 现快速、安全、集中式的接入支付渠道。
@@ -58,9 +58,7 @@ AllPay 为基于移动端 APP 支付的客户提供接入插件(下文简称“S
 
  序号 |名称  |长度|类型|参数名称|备注 
  -----|-----|----|----|------|------
-  1|应答码 |2|文本|code |应答码,00成功 
-  2|错误信息 |32|文本|msg |错误信息
-  3|交易流水号 |32|文本|tn |tn 作为调起 sdk 支付的参数,code等于"00"时返回该字段
+  1|交易流水号 |32|文本|tn |tn 作为调起 sdk 支付的参数返回该字段
   
 ##### 3.4. 查询交易接口 
 
@@ -268,5 +266,29 @@ errorDetail:错误详情
   4|优惠券选项 |1  |文本|trxn_is_coupon_enabled| If the value is 0 then customer will not be able to see the coupons. If the value is 1 then customer will be able see the coupons and able to select the coupons
   5|客户id |10  |文本|unique_id|This is customer’s unique id.不能超过10位
  
+##### 5.2 WX渠道
+* 渠道配置
+  
+  在主项目的AndroidManifest.xml文件中添加添加如下配置
+  
+```
+  
+  <!-- wpay sdk begin -->
+
 
+<activity
+    android:name="com.allpayx.sdk.wxapi.WXPayEntryActivity"
+    android:exported="true"
+    android:launchMode="singleTop" />
+
+
+<activity-alias
+    android:name=".wxapi.WXPayEntryActivity"
+    android:exported="true"
+    android:launchMode="singleTop"
+    android:targetActivity="com.allpayx.sdk.wxapi.WXPayEntryActivity" />
+
+<!-- wpay sdk end -->
+
+```
 

+ 75 - 50
allpaysdk/allpaysdk.iml

@@ -23,7 +23,7 @@
       </configuration>
     </facet>
   </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
     <output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
     <output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
     <exclude-output />
@@ -63,13 +63,6 @@
       <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
       <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
       <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
       <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
@@ -77,10 +70,39 @@
       <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
       <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
       <sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support.test.espresso/espresso-core/2.2.2/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support.test.espresso/espresso-idling-resource/2.2.2/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support.test/exposed-instrumentation-api-publish/0.5/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support.test/rules/0.5/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support.test/runner/0.5/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/25.3.1/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/25.3.1/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/cardview-v7/25.3.1/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/multidex-instrumentation/1.0.1/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/multidex/1.0.1/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/25.3.1/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-compat/25.3.1/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-ui/25.3.1/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-utils/25.3.1/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-fragment/25.3.1/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-media-compat/25.3.1/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/25.3.1/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/25.3.1/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-auth/8.3.0/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-base/8.3.0/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-basement/8.3.0/jars" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/peb-lib/jars" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
@@ -90,53 +112,56 @@
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/typedefs.txt" />
       <excludeFolder url="file://$MODULE_DIR$/build/outputs" />
       <excludeFolder url="file://$MODULE_DIR$/build/tmp" />
     </content>
     <orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" exported="" name="AllPaySDK" level="project" />
-    <orderEntry type="library" exported="" name="play-services-auth-8.3.0" level="project" />
-    <orderEntry type="library" exported="" scope="TEST" name="runner-0.5" level="project" />
-    <orderEntry type="library" exported="" scope="TEST" name="espresso-idling-resource-2.2.2" level="project" />
-    <orderEntry type="library" exported="" name="picasso-2.4.0" level="project" />
-    <orderEntry type="library" exported="" name="peb-lib-" level="project" />
-    <orderEntry type="library" exported="" name="play-services-base-8.3.0" level="project" />
-    <orderEntry type="library" exported="" name="okhttp-2.4.0" level="project" />
-    <orderEntry type="library" exported="" scope="TEST" name="hamcrest-library-1.3" level="project" />
-    <orderEntry type="library" exported="" scope="TEST" name="hamcrest-integration-1.3" level="project" />
-    <orderEntry type="library" exported="" name="support-core-ui-25.3.1" level="project" />
-    <orderEntry type="library" exported="" name="cardview-v7-25.3.1" level="project" />
-    <orderEntry type="library" exported="" name="glide-3.5.2" level="project" />
-    <orderEntry type="library" exported="" name="support-core-utils-25.3.1" level="project" />
-    <orderEntry type="library" exported="" name="support-fragment-25.3.1" level="project" />
-    <orderEntry type="library" exported="" scope="TEST" name="jsr305-2.0.1" level="project" />
-    <orderEntry type="library" exported="" scope="TEST" name="multidex-instrumentation-1.0.1" level="project" />
-    <orderEntry type="library" exported="" scope="TEST" name="espresso-core-2.2.2" level="project" />
-    <orderEntry type="library" exported="" scope="TEST" name="exposed-instrumentation-api-publish-0.5" level="project" />
-    <orderEntry type="library" exported="" scope="TEST" name="rules-0.5" level="project" />
-    <orderEntry type="library" exported="" name="okio-1.13.0" level="project" />
-    <orderEntry type="library" exported="" name="retrofit-2.3.0" level="project" />
-    <orderEntry type="library" exported="" scope="TEST" name="javax.annotation-api-1.2" level="project" />
-    <orderEntry type="library" exported="" name="converter-gson-2.3.0" level="project" />
-    <orderEntry type="library" exported="" name="gson-2.7" level="project" />
-    <orderEntry type="library" exported="" scope="TEST" name="javax.inject-1" level="project" />
-    <orderEntry type="library" exported="" name="okhttp-3.8.0" level="project" />
-    <orderEntry type="library" exported="" name="play-services-basement-8.3.0" level="project" />
-    <orderEntry type="library" exported="" name="multidex-1.0.1" level="project" />
-    <orderEntry type="library" exported="" name="support-v4-25.3.1" level="project" />
-    <orderEntry type="library" exported="" name="support-media-compat-25.3.1" level="project" />
-    <orderEntry type="library" exported="" scope="TEST" name="javawriter-2.1.1" level="project" />
-    <orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" />
-    <orderEntry type="library" exported="" scope="TEST" name="junit-4.12" level="project" />
-    <orderEntry type="library" exported="" name="recyclerview-v7-25.3.1" level="project" />
-    <orderEntry type="library" exported="" name="support-annotations-25.3.1" level="project" />
-    <orderEntry type="library" exported="" name="appcompat-v7-25.3.1" level="project" />
-    <orderEntry type="library" exported="" name="support-vector-drawable-25.3.1" level="project" />
-    <orderEntry type="library" exported="" name="okhttp-urlconnection-2.2.0" level="project" />
-    <orderEntry type="library" exported="" name="support-compat-25.3.1" level="project" />
-    <orderEntry type="library" exported="" name="animated-vector-drawable-25.3.1" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.android.support:appcompat-v7-25.3.1" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-fragment-25.3.1" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-annotations:25.3.1@jar" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: __local_jars__:/opt/Desktop/gitwork/allpaysdk/android_sdk/Demo/allpaysdk/libs/UPPayAssistEx.jar:unspecified@jar" level="project" />
+    <orderEntry type="library" exported="" scope="TEST" name="Gradle: com.android.support.test.espresso:espresso-idling-resource-2.2.2" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-media-compat-25.3.1" level="project" />
+    <orderEntry type="library" exported="" scope="TEST" name="Gradle: javax.annotation:javax.annotation-api:1.2@jar" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.squareup.okio:okio:1.13.0@jar" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.google.code.gson:gson:2.7@jar" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.google.android.gms:play-services-basement-8.3.0" level="project" />
+    <orderEntry type="library" exported="" scope="TEST" name="Gradle: com.android.support.test.espresso:espresso-core-2.2.2" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.android.support:multidex-1.0.1" level="project" />
+    <orderEntry type="library" exported="" scope="TEST" name="Gradle: com.squareup:javawriter:2.1.1@jar" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.android.support:animated-vector-drawable-25.3.1" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-compat-25.3.1" level="project" />
+    <orderEntry type="library" exported="" scope="TEST" name="Gradle: com.android.support.test:rules-0.5" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.squareup.okhttp:okhttp-urlconnection:2.2.0@jar" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: peb-lib:@aar" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.squareup.retrofit2:converter-gson:2.3.0@jar" level="project" />
+    <orderEntry type="library" exported="" scope="TEST" name="Gradle: com.google.code.findbugs:jsr305:2.0.1@jar" level="project" />
+    <orderEntry type="library" exported="" scope="TEST" name="Gradle: javax.inject:javax.inject:1@jar" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-v4-25.3.1" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.squareup.retrofit2:retrofit:2.3.0@jar" level="project" />
+    <orderEntry type="library" exported="" scope="TEST" name="Gradle: junit:junit:4.12@jar" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.squareup.okhttp:okhttp:2.4.0@jar" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.github.bumptech.glide:glide:3.5.2@jar" level="project" />
+    <orderEntry type="library" exported="" scope="TEST" name="Gradle: org.hamcrest:hamcrest-core:1.3@jar" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-core-ui-25.3.1" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: __local_jars__:/opt/Desktop/gitwork/allpaysdk/android_sdk/Demo/allpaysdk/libs/alipaySdk-20180601.jar:unspecified@jar" level="project" />
+    <orderEntry type="library" exported="" scope="TEST" name="Gradle: com.android.support.test:runner-0.5" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.android.support:cardview-v7-25.3.1" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.tencent.mm.opensdk:wechat-sdk-android-without-mta:5.1.4@jar" level="project" />
+    <orderEntry type="library" exported="" scope="TEST" name="Gradle: com.android.support:multidex-instrumentation-1.0.1" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.squareup.okhttp3:okhttp:3.8.0@jar" level="project" />
+    <orderEntry type="library" exported="" scope="TEST" name="Gradle: com.android.support.test:exposed-instrumentation-api-publish-0.5" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.squareup.picasso:picasso:2.4.0@jar" level="project" />
+    <orderEntry type="library" exported="" scope="TEST" name="Gradle: org.hamcrest:hamcrest-library:1.3@jar" level="project" />
+    <orderEntry type="library" exported="" scope="TEST" name="Gradle: org.hamcrest:hamcrest-integration:1.3@jar" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.google.android.gms:play-services-auth-8.3.0" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.android.support:recyclerview-v7-25.3.1" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-vector-drawable-25.3.1" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: __local_jars__:/opt/Desktop/gitwork/allpaysdk/android_sdk/Demo/allpaysdk/libs/UPPayPluginExPro.jar:unspecified@jar" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-core-utils-25.3.1" level="project" />
+    <orderEntry type="library" exported="" name="Gradle: com.google.android.gms:play-services-base-8.3.0" level="project" />
   </component>
 </module>

+ 36 - 4
allpaysdk/build.gradle

@@ -33,9 +33,16 @@ android {
         javaMaxHeapSize "4g"
     }
 
-
+    android {
+        lintOptions {
+            abortOnError false
+        }
     }
 
+
+
+}
+
 repositories {
     mavenCentral()
     flatDir {
@@ -44,13 +51,12 @@ repositories {
 }
 
 dependencies {
-    compile fileTree(dir: 'libs', include: ['*.jar'])
+    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'
     testCompile 'junit:junit:4.12'
-
     compile(name: 'peb-lib', ext: 'aar')
     compile 'com.android.support:cardview-v7:25.3.1'
     compile 'com.android.support:recyclerview-v7:25.3.1'
@@ -61,7 +67,33 @@ dependencies {
     compile 'com.squareup.retrofit2:retrofit:2.3.0'
     compile 'com.squareup.retrofit2:converter-gson:2.3.0'
     compile 'com.google.android.gms:play-services-auth:8.3.0'
-    compile files('libs/AllPaySDK.jar')
+    compile 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+'
+    //微信
+    compile files('libs/UPPayAssistEx.jar')
+    compile files('libs/UPPayPluginExPro.jar')
+    compile files('libs/alipaySdk-20180601.jar')
+}
+
 
 
+
+task makeJar(type: Copy) {
+    //删除存在的
+    delete 'build/libs/AllPaySDK.jar'
+    //设置拷贝的文件
+    from('build/intermediates/bundles/release/')
+    //打进jar包后的文件目录
+    into('build/libs/')
+    //将classes.jar放入build/libs/目录下
+    exclude "**/**/**/BuildConfig.class"
+    exclude "**/**/**/BuildConfig\$*.class"
+    exclude('**/R.class')
+    exclude('**/R\$*.class')
+    include('xxx/**/*.class')
+    include('classes.jar')
+    //重命名
+    rename ('classes.jar', 'AllPaySDK.jar')
 }
+
+makeJar.dependsOn(build)
+

BIN
allpaysdk/libs/AllPaySDK.jar


BIN
allpaysdk/libs/UPPayAssistEx.jar


BIN
allpaysdk/libs/UPPayPluginExPro.jar


BIN
allpaysdk/libs/alipaySdk-20180601.jar


+ 26 - 0
allpaysdk/src/androidTest/java/com/allpayx/sdk/ExampleInstrumentedTest.java

@@ -0,0 +1,26 @@
+package com.allpayx.sdk;
+
+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.allpayx.sdk.test", appContext.getPackageName());
+    }
+}

+ 54 - 0
allpaysdk/src/main/AndroidManifest.xml

@@ -1,10 +1,23 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
 
     package="com.allpayx.sdk">
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
+    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
     <uses-permission android:name="android.permission.READ_PHONE_STATE" />
+
+    <uses-permission android:name="org.simalliance.openmobileapi.SMARTCARD" />
+
+    <uses-permission android:name="android.permission.NFC" />
+    <uses-feature android:name="android.hardware.nfc.hce"/>
+
+
     <application android:allowBackup="true" android:label="@string/app_name"
         android:supportsRtl="true">
 
+
+
         <activity
             android:name="com.allpayx.sdk.activity.AllPayActivity"
             android:excludeFromRecents="true"
@@ -12,6 +25,47 @@
             android:theme="@android:style/Theme.Translucent.NoTitleBar" />
 
 
+        <!-- upay sdk begin -->
+
+        <uses-library android:name="org.simalliance.openmobileapi" android:required="false"/>
+        <activity
+            android:name="com.unionpay.uppay.PayActivity"
+            android:configChanges="orientation|keyboardHidden|keyboard"
+            android:screenOrientation="portrait">
+        </activity>
+
+        <activity
+            android:name="com.unionpay.UPPayWapActivity"
+            android:configChanges="orientation|keyboardHidden|fontScale"
+            android:screenOrientation="portrait"
+            android:windowSoftInputMode="adjustResize" >
+        </activity>
+        <!-- upay sdk end -->
+
+
+        <!-- alipay sdk begin -->
+
+        <activity
+            android:name="com.alipay.sdk.app.H5PayActivity"
+            android:configChanges="orientation|keyboardHidden|navigation"
+            android:exported="false"
+            android:screenOrientation="behind"
+            android:windowSoftInputMode="adjustResize|stateHidden" >
+        </activity>
+
+        <activity
+            android:name="com.alipay.sdk.app.H5AuthActivity"
+            android:configChanges="orientation|keyboardHidden|navigation"
+            android:exported="false"
+            android:screenOrientation="behind"
+            android:windowSoftInputMode="adjustResize|stateHidden" >
+        </activity>
+
+        <!-- alipay sdk end -->
+
     </application>
 
+
+
+
 </manifest>

BIN
allpaysdk/src/main/assets/data.bin


BIN
allpaysdk/src/main/jniLibs/arm64-v8a/libentryexpro.so


BIN
allpaysdk/src/main/jniLibs/arm64-v8a/libuptsmaddon.so


BIN
allpaysdk/src/main/jniLibs/arm64-v8a/libuptsmaddonmi.so


BIN
allpaysdk/src/main/jniLibs/armeabi-v7a/libentryexpro.so


BIN
allpaysdk/src/main/jniLibs/armeabi-v7a/libuptsmaddon.so


BIN
allpaysdk/src/main/jniLibs/armeabi-v7a/libuptsmaddonmi.so


BIN
allpaysdk/src/main/jniLibs/armeabi/libentryexpro.so


BIN
allpaysdk/src/main/jniLibs/armeabi/libuptsmaddon.so


BIN
allpaysdk/src/main/jniLibs/armeabi/libuptsmaddonmi.so


BIN
allpaysdk/src/main/jniLibs/x86/libentryexpro.so


BIN
allpaysdk/src/main/jniLibs/x86/libuptsmaddon.so


BIN
allpaysdk/src/main/jniLibs/x86/libuptsmaddonmi.so


BIN
allpaysdk/src/main/jniLibs/x86_64/libentryexpro.so


BIN
allpaysdk/src/main/jniLibs/x86_64/libuptsmaddon.so


BIN
allpaysdk/src/main/jniLibs/x86_64/libuptsmaddonmi.so


+ 17 - 0
allpaysdk/src/test/java/com/allpayx/sdk/ExampleUnitTest.java

@@ -0,0 +1,17 @@
+package com.allpayx.sdk;
+
+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);
+    }
+}