mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 19:42:27 +08:00
fix(router): fix payment status updation for 2xx error responses (#1457)
This commit is contained in:
committed by
GitHub
parent
3a225b2118
commit
a7ac4af5d9
@ -300,8 +300,8 @@ async fn payment_response_update_tracker<F: Clone, T: types::Capturable>(
|
||||
Some(storage::PaymentAttemptUpdate::ErrorUpdate {
|
||||
connector: None,
|
||||
status: match err.status_code {
|
||||
400..=499 => storage::enums::AttemptStatus::Failure,
|
||||
_ => storage::enums::AttemptStatus::Pending,
|
||||
500..=511 => storage::enums::AttemptStatus::Pending,
|
||||
_ => storage::enums::AttemptStatus::Failure,
|
||||
},
|
||||
error_message: Some(Some(err.message)),
|
||||
error_code: Some(Some(err.code)),
|
||||
@ -450,8 +450,8 @@ async fn payment_response_update_tracker<F: Clone, T: types::Capturable>(
|
||||
let payment_intent_update = match &router_data.response {
|
||||
Err(err) => storage::PaymentIntentUpdate::PGStatusUpdate {
|
||||
status: match err.status_code {
|
||||
400..=499 => enums::IntentStatus::Failed,
|
||||
_ => enums::IntentStatus::Processing,
|
||||
500..=511 => enums::IntentStatus::Processing,
|
||||
_ => enums::IntentStatus::Failed,
|
||||
},
|
||||
},
|
||||
Ok(_) => storage::PaymentIntentUpdate::ResponseUpdate {
|
||||
|
||||
Reference in New Issue
Block a user