mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
feat(connector): [BOA/CYB] Add support for payment status ACCEPTED and CANCELLED (#4107)
This commit is contained in:
@ -896,6 +896,8 @@ pub enum BankofamericaPaymentStatus {
|
|||||||
ServerError,
|
ServerError,
|
||||||
PendingAuthentication,
|
PendingAuthentication,
|
||||||
PendingReview,
|
PendingReview,
|
||||||
|
Accepted,
|
||||||
|
Cancelled,
|
||||||
//PartialAuthorized, not being consumed yet.
|
//PartialAuthorized, not being consumed yet.
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -921,9 +923,9 @@ impl ForeignFrom<(BankofamericaPaymentStatus, bool)> for enums::AttemptStatus {
|
|||||||
BankofamericaPaymentStatus::Succeeded | BankofamericaPaymentStatus::Transmitted => {
|
BankofamericaPaymentStatus::Succeeded | BankofamericaPaymentStatus::Transmitted => {
|
||||||
Self::Charged
|
Self::Charged
|
||||||
}
|
}
|
||||||
BankofamericaPaymentStatus::Voided | BankofamericaPaymentStatus::Reversed => {
|
BankofamericaPaymentStatus::Voided
|
||||||
Self::Voided
|
| BankofamericaPaymentStatus::Reversed
|
||||||
}
|
| BankofamericaPaymentStatus::Cancelled => Self::Voided,
|
||||||
BankofamericaPaymentStatus::Failed
|
BankofamericaPaymentStatus::Failed
|
||||||
| BankofamericaPaymentStatus::Declined
|
| BankofamericaPaymentStatus::Declined
|
||||||
| BankofamericaPaymentStatus::AuthorizedRiskDeclined
|
| BankofamericaPaymentStatus::AuthorizedRiskDeclined
|
||||||
@ -931,9 +933,9 @@ impl ForeignFrom<(BankofamericaPaymentStatus, bool)> for enums::AttemptStatus {
|
|||||||
| BankofamericaPaymentStatus::Rejected
|
| BankofamericaPaymentStatus::Rejected
|
||||||
| BankofamericaPaymentStatus::ServerError => Self::Failure,
|
| BankofamericaPaymentStatus::ServerError => Self::Failure,
|
||||||
BankofamericaPaymentStatus::PendingAuthentication => Self::AuthenticationPending,
|
BankofamericaPaymentStatus::PendingAuthentication => Self::AuthenticationPending,
|
||||||
BankofamericaPaymentStatus::PendingReview | BankofamericaPaymentStatus::Challenge => {
|
BankofamericaPaymentStatus::PendingReview
|
||||||
Self::Pending
|
| BankofamericaPaymentStatus::Challenge
|
||||||
}
|
| BankofamericaPaymentStatus::Accepted => Self::Pending,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1397,6 +1397,8 @@ pub enum CybersourcePaymentStatus {
|
|||||||
ServerError,
|
ServerError,
|
||||||
PendingAuthentication,
|
PendingAuthentication,
|
||||||
PendingReview,
|
PendingReview,
|
||||||
|
Accepted,
|
||||||
|
Cancelled,
|
||||||
//PartialAuthorized, not being consumed yet.
|
//PartialAuthorized, not being consumed yet.
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1430,7 +1432,9 @@ impl ForeignFrom<(CybersourcePaymentStatus, bool)> for enums::AttemptStatus {
|
|||||||
CybersourcePaymentStatus::Succeeded | CybersourcePaymentStatus::Transmitted => {
|
CybersourcePaymentStatus::Succeeded | CybersourcePaymentStatus::Transmitted => {
|
||||||
Self::Charged
|
Self::Charged
|
||||||
}
|
}
|
||||||
CybersourcePaymentStatus::Voided | CybersourcePaymentStatus::Reversed => Self::Voided,
|
CybersourcePaymentStatus::Voided
|
||||||
|
| CybersourcePaymentStatus::Reversed
|
||||||
|
| CybersourcePaymentStatus::Cancelled => Self::Voided,
|
||||||
CybersourcePaymentStatus::Failed
|
CybersourcePaymentStatus::Failed
|
||||||
| CybersourcePaymentStatus::Declined
|
| CybersourcePaymentStatus::Declined
|
||||||
| CybersourcePaymentStatus::AuthorizedRiskDeclined
|
| CybersourcePaymentStatus::AuthorizedRiskDeclined
|
||||||
@ -1438,9 +1442,9 @@ impl ForeignFrom<(CybersourcePaymentStatus, bool)> for enums::AttemptStatus {
|
|||||||
| CybersourcePaymentStatus::InvalidRequest
|
| CybersourcePaymentStatus::InvalidRequest
|
||||||
| CybersourcePaymentStatus::ServerError => Self::Failure,
|
| CybersourcePaymentStatus::ServerError => Self::Failure,
|
||||||
CybersourcePaymentStatus::PendingAuthentication => Self::AuthenticationPending,
|
CybersourcePaymentStatus::PendingAuthentication => Self::AuthenticationPending,
|
||||||
CybersourcePaymentStatus::PendingReview | CybersourcePaymentStatus::Challenge => {
|
CybersourcePaymentStatus::PendingReview
|
||||||
Self::Pending
|
| CybersourcePaymentStatus::Challenge
|
||||||
}
|
| CybersourcePaymentStatus::Accepted => Self::Pending,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user