Skip to content

Commit 08e7ec1

Browse files
committed
Merge branch 'verification_utils' into flwmaster
2 parents 17f743c + e5633e4 commit 08e7ec1

File tree

87 files changed

+930
-572
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+930
-572
lines changed

app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ dependencies {
3535
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
3636
testImplementation 'junit:junit:4.12'
3737
implementation project(':rave_android')
38+
implementation project(':rave_utils')
3839
}

app/src/main/java/com/flutterwave/rave_android/MainActivity.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
import android.app.ProgressDialog;
44
import android.content.Intent;
55
import android.os.Bundle;
6-
7-
import androidx.annotation.Nullable;
8-
import androidx.appcompat.app.AlertDialog;
9-
import androidx.appcompat.app.AppCompatActivity;
10-
import androidx.appcompat.widget.SwitchCompat;
116
import android.util.Log;
127
import android.view.LayoutInflater;
138
import android.view.View;
@@ -18,6 +13,11 @@
1813
import android.widget.TextView;
1914
import android.widget.Toast;
2015

16+
import androidx.annotation.Nullable;
17+
import androidx.appcompat.app.AlertDialog;
18+
import androidx.appcompat.app.AppCompatActivity;
19+
import androidx.appcompat.widget.SwitchCompat;
20+
2121
import com.flutterwave.raveandroid.RavePayActivity;
2222
import com.flutterwave.raveandroid.RaveUiManager;
2323
import com.flutterwave.raveandroid.data.Utils;
@@ -34,6 +34,7 @@
3434
import com.flutterwave.raveandroid.rave_presentation.card.SavedCardsListener;
3535
import com.flutterwave.raveandroid.rave_presentation.data.AddressDetails;
3636
import com.flutterwave.raveandroid.rave_remote.responses.SaveCardResponse;
37+
import com.flutterwave.raveutils.verification.RaveVerificationUtils;
3738

3839
import java.util.ArrayList;
3940
import java.util.List;
@@ -372,8 +373,8 @@ private void validateEntries() {
372373

373374
cardPayManager = new CardPaymentManager(((RaveNonUIManager) raveManager), this, this);
374375
card = new Card(
375-
"5531886652142950", // Test MasterCard PIN authentication
376-
// "4242424242424242", // Test VisaCard 3D-Secure Authentication
376+
// "5531886652142950", // Test MasterCard PIN authentication
377+
"4242424242424242", // Test VisaCard 3D-Secure Authentication
377378
// "4556052704172643", // Test VisaCard (Address Verification)
378379
"12",
379380
"30",
@@ -405,6 +406,8 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
405406
} else if (resultCode == RavePayActivity.RESULT_CANCELLED) {
406407
Toast.makeText(this, "CANCELLED " + message, Toast.LENGTH_SHORT).show();
407408
}
409+
} else if (requestCode == RaveConstants.WEB_VERIFICATION_REQUEST_CODE) {
410+
cardPayManager.onWebpageAuthenticationComplete();
408411
} else {
409412
super.onActivityResult(requestCode, resultCode, data);
410413
}
@@ -522,10 +525,11 @@ public void collectAddress() {
522525

523526
@Override
524527
public void showAuthenticationWebPage(String authenticationUrl) {
525-
Toast.makeText(this, "Called to load web page", Toast.LENGTH_SHORT).show();
528+
Toast.makeText(this, "Loading auth web page", Toast.LENGTH_SHORT).show();
526529

527530
// Load webpage
528-
// cardPayManager.onWebpageAuthenticationComplete();
531+
new RaveVerificationUtils(this, isLiveSwitch.isChecked(), publicKeyEt.getText().toString())
532+
.showWebpageVerificationScreen(authenticationUrl);
529533
}
530534

531535
@Override

app/src/main/res/values/styles.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</style>
4141

4242
<style name="otpBtnStyle2" parent="@android:style/Widget.Button">
43-
<item name="android:background">@drawable/otp_button_curved</item>
43+
<item name="android:background">@drawable/otp_button_curved_2</item>
4444
<item name="android:textColor">#009688</item>
4545
</style>
4646

rave_android/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ dependencies {
6464
api project(path: ':rave_core')
6565
api project(path: ':rave_cache')
6666
implementation project(':rave_logger')
67+
implementation project(':rave_utils')
6768
compile project(path: ':rave_presentation')
6869

6970

rave_android/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
android:screenOrientation="portrait"
1313
android:windowSoftInputMode="adjustPan" />
1414
<activity
15-
android:name=".verification.VerificationActivity"
15+
android:name="com.flutterwave.raveutils.verification.VerificationActivity"
1616
android:screenOrientation="portrait" />
1717
<activity
1818
android:name=".card.savedcards.SavedCardsActivity"

rave_android/src/main/java/com/flutterwave/raveandroid/RavePayActivity.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
import com.flutterwave.raveandroid.banktransfer.BankTransferFragment;
3030
import com.flutterwave.raveandroid.barter.BarterFragment;
3131
import com.flutterwave.raveandroid.card.CardFragment;
32-
import com.flutterwave.raveandroid.data.events.ScreenLaunchEvent;
33-
import com.flutterwave.raveandroid.data.events.ScreenMinimizeEvent;
3432
import com.flutterwave.raveandroid.data.events.SessionFinishedEvent;
3533
import com.flutterwave.raveandroid.di.components.DaggerRaveUiComponent;
3634
import com.flutterwave.raveandroid.di.components.RaveUiComponent;
@@ -43,6 +41,8 @@
4341
import com.flutterwave.raveandroid.rave_logger.Event;
4442
import com.flutterwave.raveandroid.rave_logger.EventLogger;
4543
import com.flutterwave.raveandroid.rave_logger.di.EventLoggerModule;
44+
import com.flutterwave.raveandroid.rave_logger.events.ScreenLaunchEvent;
45+
import com.flutterwave.raveandroid.rave_logger.events.ScreenMinimizeEvent;
4646
import com.flutterwave.raveandroid.rave_presentation.di.DaggerRaveComponent;
4747
import com.flutterwave.raveandroid.rave_presentation.di.RaveComponent;
4848
import com.flutterwave.raveandroid.rave_remote.di.RemoteModule;
@@ -93,9 +93,9 @@ public class RavePayActivity extends AppCompatActivity {
9393
private ConstraintLayout root;
9494

9595

96-
public static int RESULT_SUCCESS = 111;
97-
public static int RESULT_ERROR = 222;
98-
public static int RESULT_CANCELLED = 333;
96+
public static int RESULT_SUCCESS = RaveConstants.RESULT_SUCCESS;
97+
public static int RESULT_ERROR = RaveConstants.RESULT_ERROR;
98+
public static int RESULT_CANCELLED = RaveConstants.RESULT_CANCELLED;
9999
private int tileCount = 0;
100100
int theme;
101101
private float paymentTilesTextSize;

rave_android/src/main/java/com/flutterwave/raveandroid/WebFragment.java

Lines changed: 0 additions & 163 deletions
This file was deleted.

0 commit comments

Comments
 (0)