Skip to content

Commit

Permalink
=update manifest and 3ds logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ioan-ghisoi-cko committed Jul 20, 2020
1 parent 69a9d10 commit 8bb7dc2
Show file tree
Hide file tree
Showing 19 changed files with 32 additions and 22 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ dependencies {
implementation 'com.android.support:design:27.1.1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.github.checkout:frames-android:v2.1.1'
implementation 'com.github.checkout:frames-android:v2.1.2'
}
```

> You can find more about the installation [here](https://jitpack.io/#checkout/frames-android/v2.1.1)
> You can find more about the installation [here](https://jitpack.io/#checkout/frames-android/v2.1.2)
> Please keep in mind that the Jitpack repository should to be added to the project gradle file while the dependency should be added in the module gradle file. [(see more about gradle files)](https://developer.android.com/studio/build)
Expand Down
7 changes: 6 additions & 1 deletion android-sdk/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
# public *;p
#}

# Uncomment this to preserve the line number information for
Expand All @@ -19,3 +19,8 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

-dontshrink
-dontoptimize
-dontpreverify
-keep class com.checkout.*** { *; }
7 changes: 4 additions & 3 deletions android-sdk/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.checkout.android_sdk">

<uses-permission android:name="android.permission.INTERNET" />

<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" />
android:theme="@style/AppTheme"
tools:replace="android:theme"
/>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,21 @@ public void onPageFinished(WebView view, String url) {
if (url.contains(successUrl)) {
Uri uri = Uri.parse(url);
String paymentToken = uri.getQueryParameter("cko-payment-token");
m3DSecureListener.onSuccess(paymentToken);
String sessionId = uri.getQueryParameter("cko-session-id");
if(paymentToken==null) {
m3DSecureListener.onSuccess(sessionId);
} else {
m3DSecureListener.onSuccess(paymentToken);
}
} else if (url.contains(failsUrl)) {
Uri uri = Uri.parse(url);
String paymentToken = uri.getQueryParameter("cko-payment-token");
m3DSecureListener.onError(paymentToken);
String sessionId = uri.getQueryParameter("cko-session-id");
if(paymentToken==null) {
m3DSecureListener.onError(sessionId);
} else {
m3DSecureListener.onError(paymentToken);
}
}
}
});
Expand Down
5 changes: 0 additions & 5 deletions android-sdk/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

This file was deleted.

This file was deleted.

Binary file removed android-sdk/src/main/res/mipmap-hdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.
Binary file removed android-sdk/src/main/res/mipmap-mdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions app/proguard-android.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-dontshrink
-dontoptimize
-dontpreverify
-keep class com.checkout.*** { *; }
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
buildscript {

ext.kotlin_version = '1.3.10'
ext.kotlin_version = '1.3.72'

repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:4.0.1'

classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Sep 23 12:39:03 BST 2019
#Mon Jul 20 10:34:54 BST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

0 comments on commit 8bb7dc2

Please sign in to comment.