diff --git a/paymentsheet/src/main/java/com/stripe/android/paymentsheet/paymentdatacollection/ach/TransformToBankIcon.kt b/paymentsheet/src/main/java/com/stripe/android/paymentsheet/paymentdatacollection/ach/TransformToBankIcon.kt index 013562239c0..6425ae32e1e 100644 --- a/paymentsheet/src/main/java/com/stripe/android/paymentsheet/paymentdatacollection/ach/TransformToBankIcon.kt +++ b/paymentsheet/src/main/java/com/stripe/android/paymentsheet/paymentdatacollection/ach/TransformToBankIcon.kt @@ -26,7 +26,7 @@ internal interface TransformToBankIcon { StripeR.drawable.stripe_ic_bank_suntrust, Regex("Silicon Valley Bank", RegexOption.IGNORE_CASE) to StripeR.drawable.stripe_ic_bank_svb, - Regex("Stripe|TestInstitution", RegexOption.IGNORE_CASE) to + Regex("Stripe|Test Institution", RegexOption.IGNORE_CASE) to StripeR.drawable.stripe_ic_bank_stripe, Regex("TD Bank", RegexOption.IGNORE_CASE) to StripeR.drawable.stripe_ic_bank_td, diff --git a/paymentsheet/src/main/java/com/stripe/android/paymentsheet/paymentdatacollection/ach/USBankAccountForm.kt b/paymentsheet/src/main/java/com/stripe/android/paymentsheet/paymentdatacollection/ach/USBankAccountForm.kt index 1df17e90ddd..6a31d892ba2 100644 --- a/paymentsheet/src/main/java/com/stripe/android/paymentsheet/paymentdatacollection/ach/USBankAccountForm.kt +++ b/paymentsheet/src/main/java/com/stripe/android/paymentsheet/paymentdatacollection/ach/USBankAccountForm.kt @@ -26,6 +26,7 @@ import androidx.compose.ui.draw.alpha import androidx.compose.ui.platform.testTag import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp @@ -56,6 +57,7 @@ import com.stripe.android.uicore.elements.TextFieldController import com.stripe.android.uicore.elements.TextFieldSection import com.stripe.android.uicore.strings.resolve import com.stripe.android.uicore.stripeColors +import com.stripe.android.uicore.stripeTypography import com.stripe.android.uicore.utils.collectAsState import com.stripe.android.R as StripeR import com.stripe.android.ui.core.R as PaymentsUiCoreR @@ -405,14 +407,32 @@ private fun AccountDetailsForm( modifier = Modifier.size(24.dp), ) - Text( - text = "$bankName •••• $last4", - color = MaterialTheme.stripeColors.onComponent, - overflow = TextOverflow.Ellipsis, + Column( modifier = Modifier .alpha(if (isProcessing) 0.5f else 1f) .weight(1f, fill = false), - ) + ) { + if (bankName != null) { + Text( + text = bankName, + style = MaterialTheme.typography.body1.copy( + fontWeight = FontWeight(MaterialTheme.stripeTypography.fontWeightMedium), + ), + color = MaterialTheme.stripeColors.onComponent, + overflow = TextOverflow.Ellipsis, + maxLines = 1, + ) + } + + Text( + text = "••••${last4.orEmpty()}", + style = MaterialTheme.typography.caption.copy( + fontWeight = FontWeight(MaterialTheme.stripeTypography.fontWeightNormal), + ), + color = MaterialTheme.stripeColors.placeholderText, + maxLines = 1, + ) + } promoBadgeState?.let { badgeState -> PromoBadge( diff --git a/paymentsheet/src/test/java/com/stripe/android/paymentsheet/paymentdatacollection/ach/AccountPreviewScreenshotTest.kt b/paymentsheet/src/test/java/com/stripe/android/paymentsheet/paymentdatacollection/ach/AccountPreviewScreenshotTest.kt index 7e127f5c509..3126784c049 100644 --- a/paymentsheet/src/test/java/com/stripe/android/paymentsheet/paymentdatacollection/ach/AccountPreviewScreenshotTest.kt +++ b/paymentsheet/src/test/java/com/stripe/android/paymentsheet/paymentdatacollection/ach/AccountPreviewScreenshotTest.kt @@ -151,7 +151,7 @@ internal class AccountPreviewScreenshotTest { sessionId = "session_1234", promoText = "$5", eligibleForPromo = false, - bankName = "SuperDuperUltraLongBankName", + bankName = "SuperDuperUltraLongBankNameOMG", ), instantDebits = true, isPaymentFlow = true, diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testPaymentFlow[DarkTheme].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testPaymentFlow[DarkTheme].png index 7b831f9311a..a1bf413d22b 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testPaymentFlow[DarkTheme].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testPaymentFlow[DarkTheme].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testPaymentFlow[LightTheme].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testPaymentFlow[LightTheme].png index 99d01bf92ff..6b6c6218b7d 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testPaymentFlow[LightTheme].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testPaymentFlow[LightTheme].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testSetupFlow[DarkTheme].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testSetupFlow[DarkTheme].png index e6167193965..85dc171ef02 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testSetupFlow[DarkTheme].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testSetupFlow[DarkTheme].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testSetupFlow[LightTheme].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testSetupFlow[LightTheme].png index 6a129ee136a..ba141b25e71 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testSetupFlow[LightTheme].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testSetupFlow[LightTheme].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithBillingAddress[DarkTheme].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithBillingAddress[DarkTheme].png index 1d9f6b618c7..eb69951d881 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithBillingAddress[DarkTheme].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithBillingAddress[DarkTheme].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithBillingAddress[LightTheme].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithBillingAddress[LightTheme].png index c0b37e92b41..1575868838e 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithBillingAddress[LightTheme].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithBillingAddress[LightTheme].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithIneligiblePromoBadge[DarkTheme].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithIneligiblePromoBadge[DarkTheme].png index 8d8eadca77e..4491f1a6bf8 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithIneligiblePromoBadge[DarkTheme].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithIneligiblePromoBadge[DarkTheme].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithIneligiblePromoBadge[LightTheme].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithIneligiblePromoBadge[LightTheme].png index dfdf284588b..17754d02316 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithIneligiblePromoBadge[LightTheme].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithIneligiblePromoBadge[LightTheme].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithPromoBadgeNextToSuperLongAccountName[DarkTheme].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithPromoBadgeNextToSuperLongAccountName[DarkTheme].png index eae230aee97..e7271f930a8 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithPromoBadgeNextToSuperLongAccountName[DarkTheme].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithPromoBadgeNextToSuperLongAccountName[DarkTheme].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithPromoBadgeNextToSuperLongAccountName[LightTheme].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithPromoBadgeNextToSuperLongAccountName[LightTheme].png index 392ec56936e..e89eb418cc4 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithPromoBadgeNextToSuperLongAccountName[LightTheme].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithPromoBadgeNextToSuperLongAccountName[LightTheme].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithPromoBadge[DarkTheme].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithPromoBadge[DarkTheme].png index d4323e3e559..98edbf2ba33 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithPromoBadge[DarkTheme].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithPromoBadge[DarkTheme].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithPromoBadge[LightTheme].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithPromoBadge[LightTheme].png index 79c2a7b99e8..239c4b643a6 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithPromoBadge[LightTheme].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.ach_AccountPreviewScreenshotTest_testWithPromoBadge[LightTheme].png differ