mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 13:30:39 +08:00
revert(connector): fix stripe status to attempt status map (#1179)
This commit is contained in:
@ -1213,6 +1213,8 @@ pub enum StripePaymentStatus {
|
|||||||
RequiresConfirmation,
|
RequiresConfirmation,
|
||||||
Canceled,
|
Canceled,
|
||||||
RequiresCapture,
|
RequiresCapture,
|
||||||
|
// This is the case in Sofort Bank Redirects
|
||||||
|
Pending,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<StripePaymentStatus> for enums::AttemptStatus {
|
impl From<StripePaymentStatus> for enums::AttemptStatus {
|
||||||
@ -1222,10 +1224,12 @@ impl From<StripePaymentStatus> for enums::AttemptStatus {
|
|||||||
StripePaymentStatus::Failed => Self::Failure,
|
StripePaymentStatus::Failed => Self::Failure,
|
||||||
StripePaymentStatus::Processing => Self::Authorizing,
|
StripePaymentStatus::Processing => Self::Authorizing,
|
||||||
StripePaymentStatus::RequiresCustomerAction => Self::AuthenticationPending,
|
StripePaymentStatus::RequiresCustomerAction => Self::AuthenticationPending,
|
||||||
|
// Make the payment attempt status as failed
|
||||||
StripePaymentStatus::RequiresPaymentMethod => Self::Failure,
|
StripePaymentStatus::RequiresPaymentMethod => Self::Failure,
|
||||||
StripePaymentStatus::RequiresConfirmation => Self::ConfirmationAwaited,
|
StripePaymentStatus::RequiresConfirmation => Self::ConfirmationAwaited,
|
||||||
StripePaymentStatus::Canceled => Self::Voided,
|
StripePaymentStatus::Canceled => Self::Voided,
|
||||||
StripePaymentStatus::RequiresCapture => Self::Authorized,
|
StripePaymentStatus::RequiresCapture => Self::Authorized,
|
||||||
|
StripePaymentStatus::Pending => Self::Pending,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user