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(fix): [Stripe] Fix bug in Stripe (#1412)

AkshayaFoigere48202e0a06f
diff --git a/crates/router/src/connector/stripe.rs b/crates/router/src/connector/stripe.rs
index 3d89e8b4ae..04d0c3884e 100644
--- a/crates/router/src/connector/stripe.rs
+++ b/crates/router/src/connector/stripe.rs
@@ -1858,20 +1858,13 @@ impl services::ConnectorRedirectResponse for Stripe {
crate::logger::debug!(stripe_redirect_response=?query);
- Ok(query
- .redirect_status
- .map_or(
- payments::CallConnectorAction::Trigger,
- |status| match status {
- transformers::StripePaymentStatus::Failed => {
- payments::CallConnectorAction::Trigger
- }
- _ => payments::CallConnectorAction::StatusUpdate {
- status: enums::AttemptStatus::from(status),
- error_code: None,
- error_message: None,
- },
- },
- ))
+ Ok(query.redirect_status.map_or(
+ payments::CallConnectorAction::StatusUpdate {
+ status: enums::AttemptStatus::Pending,
+ error_code: None,
+ error_message: None,
+ },
+ |_| payments::CallConnectorAction::Trigger,
+ ))
}
}