From 8f9329dc8b00999bb90798ec437acf08f7fd8d2a Mon Sep 17 00:00:00 2001 From: ozgur <6615094+ozgur00@users.noreply.github.com> Date: Tue, 31 Oct 2023 14:18:53 +0100 Subject: [PATCH] Hide card brand logo list for bcmc COAND-795 --- .../adyen/checkout/card/internal/ui/DefaultCardDelegate.kt | 4 +++- .../checkout/card/internal/ui/DefaultCardDelegateTest.kt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/card/src/main/java/com/adyen/checkout/card/internal/ui/DefaultCardDelegate.kt b/card/src/main/java/com/adyen/checkout/card/internal/ui/DefaultCardDelegate.kt index 624ba6790c..9a698ee8da 100644 --- a/card/src/main/java/com/adyen/checkout/card/internal/ui/DefaultCardDelegate.kt +++ b/card/src/main/java/com/adyen/checkout/card/internal/ui/DefaultCardDelegate.kt @@ -364,7 +364,9 @@ class DefaultCardDelegate( private fun isCardListVisible( cardBrands: List, detectedCardTypes: List - ): Boolean = cardBrands.isNotEmpty() && detectedCardTypes.isEmpty() + ): Boolean = cardBrands.isNotEmpty() && + detectedCardTypes.isEmpty() && + paymentMethod.type == PaymentMethodTypes.SCHEME override fun getPaymentMethodType(): String { return paymentMethod.type ?: PaymentMethodTypes.UNKNOWN diff --git a/card/src/test/java/com/adyen/checkout/card/internal/ui/DefaultCardDelegateTest.kt b/card/src/test/java/com/adyen/checkout/card/internal/ui/DefaultCardDelegateTest.kt index fcd71591f9..80e0655a82 100644 --- a/card/src/test/java/com/adyen/checkout/card/internal/ui/DefaultCardDelegateTest.kt +++ b/card/src/test/java/com/adyen/checkout/card/internal/ui/DefaultCardDelegateTest.kt @@ -1156,7 +1156,7 @@ internal class DefaultCardDelegateTest( cardEncrypter: BaseCardEncrypter = this.cardEncrypter, genericEncrypter: BaseGenericEncrypter = this.genericEncrypter, configuration: CardConfiguration = getDefaultCardConfigurationBuilder().build(), - paymentMethod: PaymentMethod = PaymentMethod(), + paymentMethod: PaymentMethod = PaymentMethod(type = PaymentMethodTypes.SCHEME), analyticsRepository: AnalyticsRepository = this.analyticsRepository, submitHandler: SubmitHandler = this.submitHandler, order: OrderRequest? = TEST_ORDER,