diff --git a/ach/src/main/java/com/adyen/checkout/ach/internal/ui/model/ACHDirectDebitComponentParamsMapper.kt b/ach/src/main/java/com/adyen/checkout/ach/internal/ui/model/ACHDirectDebitComponentParamsMapper.kt index 105454cd6a..f0ef330317 100644 --- a/ach/src/main/java/com/adyen/checkout/ach/internal/ui/model/ACHDirectDebitComponentParamsMapper.kt +++ b/ach/src/main/java/com/adyen/checkout/ach/internal/ui/model/ACHDirectDebitComponentParamsMapper.kt @@ -40,6 +40,7 @@ internal class ACHDirectDebitComponentParamsMapper( commonComponentParamsMapperData.commonComponentParams, commonComponentParamsMapperData.sessionParams, achDirectDebitConfiguration, + commonComponentParamsMapperData.commonComponentParams.isCreatedByDropIn, ) } @@ -47,10 +48,15 @@ internal class ACHDirectDebitComponentParamsMapper( commonComponentParams: CommonComponentParams, sessionParams: SessionParams?, achDirectDebitConfiguration: ACHDirectDebitConfiguration?, + isCreatedByDropIn: Boolean ): ACHDirectDebitComponentParams { return ACHDirectDebitComponentParams( commonComponentParams = commonComponentParams, - isSubmitButtonVisible = achDirectDebitConfiguration?.isSubmitButtonVisible ?: true, + isSubmitButtonVisible = if (isCreatedByDropIn) { + true + } else { + achDirectDebitConfiguration?.isSubmitButtonVisible ?: true + }, addressParams = achDirectDebitConfiguration?.addressConfiguration?.mapToAddressParam() ?: AddressParams.FullAddress( supportedCountryCodes = DEFAULT_SUPPORTED_COUNTRY_LIST, diff --git a/ach/src/test/java/com/adyen/checkout/ach/internal/ui/model/ACHDirectDebitComponentParamsMapperTest.kt b/ach/src/test/java/com/adyen/checkout/ach/internal/ui/model/ACHDirectDebitComponentParamsMapperTest.kt index ee28dba073..19c05660f3 100644 --- a/ach/src/test/java/com/adyen/checkout/ach/internal/ui/model/ACHDirectDebitComponentParamsMapperTest.kt +++ b/ach/src/test/java/com/adyen/checkout/ach/internal/ui/model/ACHDirectDebitComponentParamsMapperTest.kt @@ -99,6 +99,27 @@ internal class ACHDirectDebitComponentParamsMapperTest { assertEquals(expected, params) } + @Test + fun `when setSubmitButtonVisible is set to false in ach configuration and drop-in override params are set then card component params should have isSubmitButtonVisible true`() { + val configuration = CheckoutConfiguration( + environment = Environment.EUROPE, + clientKey = TEST_CLIENT_KEY_2, + ) { + achDirectDebit { + setSubmitButtonVisible(false) + } + } + val dropInOverrideParams = DropInOverrideParams(Amount("EUR", 123L), null) + val params = achDirectDebitComponentParamsMapper.mapToParams( + checkoutConfiguration = configuration, + deviceLocale = DEVICE_LOCALE, + dropInOverrideParams = dropInOverrideParams, + componentSessionParams = null, + ) + + assertEquals(true, params.isSubmitButtonVisible) + } + @Test fun `when a address is selected as FullAddress, addressParams should return FullAddress`() { val addressConfiguration = diff --git a/bcmc/src/main/java/com/adyen/checkout/bcmc/internal/ui/model/BcmcComponentParamsMapper.kt b/bcmc/src/main/java/com/adyen/checkout/bcmc/internal/ui/model/BcmcComponentParamsMapper.kt index 464b39777a..a65b1d71fd 100644 --- a/bcmc/src/main/java/com/adyen/checkout/bcmc/internal/ui/model/BcmcComponentParamsMapper.kt +++ b/bcmc/src/main/java/com/adyen/checkout/bcmc/internal/ui/model/BcmcComponentParamsMapper.kt @@ -49,6 +49,7 @@ internal class BcmcComponentParamsMapper( commonComponentParamsMapperData.sessionParams, bcmcConfiguration, paymentMethod, + commonComponentParamsMapperData.commonComponentParams.isCreatedByDropIn, ) } @@ -57,10 +58,11 @@ internal class BcmcComponentParamsMapper( sessionParams: SessionParams?, bcmcConfiguration: BcmcConfiguration?, paymentMethod: PaymentMethod, + isCreatedByDropIn: Boolean ): CardComponentParams { return CardComponentParams( commonComponentParams = commonComponentParams, - isSubmitButtonVisible = bcmcConfiguration?.isSubmitButtonVisible ?: true, + isSubmitButtonVisible = if (isCreatedByDropIn) true else bcmcConfiguration?.isSubmitButtonVisible ?: true, isHolderNameRequired = bcmcConfiguration?.isHolderNameRequired ?: false, shopperReference = bcmcConfiguration?.shopperReference, isStorePaymentFieldVisible = getStorePaymentFieldVisible(sessionParams, bcmcConfiguration), diff --git a/bcmc/src/test/java/com/adyen/checkout/bcmc/internal/ui/model/BcmcComponentParamsMapperTest.kt b/bcmc/src/test/java/com/adyen/checkout/bcmc/internal/ui/model/BcmcComponentParamsMapperTest.kt index bc11a8b73f..46704b9fc5 100644 --- a/bcmc/src/test/java/com/adyen/checkout/bcmc/internal/ui/model/BcmcComponentParamsMapperTest.kt +++ b/bcmc/src/test/java/com/adyen/checkout/bcmc/internal/ui/model/BcmcComponentParamsMapperTest.kt @@ -119,6 +119,29 @@ internal class BcmcComponentParamsMapperTest { assertEquals(expected, params) } + @Test + fun `when setSubmitButtonVisible is set to false in bcmc configuration and drop-in override params are set then card component params should have isSubmitButtonVisible true`() { + val configuration = CheckoutConfiguration( + environment = Environment.EUROPE, + clientKey = TEST_CLIENT_KEY_2, + ) { + bcmc { + setSubmitButtonVisible(false) + } + } + + val dropInOverrideParams = DropInOverrideParams(Amount("CAD", 123L), null) + val params = bcmcComponentParamsMapper.mapToParams( + configuration, + DEVICE_LOCALE, + dropInOverrideParams, + null, + PaymentMethod(), + ) + + assertEquals(true, params.isSubmitButtonVisible) + } + @ParameterizedTest @MethodSource("enableStoreDetailsSource") @Suppress("MaxLineLength") diff --git a/boleto/src/main/java/com/adyen/checkout/boleto/internal/ui/model/BoletoComponentParamsMapper.kt b/boleto/src/main/java/com/adyen/checkout/boleto/internal/ui/model/BoletoComponentParamsMapper.kt index 26bf1bffcc..b76526691a 100644 --- a/boleto/src/main/java/com/adyen/checkout/boleto/internal/ui/model/BoletoComponentParamsMapper.kt +++ b/boleto/src/main/java/com/adyen/checkout/boleto/internal/ui/model/BoletoComponentParamsMapper.kt @@ -37,7 +37,11 @@ internal class BoletoComponentParamsMapper( return BoletoComponentParams( commonComponentParams = commonComponentParams, - isSubmitButtonVisible = boletoConfiguration?.isSubmitButtonVisible ?: true, + isSubmitButtonVisible = if (commonComponentParams.isCreatedByDropIn) { + true + } else { + boletoConfiguration?.isSubmitButtonVisible ?: true + }, addressParams = AddressParams.FullAddress( defaultCountryCode = BRAZIL_COUNTRY_CODE, supportedCountryCodes = DEFAULT_SUPPORTED_COUNTRY_LIST, diff --git a/boleto/src/test/java/com/adyen/checkout/boleto/internal/ui/model/BoletoComponentParamsMapperTest.kt b/boleto/src/test/java/com/adyen/checkout/boleto/internal/ui/model/BoletoComponentParamsMapperTest.kt index 6e8b1f9795..57e3b68190 100644 --- a/boleto/src/test/java/com/adyen/checkout/boleto/internal/ui/model/BoletoComponentParamsMapperTest.kt +++ b/boleto/src/test/java/com/adyen/checkout/boleto/internal/ui/model/BoletoComponentParamsMapperTest.kt @@ -101,6 +101,26 @@ internal class BoletoComponentParamsMapperTest { assertEquals(expected, params) } + @Test + fun `when setSubmitButtonVisible is set to false in boleto configuration and drop-in override params are set then card component params should have isSubmitButtonVisible true`() { + val configuration = CheckoutConfiguration( + environment = Environment.EUROPE, + clientKey = TEST_CLIENT_KEY_2, + ) { + boleto { + setSubmitButtonVisible(false) + } + } + + val dropInOverrideParams = DropInOverrideParams(Amount("EUR", 20L), null) + val params = mapParams( + configuration = configuration, + dropInOverrideParams = dropInOverrideParams, + ) + + assertEquals(true, params.isSubmitButtonVisible) + } + @Test fun `when send email is set, them params should match`() { val configuration = createCheckoutConfiguration { diff --git a/card/src/main/java/com/adyen/checkout/card/internal/ui/model/CardComponentParamsMapper.kt b/card/src/main/java/com/adyen/checkout/card/internal/ui/model/CardComponentParamsMapper.kt index 44dda24c85..1223bc669a 100644 --- a/card/src/main/java/com/adyen/checkout/card/internal/ui/model/CardComponentParamsMapper.kt +++ b/card/src/main/java/com/adyen/checkout/card/internal/ui/model/CardComponentParamsMapper.kt @@ -85,6 +85,7 @@ internal class CardComponentParamsMapper( commonComponentParamsMapperData.sessionParams, cardConfiguration, paymentMethod, + commonComponentParamsMapperData.commonComponentParams.isCreatedByDropIn, ) } @@ -93,11 +94,12 @@ internal class CardComponentParamsMapper( sessionParams: SessionParams?, cardConfiguration: CardConfiguration?, paymentMethod: PaymentMethod?, + isCreatedByDropIn: Boolean ): CardComponentParams { return CardComponentParams( commonComponentParams = commonComponentParams, isHolderNameRequired = cardConfiguration?.isHolderNameRequired ?: false, - isSubmitButtonVisible = cardConfiguration?.isSubmitButtonVisible ?: true, + isSubmitButtonVisible = if (isCreatedByDropIn) true else cardConfiguration?.isSubmitButtonVisible ?: true, supportedCardBrands = getSupportedCardBrands(cardConfiguration, paymentMethod), shopperReference = cardConfiguration?.shopperReference, isStorePaymentFieldVisible = getStorePaymentFieldVisible(sessionParams, cardConfiguration), diff --git a/card/src/test/java/com/adyen/checkout/card/internal/ui/model/CardComponentParamsMapperTest.kt b/card/src/test/java/com/adyen/checkout/card/internal/ui/model/CardComponentParamsMapperTest.kt index aca0b1a417..ede86baf05 100644 --- a/card/src/test/java/com/adyen/checkout/card/internal/ui/model/CardComponentParamsMapperTest.kt +++ b/card/src/test/java/com/adyen/checkout/card/internal/ui/model/CardComponentParamsMapperTest.kt @@ -173,6 +173,28 @@ internal class CardComponentParamsMapperTest { assertEquals(expected, params) } + @Test + fun `when setSubmitButtonVisible is set to false in card configuration and drop-in override params are set then card component params should have isSubmitButtonVisible true`() { + val configuration = CheckoutConfiguration( + environment = Environment.EUROPE, + clientKey = TEST_CLIENT_KEY_2, + ) { + card { + setSubmitButtonVisible(false) + } + } + val dropInOverrideParams = DropInOverrideParams(Amount("EUR", 123L), null) + val params = cardComponentParamsMapper.mapToParams( + checkoutConfiguration = configuration, + deviceLocale = DEVICE_LOCALE, + dropInOverrideParams = dropInOverrideParams, + componentSessionParams = null, + paymentMethod = PaymentMethod(), + ) + + assertEquals(true, params.isSubmitButtonVisible) + } + @Test fun `when supported card types are set in the card configuration then they should be used in the params`() { val configuration = createCheckoutConfiguration { diff --git a/cashapppay/src/main/java/com/adyen/checkout/cashapppay/internal/ui/model/CashAppPayComponentParamsMapper.kt b/cashapppay/src/main/java/com/adyen/checkout/cashapppay/internal/ui/model/CashAppPayComponentParamsMapper.kt index a51a5d44bc..b7b563e391 100644 --- a/cashapppay/src/main/java/com/adyen/checkout/cashapppay/internal/ui/model/CashAppPayComponentParamsMapper.kt +++ b/cashapppay/src/main/java/com/adyen/checkout/cashapppay/internal/ui/model/CashAppPayComponentParamsMapper.kt @@ -61,6 +61,7 @@ internal class CashAppPayComponentParamsMapper( clientId = clientId, scopeId = scopeId, context = context, + isCreatedByDropIn = dropInOverrideParams != null, ) if (params.returnUrl == null) { @@ -97,6 +98,7 @@ internal class CashAppPayComponentParamsMapper( clientId = null, scopeId = null, context = context, + isCreatedByDropIn = commonComponentParamsMapperData.commonComponentParams.isCreatedByDropIn, ) } @@ -108,10 +110,15 @@ internal class CashAppPayComponentParamsMapper( clientId: String?, scopeId: String?, context: Context, + isCreatedByDropIn: Boolean ): CashAppPayComponentParams { return CashAppPayComponentParams( commonComponentParams = commonComponentParams, - isSubmitButtonVisible = cashAppPayConfiguration?.isSubmitButtonVisible ?: true, + isSubmitButtonVisible = if (isCreatedByDropIn) { + true + } else { + cashAppPayConfiguration?.isSubmitButtonVisible ?: true + }, cashAppPayEnvironment = getCashAppPayEnvironment( commonComponentParams.environment, cashAppPayConfiguration, diff --git a/cashapppay/src/test/java/com/adyen/checkout/cashapppay/internal/ui/model/CashAppPayComponentParamsMapperTest.kt b/cashapppay/src/test/java/com/adyen/checkout/cashapppay/internal/ui/model/CashAppPayComponentParamsMapperTest.kt index 878395cb69..e17aa3766a 100644 --- a/cashapppay/src/test/java/com/adyen/checkout/cashapppay/internal/ui/model/CashAppPayComponentParamsMapperTest.kt +++ b/cashapppay/src/test/java/com/adyen/checkout/cashapppay/internal/ui/model/CashAppPayComponentParamsMapperTest.kt @@ -146,6 +146,39 @@ internal class CashAppPayComponentParamsMapperTest { assertEquals(expected, params) } + @Test + fun `when setSubmitButtonVisible is set to false in cash app configuration and drop-in override params are set then card component params should have isSubmitButtonVisible true`() { + val configuration = CheckoutConfiguration( + shopperLocale = Locale.GERMAN, + environment = Environment.EUROPE, + clientKey = TEST_CLIENT_KEY_2, + amount = Amount( + currency = "CAD", + value = 1235_00L, + ), + analyticsConfiguration = AnalyticsConfiguration(AnalyticsLevel.NONE), + ) { + cashAppPay { + setReturnUrl(TEST_RETURN_URL) + setAmount(Amount("USD", 1L)) + setAnalyticsConfiguration(AnalyticsConfiguration(AnalyticsLevel.ALL)) + setSubmitButtonVisible(false) + } + } + + val dropInOverrideParams = DropInOverrideParams(Amount("EUR", 123L), null) + val params = cashAppPayComponentParamsMapper.mapToParams( + checkoutConfiguration = configuration, + deviceLocale = DEVICE_LOCALE, + dropInOverrideParams = dropInOverrideParams, + componentSessionParams = null, + paymentMethod = getDefaultPaymentMethod(), + context = Application(), + ) + + assertEquals(true, params.isSubmitButtonVisible) + } + @ParameterizedTest @MethodSource("enableStoreDetailsSource") fun `showStorePaymentField should match value set in sessions if it exists, otherwise should match configuration`( diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/internal/ui/model/ButtonComponentParamsMapper.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/ui/model/ButtonComponentParamsMapper.kt index 9e73f85978..ec2887b59e 100644 --- a/components-core/src/main/java/com/adyen/checkout/components/core/internal/ui/model/ButtonComponentParamsMapper.kt +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/ui/model/ButtonComponentParamsMapper.kt @@ -24,9 +24,14 @@ class ButtonComponentParamsMapper( dropInOverrideParams, componentSessionParams, ) + val commonComponentParams = commonComponentParamsMapperData.commonComponentParams return ButtonComponentParams( - commonComponentParams = commonComponentParamsMapperData.commonComponentParams, - isSubmitButtonVisible = (componentConfiguration as? ButtonConfiguration)?.isSubmitButtonVisible ?: true, + commonComponentParams = commonComponentParams, + isSubmitButtonVisible = if (commonComponentParams.isCreatedByDropIn) { + true + } else { + (componentConfiguration as? ButtonConfiguration)?.isSubmitButtonVisible ?: true + }, ) } } diff --git a/components-core/src/test/java/com/adyen/checkout/components/core/ButtonTestConfiguration.kt b/components-core/src/test/java/com/adyen/checkout/components/core/ButtonTestConfiguration.kt index ea6c275406..64b5349e10 100644 --- a/components-core/src/test/java/com/adyen/checkout/components/core/ButtonTestConfiguration.kt +++ b/components-core/src/test/java/com/adyen/checkout/components/core/ButtonTestConfiguration.kt @@ -27,7 +27,7 @@ class ButtonTestConfiguration private constructor( private var isSubmitButtonVisible: Boolean? = null - override fun setSubmitButtonVisible(isSubmitButtonVisible: Boolean): ButtonConfigurationBuilder { + override fun setSubmitButtonVisible(isSubmitButtonVisible: Boolean): Builder { this.isSubmitButtonVisible = isSubmitButtonVisible return this } diff --git a/components-core/src/test/java/com/adyen/checkout/components/core/internal/ui/model/ButtonComponentParamsMapperTest.kt b/components-core/src/test/java/com/adyen/checkout/components/core/internal/ui/model/ButtonComponentParamsMapperTest.kt index ab0af5e49f..c76dc05813 100644 --- a/components-core/src/test/java/com/adyen/checkout/components/core/internal/ui/model/ButtonComponentParamsMapperTest.kt +++ b/components-core/src/test/java/com/adyen/checkout/components/core/internal/ui/model/ButtonComponentParamsMapperTest.kt @@ -78,6 +78,30 @@ internal class ButtonComponentParamsMapperTest { assertEquals(expected, params) } + @Test + fun `when setSubmitButtonVisible is set to false in button component configuration and drop-in override params are set then card component params should have isSubmitButtonVisible true`() { + val configuration = CheckoutConfiguration( + environment = Environment.EUROPE, + clientKey = TEST_CLIENT_KEY_2, + ) { + val testConfiguration = ButtonTestConfiguration.Builder(Locale.CANADA, Environment.TEST, TEST_CLIENT_KEY_1) + .setSubmitButtonVisible(false) + .build() + addConfiguration(TEST_CONFIGURATION_KEY, testConfiguration) + } + + val dropInOverrideParams = DropInOverrideParams(Amount("USD", 123L), null) + val params = buttonComponentParamsMapper.mapToParams( + checkoutConfiguration = configuration, + deviceLocale = DEVICE_LOCALE, + dropInOverrideParams = dropInOverrideParams, + componentSessionParams = null, + componentConfiguration = configuration.getConfiguration(TEST_CONFIGURATION_KEY), + ) + + assertEquals(true, params.isSubmitButtonVisible) + } + @ParameterizedTest @MethodSource("amountSource") fun `amount should match value set in sessions then drop in then component configuration`( diff --git a/giftcard/src/main/java/com/adyen/checkout/giftcard/internal/ui/model/GiftCardComponentParamsMapper.kt b/giftcard/src/main/java/com/adyen/checkout/giftcard/internal/ui/model/GiftCardComponentParamsMapper.kt index c98065711d..36917f2de4 100644 --- a/giftcard/src/main/java/com/adyen/checkout/giftcard/internal/ui/model/GiftCardComponentParamsMapper.kt +++ b/giftcard/src/main/java/com/adyen/checkout/giftcard/internal/ui/model/GiftCardComponentParamsMapper.kt @@ -33,10 +33,13 @@ internal class GiftCardComponentParamsMapper( ) val commonComponentParams = commonComponentParamsMapperData.commonComponentParams val giftCardConfiguration = checkoutConfiguration.getGiftCardConfiguration() - return GiftCardComponentParams( commonComponentParams = commonComponentParams, - isSubmitButtonVisible = giftCardConfiguration?.isSubmitButtonVisible ?: true, + isSubmitButtonVisible = if (commonComponentParams.isCreatedByDropIn) { + true + } else { + giftCardConfiguration?.isSubmitButtonVisible ?: true + }, isPinRequired = giftCardConfiguration?.isPinRequired ?: true, ) } diff --git a/giftcard/src/test/java/com/adyen/checkout/giftcard/internal/ui/model/GiftCardComponentParamsMapperTest.kt b/giftcard/src/test/java/com/adyen/checkout/giftcard/internal/ui/model/GiftCardComponentParamsMapperTest.kt index 43d6097f6e..bb9213e757 100644 --- a/giftcard/src/test/java/com/adyen/checkout/giftcard/internal/ui/model/GiftCardComponentParamsMapperTest.kt +++ b/giftcard/src/test/java/com/adyen/checkout/giftcard/internal/ui/model/GiftCardComponentParamsMapperTest.kt @@ -80,6 +80,23 @@ internal class GiftCardComponentParamsMapperTest { assertEquals(expected, params) } + @Test + fun `when setSubmitButtonVisible is set to false in gift card configuration and drop-in override params are set then card component params should have isSubmitButtonVisible true`() { + val configuration = CheckoutConfiguration( + environment = Environment.EUROPE, + clientKey = TEST_CLIENT_KEY_2, + ) { + giftCard { + setSubmitButtonVisible(false) + } + } + + val dropInOverrideParams = DropInOverrideParams(Amount("CAD", 123L), null) + val params = giftCardComponentParamsMapper.mapToParams(configuration, DEVICE_LOCALE, dropInOverrideParams, null) + + assertEquals(true, params.isSubmitButtonVisible) + } + @ParameterizedTest @MethodSource("amountSource") fun `amount should match value set in sessions then drop in then component configuration`( diff --git a/issuer-list/src/main/java/com/adyen/checkout/issuerlist/internal/ui/model/IssuerListComponentParamsMapper.kt b/issuer-list/src/main/java/com/adyen/checkout/issuerlist/internal/ui/model/IssuerListComponentParamsMapper.kt index 88e69846ae..500c05ce39 100644 --- a/issuer-list/src/main/java/com/adyen/checkout/issuerlist/internal/ui/model/IssuerListComponentParamsMapper.kt +++ b/issuer-list/src/main/java/com/adyen/checkout/issuerlist/internal/ui/model/IssuerListComponentParamsMapper.kt @@ -37,9 +37,14 @@ class IssuerListComponentParamsMapper( dropInOverrideParams, componentSessionParams, ) + val commonComponentParams = commonComponentParamsMapperData.commonComponentParams return IssuerListComponentParams( - commonComponentParams = commonComponentParamsMapperData.commonComponentParams, - isSubmitButtonVisible = componentConfiguration?.isSubmitButtonVisible ?: true, + commonComponentParams = commonComponentParams, + isSubmitButtonVisible = if (commonComponentParams.isCreatedByDropIn) { + true + } else { + componentConfiguration?.isSubmitButtonVisible ?: true + }, viewType = componentConfiguration?.viewType ?: IssuerListViewType.RECYCLER_VIEW, hideIssuerLogos = componentConfiguration?.hideIssuerLogos ?: hideIssuerLogosDefaultValue, ) diff --git a/issuer-list/src/test/java/com/adyen/checkout/issuerlist/internal/ui/model/IssuerListComponentParamsMapperTest.kt b/issuer-list/src/test/java/com/adyen/checkout/issuerlist/internal/ui/model/IssuerListComponentParamsMapperTest.kt index f4d53c0e51..7adec2928b 100644 --- a/issuer-list/src/test/java/com/adyen/checkout/issuerlist/internal/ui/model/IssuerListComponentParamsMapperTest.kt +++ b/issuer-list/src/test/java/com/adyen/checkout/issuerlist/internal/ui/model/IssuerListComponentParamsMapperTest.kt @@ -132,6 +132,31 @@ internal class IssuerListComponentParamsMapperTest { assertEquals(expected, params) } + @Test + fun `when setSubmitButtonVisible is set to false in issuers list configuration and drop-in override params are set then card component params should have isSubmitButtonVisible true`() { + val configuration = CheckoutConfiguration( + environment = Environment.EUROPE, + clientKey = TEST_CLIENT_KEY_2, + ) { + val issuerListConfiguration = TestIssuerListConfiguration.Builder(shopperLocale, environment, clientKey) + .setSubmitButtonVisible(false) + .build() + addConfiguration(TEST_CONFIGURATION_KEY, issuerListConfiguration) + } + + val dropInOverrideParams = DropInOverrideParams(Amount("CAD", 123L), null) + val params = issuerListComponentParamsMapper.mapToParams( + checkoutConfiguration = configuration, + deviceLocale = DEVICE_LOCALE, + dropInOverrideParams = dropInOverrideParams, + componentSessionParams = null, + componentConfiguration = configuration.getConfiguration(TEST_CONFIGURATION_KEY), + hideIssuerLogosDefaultValue = false, + ) + + assertEquals(true, params.isSubmitButtonVisible) + } + @ParameterizedTest @MethodSource("amountSource") fun `amount should match value set in sessions then drop in then component configuration`(