Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

refactor(core): removed the processing status for payment_method_status (#4213)

Prajjwal Kumara843713126ce
diff --git a/crates/common_enums/src/enums.rs b/crates/common_enums/src/enums.rs
index bbabab3a4e..548e721f0d 100644
--- a/crates/common_enums/src/enums.rs
+++ b/crates/common_enums/src/enums.rs
@@ -1253,7 +1253,6 @@ pub enum PaymentMethodStatus {
impl From<AttemptStatus> for PaymentMethodStatus {
fn from(attempt_status: AttemptStatus) -> Self {
match attempt_status {
- AttemptStatus::Charged | AttemptStatus::Authorized => Self::Active,
AttemptStatus::Failure => Self::Inactive,
AttemptStatus::Voided
| AttemptStatus::Started
@@ -1275,7 +1274,9 @@ impl From<AttemptStatus> for PaymentMethodStatus {
| AttemptStatus::PartialCharged
| AttemptStatus::PartialChargedAndChargeable
| AttemptStatus::ConfirmationAwaited
- | AttemptStatus::DeviceDataCollectionPending => Self::Processing,
+ | AttemptStatus::DeviceDataCollectionPending
+ | AttemptStatus::Charged
+ | AttemptStatus::Authorized => Self::Active,
}
}
}