From 7d7d0ede2c1ed7d95fa0f37093c1f6deb17e0ce6 Mon Sep 17 00:00:00 2001 From: ozgur <6615094+ozgur00@users.noreply.github.com> Date: Tue, 12 Nov 2024 13:06:54 +0100 Subject: [PATCH] Display 4 logos on drop-in payment methods list for Pay by Bank US COAND-974 --- .../internal/ui/PaymentMethodsListViewModel.kt | 3 +-- .../internal/DefaultPayByBankUSDelegate.kt | 16 +++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/drop-in/src/main/java/com/adyen/checkout/dropin/internal/ui/PaymentMethodsListViewModel.kt b/drop-in/src/main/java/com/adyen/checkout/dropin/internal/ui/PaymentMethodsListViewModel.kt index 7b7b36446d..005353d2b9 100644 --- a/drop-in/src/main/java/com/adyen/checkout/dropin/internal/ui/PaymentMethodsListViewModel.kt +++ b/drop-in/src/main/java/com/adyen/checkout/dropin/internal/ui/PaymentMethodsListViewModel.kt @@ -254,7 +254,7 @@ internal class PaymentMethodsListViewModel( private fun makeBrandList(): List { return listOf( - PayByBankUSBrandLogo.entries.take(PAY_BY_BANK_BRAND_LOGO_SIZE).map { + PayByBankUSBrandLogo.entries.map { LogoItem( it.path, dropInParams.environment, @@ -279,7 +279,6 @@ internal class PaymentMethodsListViewModel( companion object { private const val CARD_LOGO_TYPE = "card" private const val GOOGLE_PAY_LOGO_TYPE = PaymentMethodTypes.GOOGLE_PAY - private const val PAY_BY_BANK_BRAND_LOGO_SIZE = 3 } } diff --git a/paybybank-us/src/main/java/com/adyen/checkout/paybybankus/internal/DefaultPayByBankUSDelegate.kt b/paybybank-us/src/main/java/com/adyen/checkout/paybybankus/internal/DefaultPayByBankUSDelegate.kt index 8e22138ca2..a39ad59db1 100644 --- a/paybybank-us/src/main/java/com/adyen/checkout/paybybankus/internal/DefaultPayByBankUSDelegate.kt +++ b/paybybank-us/src/main/java/com/adyen/checkout/paybybankus/internal/DefaultPayByBankUSDelegate.kt @@ -97,7 +97,7 @@ internal class DefaultPayByBankUSDelegate( override fun getPaymentMethodType(): String = paymentMethod.type ?: PaymentMethodTypes.UNKNOWN private fun createOutputData() = PayByBankUSOutputData( - brandList = getBrandList() + brandList = getBrandList(), ) private fun createComponentState(): PayByBankUSComponentState { @@ -142,11 +142,13 @@ internal class DefaultPayByBankUSDelegate( private fun getBrandList(): List { return listOf( - LogoItem(PayByBankUSBrandLogo.US_1.path, componentParams.environment), - LogoItem(PayByBankUSBrandLogo.US_2.path, componentParams.environment), - LogoItem(PayByBankUSBrandLogo.US_3.path, componentParams.environment), - LogoItem(PayByBankUSBrandLogo.US_4.path, componentParams.environment), - TextItem(R.string.checkout_pay_by_bank_us_more), - ) + PayByBankUSBrandLogo.entries.map { + LogoItem( + it.path, + componentParams.environment, + ) + }, + listOf(TextItem(R.string.checkout_pay_by_bank_us_more)), + ).flatten() } }