-
Notifications
You must be signed in to change notification settings - Fork 657
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Land 3ds2 2.2 Feature branch (#9639)
* Allows for auto-submittal of the challenge if the view is OOB (#9078) * 3DS2 Req 71 Implementation (#9077) * Adds challenge no entry value for req 71 * Updates test * Make "Y" a constant * 3DS2 2.2 Device Data Requirements (#9298) * Add device information updates * Fixing up tests * Fix test * Linting * Update DeviceDataFactoryImpl.kt * Update 3ds2sdk.api * 3DS2 Spec Updates (#9387) * 3DS2 Analytics Delegate (#9430) * Allows for auto-submittal of the challenge if the view is OOB * Analytics implementation * Update 3ds2sdk.api * Fix issues * Utilizing service loader * Move AnalyticsProvider * Update 3ds2sdk.api * Adds landscape layout for challenge zone view * Update LOA * Update message version in 3ds2 playground * Add RestrictTo annotations to public APIs --------- Co-authored-by: Twig <Twigz@users.noreply.github.com> Co-authored-by: Twig <aharris.1990@gmail.com> Co-authored-by: reuben-stripe <107846296+reuben-stripe@users.noreply.github.com>
- Loading branch information
1 parent
e7e9685
commit 1b0976d
Showing
35 changed files
with
803 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
.../src/main/kotlin/com/stripe/android/stripe3ds2playground/SampleAnalyticsImplementation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.stripe.android.stripe3ds2playground | ||
|
||
import android.util.Log | ||
import com.stripe.android.stripe3ds2.utils.AnalyticsDelegate | ||
|
||
internal class SampleAnalyticsImplementation : AnalyticsDelegate { | ||
|
||
override fun didReceiveChallengeResponseWithTransactionId(transactionId: String, flow: String) { | ||
Log.d("Playground Analytics", "Did Receive Challenge With Trans ID: $transactionId, $flow") | ||
} | ||
|
||
override fun cancelButtonTappedWithTransactionId(transactionId: String) { | ||
Log.d("Playground Analytics", "Cancel Button Tapped With Trans ID: $transactionId") | ||
} | ||
|
||
override fun otpSubmitButtonTappedWithTransactionID(transactionId: String) { | ||
Log.d("Playground Analytics", "OTP Submit Tapped With Trans ID: $transactionId") | ||
} | ||
|
||
override fun oobContinueButtonTappedWithTransactionID(transactionId: String) { | ||
Log.d("Playground Analytics", "OOB Continue Tapped With Trans ID: $transactionId") | ||
} | ||
|
||
override fun oobFlowDidPause(transactionId: String) { | ||
Log.d("Playground Analytics", "OOB Flow Paused: $transactionId") | ||
} | ||
|
||
override fun oobFlowDidResume(transactionId: String) { | ||
Log.d("Playground Analytics", "OOB Flow Resumed: $transactionId") | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...rc/main/resources/META-INF/services/com.stripe.android.stripe3ds2.utils.AnalyticsDelegate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.stripe.android.stripe3ds2playground.SampleAnalyticsImplementation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<merge xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical" | ||
tools:parentTag="LinearLayout"> | ||
|
||
<com.stripe.android.stripe3ds2.views.ThreeDS2HeaderTextView | ||
android:id="@+id/czv_header" | ||
style="@style/Stripe3DS2HeaderTextViewStyle" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="@dimen/stripe_3ds2_challenge_zone_vertical_padding" | ||
tools:text="Challenge Info Header" | ||
android:accessibilityHeading="true" | ||
tools:ignore="UnusedAttribute" /> | ||
|
||
<com.stripe.android.stripe3ds2.views.ThreeDS2TextView | ||
android:id="@+id/czv_info" | ||
style="@style/Stripe3DS2TextViewStyle" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="@dimen/stripe_3ds2_challenge_zone_vertical_padding" | ||
android:drawablePadding="@dimen/stripe_3ds2_challenge_zone_text_indicator_padding" | ||
tools:text="Challenge Info Text" /> | ||
|
||
<com.stripe.android.stripe3ds2.views.ThreeDS2TextView | ||
android:id="@+id/czv_info_label" | ||
style="@style/Stripe3DS2TextViewStyle" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="@dimen/stripe_3ds2_challenge_zone_vertical_padding" | ||
android:drawablePadding="@dimen/stripe_3ds2_challenge_zone_text_indicator_padding" | ||
tools:text="Challenge Info Label" /> | ||
|
||
<FrameLayout | ||
android:id="@+id/czv_entry_view" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="@dimen/stripe_3ds2_challenge_zone_vertical_padding" /> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:minHeight="48dp" | ||
android:orientation="horizontal"> | ||
|
||
<com.stripe.android.stripe3ds2.views.ThreeDS2Button | ||
android:id="@+id/czv_submit_button" | ||
style="@style/Stripe3DS2Button" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="@dimen/stripe_3ds2_challenge_zone_vertical_padding" | ||
android:layout_weight="1" | ||
android:minHeight="48dp" | ||
tools:text="Submit" /> | ||
|
||
<com.stripe.android.stripe3ds2.views.ThreeDS2Button | ||
android:id="@+id/czv_resend_button" | ||
style="@style/Stripe3DS2TextButton" | ||
android:layout_width="0dp" | ||
android:minHeight="48dp" | ||
android:layout_weight="1" | ||
android:layout_height="wrap_content" | ||
android:visibility="gone" | ||
tools:text="Resend Code" | ||
tools:visibility="visible" /> | ||
</LinearLayout> | ||
|
||
<com.stripe.android.stripe3ds2.views.ThreeDS2TextView | ||
android:id="@+id/czv_whitelisting_label" | ||
style="@style/Stripe3DS2TextViewStyle" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/stripe_3ds2_challenge_zone_select_button_vertical_margin" | ||
android:visibility="gone" | ||
tools:text="Whitelisting Info Text" | ||
tools:visibility="visible" /> | ||
|
||
<RadioGroup | ||
android:id="@+id/czv_whitelist_radio_group" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/stripe_3ds2_challenge_zone_vertical_padding" | ||
android:orientation="vertical" | ||
android:visibility="gone" | ||
tools:visibility="visible"> | ||
|
||
<RadioButton | ||
android:id="@+id/czv_whitelist_yes_button" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="@dimen/stripe_3ds2_challenge_zone_select_button_offset_margin" | ||
android:layout_marginBottom="@dimen/stripe_3ds2_challenge_zone_select_button_vertical_margin" | ||
android:paddingStart="@dimen/stripe_3ds2_challenge_zone_select_button_label_padding" | ||
android:paddingEnd="@dimen/stripe_3ds2_challenge_zone_select_button_label_padding" | ||
android:text="@string/stripe_3ds2_czv_whitelist_yes_label" /> | ||
|
||
<RadioButton | ||
android:id="@+id/czv_whitelist_no_button" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="@dimen/stripe_3ds2_challenge_zone_select_button_offset_margin" | ||
android:paddingStart="@dimen/stripe_3ds2_challenge_zone_select_button_label_padding" | ||
android:paddingEnd="@dimen/stripe_3ds2_challenge_zone_select_button_label_padding" | ||
android:text="@string/stripe_3ds2_czv_whitelist_no_label" /> | ||
</RadioGroup> | ||
</merge> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
3ds2sdk/src/main/kotlin/com/stripe/android/stripe3ds2/init/DeviceDataFactory.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
package com.stripe.android.stripe3ds2.init | ||
|
||
import androidx.annotation.RestrictTo | ||
import com.stripe.android.stripe3ds2.transaction.SdkTransactionId | ||
|
||
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) | ||
fun interface DeviceDataFactory { | ||
fun create(): Map<String, Any?> | ||
suspend fun create(sdkReferenceNumber: String, sdkTransactionId: SdkTransactionId): Map<String, Any?> | ||
} |
Oops, something went wrong.