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

fix(router): allow payments update for requires_payment_method and requires_confirmation intent status only (#5616)

Sai Harsha Vardhan805540a1d02e
diff --git a/crates/router/src/core/payments/operations/payment_update.rs b/crates/router/src/core/payments/operations/payment_update.rs
index b2ad13ee0d..e7045116f2 100644
--- a/crates/router/src/core/payments/operations/payment_update.rs
+++ b/crates/router/src/core/payments/operations/payment_update.rs
@@ -95,13 +95,11 @@ impl<F: Send + Clone> GetTracker<F, PaymentData<F>, api::PaymentsRequest> for Pa
.and_then(|pmd| pmd.payment_method_data.clone()),
)?;
- helpers::validate_payment_status_against_not_allowed_statuses(
+ helpers::validate_payment_status_against_allowed_statuses(
&payment_intent.status,
&[
- storage_enums::IntentStatus::Failed,
- storage_enums::IntentStatus::Succeeded,
- storage_enums::IntentStatus::PartiallyCaptured,
- storage_enums::IntentStatus::RequiresCapture,
+ storage_enums::IntentStatus::RequiresPaymentMethod,
+ storage_enums::IntentStatus::RequiresConfirmation,
],
"update",
)?;