Skip to content

Commit

Permalink
feat(connector): [BANKOFAMERICA] Bug Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
deepanshu-iiitu committed Nov 17, 2023
1 parent 815241b commit 3814f44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/router/src/connector/bankofamerica/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,15 +273,15 @@ pub enum BankofamericaPaymentStatus {
impl ForeignFrom<(BankofamericaPaymentStatus, bool)> for enums::AttemptStatus {
fn foreign_from((status, auto_capture): (BankofamericaPaymentStatus, bool)) -> Self {
match status {
BankofamericaPaymentStatus::Authorized => {
BankofamericaPaymentStatus::Authorized
| BankofamericaPaymentStatus::AuthorizedPendingReview => {
if auto_capture {
// Because BankOfAmerica will return Payment Status as Authorized even in AutoCapture Payment
Self::Pending
} else {
Self::Authorized
}
}
BankofamericaPaymentStatus::AuthorizedPendingReview => Self::Authorized,
BankofamericaPaymentStatus::Succeeded | BankofamericaPaymentStatus::Transmitted => {
Self::Charged
}
Expand Down

0 comments on commit 3814f44

Please sign in to comment.