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): fix payment status for 4xx (#3177)

Swangi Kumarie7949c23b9be
diff --git a/crates/router/src/core/payments/helpers.rs b/crates/router/src/core/payments/helpers.rs
index 341699c092..2cd62fbd49 100644
--- a/crates/router/src/core/payments/helpers.rs
+++ b/crates/router/src/core/payments/helpers.rs
@@ -953,7 +953,7 @@ pub fn payment_attempt_status_fsm(
) -> storage_enums::AttemptStatus {
match payment_method_data {
Some(_) => match confirm {
- Some(true) => storage_enums::AttemptStatus::Pending,
+ Some(true) => storage_enums::AttemptStatus::PaymentMethodAwaited,
_ => storage_enums::AttemptStatus::ConfirmationAwaited,
},
None => storage_enums::AttemptStatus::PaymentMethodAwaited,
@@ -966,7 +966,7 @@ pub fn payment_intent_status_fsm(
) -> storage_enums::IntentStatus {
match payment_method_data {
Some(_) => match confirm {
- Some(true) => storage_enums::IntentStatus::RequiresCustomerAction,
+ Some(true) => storage_enums::IntentStatus::RequiresPaymentMethod,
_ => storage_enums::IntentStatus::RequiresConfirmation,
},
None => storage_enums::IntentStatus::RequiresPaymentMethod,