From 1199d72bfd9e043042d4c8e025fa9957dba4520b Mon Sep 17 00:00:00 2001 From: Alex Morask <144709477+amorask-bitwarden@users.noreply.github.com> Date: Thu, 26 Sep 2024 13:51:49 -0400 Subject: [PATCH] Handle us_bank_account in charge.succeeded (#4807) --- .../Services/Implementations/StripeEventUtilityService.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Billing/Services/Implementations/StripeEventUtilityService.cs b/src/Billing/Services/Implementations/StripeEventUtilityService.cs index f656dbcc1..520205e74 100644 --- a/src/Billing/Services/Implementations/StripeEventUtilityService.cs +++ b/src/Billing/Services/Implementations/StripeEventUtilityService.cs @@ -206,6 +206,12 @@ public class StripeEventUtilityService : IStripeEventUtilityService transaction.PaymentMethodType = PaymentMethodType.Card; transaction.Details = $"{card.Brand?.ToUpperInvariant()}, *{card.Last4}"; } + else if (charge.PaymentMethodDetails.UsBankAccount != null) + { + var usBankAccount = charge.PaymentMethodDetails.UsBankAccount; + transaction.PaymentMethodType = PaymentMethodType.BankAccount; + transaction.Details = $"{usBankAccount.BankName}, *{usBankAccount.Last4}"; + } else if (charge.PaymentMethodDetails.AchDebit != null) { var achDebit = charge.PaymentMethodDetails.AchDebit;