mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-31 01:57:45 +08:00
fix(core): Update pm_status accordingly for the respective attempt status (#5557)
Co-authored-by: Shankar Singh C <shankar.singh@juspay.in> Co-authored-by: Shankar Singh C <83439957+ShankarSinghC@users.noreply.github.com>
This commit is contained in:
@ -1413,8 +1413,8 @@ pub enum PaymentMethodStatus {
|
||||
impl From<AttemptStatus> for PaymentMethodStatus {
|
||||
fn from(attempt_status: AttemptStatus) -> Self {
|
||||
match attempt_status {
|
||||
AttemptStatus::Failure => Self::Inactive,
|
||||
AttemptStatus::Voided
|
||||
AttemptStatus::Failure
|
||||
| AttemptStatus::Voided
|
||||
| AttemptStatus::Started
|
||||
| AttemptStatus::Pending
|
||||
| AttemptStatus::Unresolved
|
||||
@ -1434,9 +1434,8 @@ impl From<AttemptStatus> for PaymentMethodStatus {
|
||||
| AttemptStatus::PartialCharged
|
||||
| AttemptStatus::PartialChargedAndChargeable
|
||||
| AttemptStatus::ConfirmationAwaited
|
||||
| AttemptStatus::DeviceDataCollectionPending
|
||||
| AttemptStatus::Charged
|
||||
| AttemptStatus::Authorized => Self::Active,
|
||||
| AttemptStatus::DeviceDataCollectionPending => Self::Inactive,
|
||||
AttemptStatus::Charged | AttemptStatus::Authorized => Self::Active,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user