refactor(fix): [Stripe] Fix bug in Stripe (#1412)

Co-authored-by: Jagan Elavarasan <jaganelavarasan@gmail.com>
Co-authored-by: Prasunna Soppa <70575890+prasunna09@users.noreply.github.com>
This commit is contained in:
AkshayaFoiger
2023-06-14 18:38:54 +05:30
committed by GitHub
parent 1e61f396bd
commit e48202e0a0

View File

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