Skip to content

Commit e5633e4

Browse files
committed
Demo no ui with RaveVerificationUtils
1 parent f977f91 commit e5633e4

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
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: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

0 commit comments

Comments
 (0)