From fb2ce3dcdca3ac82de35af494623b53da3f45a5f Mon Sep 17 00:00:00 2001 From: Amy Date: Tue, 11 Jun 2024 13:06:53 -0400 Subject: [PATCH] MBL-1390: Log in to Stripe Link on Payment settings page, too --- Library/ViewModels/PaymentMethodSettingsViewModel.swift | 4 ++++ Library/ViewModels/PledgePaymentMethodsViewModel.swift | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/ViewModels/PaymentMethodSettingsViewModel.swift b/Library/ViewModels/PaymentMethodSettingsViewModel.swift index 2512f3848e..8f72bc79fa 100644 --- a/Library/ViewModels/PaymentMethodSettingsViewModel.swift +++ b/Library/ViewModels/PaymentMethodSettingsViewModel.swift @@ -138,6 +138,10 @@ public final class PaymentMethodSettingsViewModel: PaymentMethodsViewModelType, var configuration = PaymentSheet.Configuration() configuration.merchantDisplayName = Strings.general_accessibility_kickstarter() configuration.allowsDelayedPaymentMethods = true + + // Log in to Stripe Link + configuration.defaultBillingDetails.email = AppEnvironment.current.currentUserEmail + let data = PaymentSheetSetupData( clientSecret: envelope.clientSecret, configuration: configuration diff --git a/Library/ViewModels/PledgePaymentMethodsViewModel.swift b/Library/ViewModels/PledgePaymentMethodsViewModel.swift index 2a61f3e8a8..089959a701 100644 --- a/Library/ViewModels/PledgePaymentMethodsViewModel.swift +++ b/Library/ViewModels/PledgePaymentMethodsViewModel.swift @@ -325,7 +325,7 @@ public final class PledgePaymentMethodsViewModel: PledgePaymentMethodsViewModelT configuration.merchantDisplayName = Strings.general_accessibility_kickstarter() configuration.allowsDelayedPaymentMethods = true - // Enable Stripe Link + // Log in to Stripe Link configuration.defaultBillingDetails.email = AppEnvironment.current.currentUserEmail let data = PaymentSheetSetupData(