From 8dba4af8627a2538cffaeab8ca169f767c1328c5 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 508f210bcfd..dfd8aa73350 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(