From 06c4d0bdede1ae3a70190f781b73d0c8e0fd1121 Mon Sep 17 00:00:00 2001 From: Till Hellmund Date: Thu, 31 Oct 2024 10:26:44 -0400 Subject: [PATCH] Pass lowercase email into `BillingDetails` --- .../paymentdatacollection/ach/USBankAccountFormViewModel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paymentsheet/src/main/java/com/stripe/android/paymentsheet/paymentdatacollection/ach/USBankAccountFormViewModel.kt b/paymentsheet/src/main/java/com/stripe/android/paymentsheet/paymentdatacollection/ach/USBankAccountFormViewModel.kt index bffc42de0a6..9063bf7c5ac 100644 --- a/paymentsheet/src/main/java/com/stripe/android/paymentsheet/paymentdatacollection/ach/USBankAccountFormViewModel.kt +++ b/paymentsheet/src/main/java/com/stripe/android/paymentsheet/paymentdatacollection/ach/USBankAccountFormViewModel.kt @@ -545,7 +545,8 @@ internal class USBankAccountFormViewModel @Inject internal constructor( return ElementsSessionContext.BillingDetails( name = name, - email = email, + // The createPaymentDetails endpoint does not accept lowercase email. + email = email?.lowercase(), phone = phone?.let { phoneController.getE164PhoneNumber(it) }, address = address?.let { ElementsSessionContext.BillingDetails.Address(