Skip to content

Commit

Permalink
Handle us_bank_account in charge.succeeded (#4807)
Browse files Browse the repository at this point in the history
  • Loading branch information
amorask-bitwarden authored Sep 26, 2024
1 parent 05247d2 commit 1199d72
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,12 @@ public Transaction FromChargeToTransaction(Charge charge, Guid? organizationId,
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;
Expand Down

0 comments on commit 1199d72

Please sign in to comment.