diff --git a/.gitignore b/.gitignore index 28c6b93..20fd839 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ -ignore something \ No newline at end of file +ignore something +Demo/AndroidStudio_mirror +*/.DS_Store +*/.idea diff --git a/Core SDK/AndroidStudio/paymentwall-android-sdk.aar b/Core SDK/AndroidStudio/paymentwall-android-sdk.aar index bd186bc..253466b 100644 Binary files a/Core SDK/AndroidStudio/paymentwall-android-sdk.aar and b/Core SDK/AndroidStudio/paymentwall-android-sdk.aar differ diff --git a/Demo/AndroidStudio/.gitignore b/Demo/AndroidStudio/.gitignore index c6cbe56..c88a4b6 100644 --- a/Demo/AndroidStudio/.gitignore +++ b/Demo/AndroidStudio/.gitignore @@ -1,8 +1,7 @@ *.iml .gradle /local.properties -/.idea/workspace.xml -/.idea/libraries +.idea .DS_Store /build /captures diff --git a/Demo/AndroidStudio/.idea/encodings.xml b/Demo/AndroidStudio/.idea/encodings.xml deleted file mode 100644 index 97626ba..0000000 --- a/Demo/AndroidStudio/.idea/encodings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Demo/AndroidStudio/.idea/gradle.xml b/Demo/AndroidStudio/.idea/gradle.xml index 156955f..d291b3d 100644 --- a/Demo/AndroidStudio/.idea/gradle.xml +++ b/Demo/AndroidStudio/.idea/gradle.xml @@ -8,15 +8,8 @@ diff --git a/Demo/AndroidStudio/.idea/misc.xml b/Demo/AndroidStudio/.idea/misc.xml index 74aef28..37a7509 100644 --- a/Demo/AndroidStudio/.idea/misc.xml +++ b/Demo/AndroidStudio/.idea/misc.xml @@ -1,60 +1,9 @@ - - - - - + - - - - - 1.8 - - - - - - - \ No newline at end of file diff --git a/Demo/AndroidStudio/.idea/modules.xml b/Demo/AndroidStudio/.idea/modules.xml index 7a22ae5..c99d3da 100644 --- a/Demo/AndroidStudio/.idea/modules.xml +++ b/Demo/AndroidStudio/.idea/modules.xml @@ -3,7 +3,6 @@ - diff --git a/Demo/AndroidStudio/app/build.gradle b/Demo/AndroidStudio/app/build.gradle index 35e2911..6293c57 100644 --- a/Demo/AndroidStudio/app/build.gradle +++ b/Demo/AndroidStudio/app/build.gradle @@ -4,11 +4,12 @@ android { compileSdkVersion 28 defaultConfig { applicationId "com.paymentwall.pwsdkdemo" - minSdkVersion 14 - targetSdkVersion 26 + minSdkVersion 15 + targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + multiDexEnabled true } buildTypes { release { @@ -22,15 +23,16 @@ android { } dependencies { - compile fileTree(include: ['*.jar'], dir: 'libs') + implementation 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:28.0.0' - testCompile 'junit:junit:4.12' - compile 'com.squareup.picasso:picasso:2.5.2' - compile 'com.squareup.okhttp:okhttp:2.2.0' - compile project(':alipaySdk-15.6.5-20190718211148') - compile project(':alipayadapter-release') - compile project(':paymentwall-android-sdk') + implementation 'com.android.support:appcompat-v7:28.0.0' + testImplementation 'junit:junit:4.12' + implementation 'com.squareup.picasso:picasso:2.5.2' + implementation 'com.squareup.okhttp:okhttp:2.2.0' + implementation project(':alipaySdk-15.6.5-20190718211148') + implementation project(':alipayadapter-release') + implementation project(":paymentwall-android-sdk") + implementation "com.fasterpay:fasterpay-android-sdk:1.0" } diff --git a/Demo/AndroidStudio/app/src/main/AndroidManifest.xml b/Demo/AndroidStudio/app/src/main/AndroidManifest.xml index d82610b..2ac1f9d 100644 --- a/Demo/AndroidStudio/app/src/main/AndroidManifest.xml +++ b/Demo/AndroidStudio/app/src/main/AndroidManifest.xml @@ -1,4 +1,5 @@ @@ -18,7 +19,8 @@ android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:supportsRtl="true" - android:theme="@style/AppTheme"> + android:theme="@style/AppTheme" + tools:replace="android:allowBackup"> diff --git a/Demo/AndroidStudio/app/src/main/java/com/paymentwall/testpandalib/Constants.java b/Demo/AndroidStudio/app/src/main/java/com/paymentwall/testpandalib/Constants.java index 9ad5231..0ddf67e 100644 --- a/Demo/AndroidStudio/app/src/main/java/com/paymentwall/testpandalib/Constants.java +++ b/Demo/AndroidStudio/app/src/main/java/com/paymentwall/testpandalib/Constants.java @@ -1,5 +1,7 @@ package com.paymentwall.testpandalib; +import java.math.BigDecimal; + /** * Created by nguyen.anh on 9/14/2016. */ @@ -9,7 +11,7 @@ public class Constants { public static final String PW_PROJECT_KEY = "YOUR_APP_KEY"; public static final String PW_SECRET_KEY = "YOUR_SECRET_KEY"; - public static final double AMOUNT = 0.01; + public static final BigDecimal AMOUNT = new BigDecimal(0.01); public static final String CURRENCY = "USD"; public static final String ITEM_NAME = "Test item"; public static final String ITEM_ID = "testitem1"; diff --git a/Demo/AndroidStudio/app/src/main/java/com/paymentwall/testpandalib/MainActivity.java b/Demo/AndroidStudio/app/src/main/java/com/paymentwall/testpandalib/MainActivity.java index 04a2561..ef6d345 100644 --- a/Demo/AndroidStudio/app/src/main/java/com/paymentwall/testpandalib/MainActivity.java +++ b/Demo/AndroidStudio/app/src/main/java/com/paymentwall/testpandalib/MainActivity.java @@ -14,6 +14,8 @@ import com.paymentwall.pwunifiedsdk.util.ResponseCode; import com.paymentwall.sdk.pwlocal.utils.Const; +import java.util.UUID; + /** * Created by andy.ha on 9/14/2016. */ @@ -62,6 +64,7 @@ private void startPayment() { request.addPwlocalParams(Const.P.EMAIL, "fixed"); request.addPwlocalParams(Const.P.WIDGET, "pw"); request.addPwlocalParams(Const.P.EVALUATION, "1"); + request.getFasterPayRequest(); PsAlipay alipay = new PsAlipay(); @@ -75,6 +78,12 @@ private void startPayment() { ExternalPs alipayPs = new ExternalPs("alipay", "Alipay", 0, alipay); request.add(alipayPs); + request.addFasterPay( + "your_key", + UUID.randomUUID().toString(), + "Demo description" + ); + Intent intent = new Intent(getApplicationContext(), PaymentSelectionActivity.class); intent.putExtra(Key.REQUEST_MESSAGE, request); startActivityForResult(intent, PaymentSelectionActivity.REQUEST_CODE); diff --git a/Demo/AndroidStudio/build.gradle b/Demo/AndroidStudio/build.gradle index 5086f42..c148a94 100644 --- a/Demo/AndroidStudio/build.gradle +++ b/Demo/AndroidStudio/build.gradle @@ -21,7 +21,7 @@ allprojects { } ext { - minSdkVersion = 14 + minSdkVersion = 15 targetSdkVersion = 25 compileSdkVersion = 25 supportLibraryVersion = "25.1.1" diff --git a/Demo/AndroidStudio/gradlew b/Demo/AndroidStudio/gradlew old mode 100644 new mode 100755 diff --git a/Demo/AndroidStudio/paymentwall-android-sdk/paymentwall-android-sdk.aar b/Demo/AndroidStudio/paymentwall-android-sdk/paymentwall-android-sdk.aar index bd186bc..253466b 100644 Binary files a/Demo/AndroidStudio/paymentwall-android-sdk/paymentwall-android-sdk.aar and b/Demo/AndroidStudio/paymentwall-android-sdk/paymentwall-android-sdk.aar differ diff --git a/Demo/AndroidStudio/settings.gradle b/Demo/AndroidStudio/settings.gradle index 4c72121..c846fb1 100644 --- a/Demo/AndroidStudio/settings.gradle +++ b/Demo/AndroidStudio/settings.gradle @@ -1 +1 @@ -include ':app', ':alipayadapter-release', ':paymentwall-android-sdk', ':alipaySdk-15.6.5-20190718211148' +include ':app', ':alipayadapter-release', ':alipaySdk-15.6.5-20190718211148', ':paymentwall-android-sdk' diff --git a/README.md b/README.md index 811601b..ee6725e 100644 --- a/README.md +++ b/README.md @@ -7,18 +7,18 @@ Paymentwall is a global mobile payment gateway that accepts payments from more t ## HOW DOES IT WORK? 1. Compile the library url or add jar to your project. - With different areas, we provide corresponding external payment system jar files. You can add as many as you want. You can also enable/disable default payment options too. You can add any payment option as they want by importing the payment system library and library adapter provided by Paymentwall to their project + With different areas, we provide corresponding external payment system jar files. You can add as many as you want. You can also enable/disable default payment options too. You can add any payment option as they want by importing the payment system library and library adapter provided by Paymentwall to their project. If you want to use FasterPay payment option then you should add a [FasterPay dependency](https://github.com/FasterPay/fasterpay-android) to your project. 2. User requests a purchase inside your application. -3. Paymentwall SDK initializes payment screen with 3 core payment options (Brick, MINT, Mobiamo) and the other is “Local Payments” option. +3. Paymentwall SDK initializes payment screen with 4 core payment options (Brick, MINT, Mobiamo, FasterPay) and the other is “Local Payments” option. 4. User initiates payment in-app With Brick, Mint, Mobiamo the payment process will totally be native. With local payments, local payment screen will be shown with payment methods corresponding to user’s current location. Here users can then select a payment option they prefer. ## REQUIREMENTS -Android 4.0.1 (API level 14) and above. +Android 4.0.4 (API level 15) and above. ## CREDENTIALS -Paymentwall SDK integration requires a project key. Obtain these Paymentwall API credentials in the application settings of your Merchant Account at paymentwall.com +Paymentwall SDK integration requires a project key. Obtain these Paymentwall API credentials in the application settings of your Merchant Account at paymentwall.com. FasterPay integration requires a public key. Please check our [FasterPay FAQ](https://www.fasterpay.com/support) for details. ## ADD CORE SDK - [See CoreSDK integration instruction](https://github.com/paymentwall/paymentwall-android-sdk/tree/master/Core%20SDK/README.md)