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(connector): fix Stripe status to attempt status map (#1132)

Abhishek Marrivagu8b85647a169d
diff --git a/crates/router/src/connector/stripe/transformers.rs b/crates/router/src/connector/stripe/transformers.rs
index dac8adeb59..aaae96cab9 100644
--- a/crates/router/src/connector/stripe/transformers.rs
+++ b/crates/router/src/connector/stripe/transformers.rs
@@ -1121,8 +1121,6 @@ pub enum StripePaymentStatus {
RequiresConfirmation,
Canceled,
RequiresCapture,
- // This is the case in
- Pending,
}
impl From<StripePaymentStatus> for enums::AttemptStatus {
@@ -1132,11 +1130,10 @@ impl From<StripePaymentStatus> for enums::AttemptStatus {
StripePaymentStatus::Failed => Self::Failure,
StripePaymentStatus::Processing => Self::Authorizing,
StripePaymentStatus::RequiresCustomerAction => Self::AuthenticationPending,
- StripePaymentStatus::RequiresPaymentMethod => Self::PaymentMethodAwaited,
+ StripePaymentStatus::RequiresPaymentMethod => Self::Failure,
StripePaymentStatus::RequiresConfirmation => Self::ConfirmationAwaited,
StripePaymentStatus::Canceled => Self::Voided,
StripePaymentStatus::RequiresCapture => Self::Authorized,
- StripePaymentStatus::Pending => Self::Pending,
}
}
}