From afd06fff67e13b3d4956afd65b6ea2d1eb7b66d7 Mon Sep 17 00:00:00 2001 From: erenbesel Date: Wed, 28 Aug 2024 10:56:04 +0200 Subject: [PATCH] pass storepayment flag to cashapp from dropin --- .../Utilities/ComponentManager+PaymentComponentBuilder.swift | 1 + Demo/Configuration.swift | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AdyenDropIn/Utilities/ComponentManager+PaymentComponentBuilder.swift b/AdyenDropIn/Utilities/ComponentManager+PaymentComponentBuilder.swift index 5aae6b6468..2c63abd829 100644 --- a/AdyenDropIn/Utilities/ComponentManager+PaymentComponentBuilder.swift +++ b/AdyenDropIn/Utilities/ComponentManager+PaymentComponentBuilder.swift @@ -200,6 +200,7 @@ extension ComponentManager: PaymentComponentBuilder { var cashAppPayConfiguration = CashAppPayConfiguration(redirectURL: cashAppPayDropInConfig.redirectURL, referenceId: cashAppPayDropInConfig.referenceId) cashAppPayConfiguration.showsStorePaymentMethodField = cashAppPayDropInConfig.showsStorePaymentMethodField + cashAppPayConfiguration.storePaymentMethod = cashAppPayDropInConfig.storePaymentMethod cashAppPayConfiguration.localizationParameters = configuration.localizationParameters cashAppPayConfiguration.style = configuration.style.formComponent diff --git a/Demo/Configuration.swift b/Demo/Configuration.swift index 3d08af8dff..28eba1423e 100644 --- a/Demo/Configuration.swift +++ b/Demo/Configuration.swift @@ -255,7 +255,7 @@ internal struct DemoAppSettings: Codable { dropInConfig.paymentMethodsList.allowDisablingStoredPaymentMethods = dropInSettings.allowDisablingStoredPaymentMethods if dropInSettings.cashAppPayEnabled { - dropInConfig.cashAppPay = .init(redirectURL: ConfigurationConstants.returnUrl) + dropInConfig.cashAppPay = .init(redirectURL: ConfigurationConstants.returnUrl, showsStorePaymentMethodField: false, storePaymentMethod: true) } dropInConfig.actionComponent.twint = .init(callbackAppScheme: ConfigurationConstants.returnUrl.scheme!)