revert(connector): fix stripe status to attempt status map (#1179)

This commit is contained in:
Narayan Bhat
2023-05-17 20:06:20 +05:30
committed by GitHub
parent 919c03e679
commit bd8868efd0

View File

@ -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,
} }
} }
} }