mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
refactor(refunds): add success RefundStatus in should_call_refund check (#2081)
This commit is contained in:
@ -939,7 +939,7 @@ impl From<ErrorDetails> for utils::ErrorCodeAndMessage {
|
||||
fn from(error: ErrorDetails) -> Self {
|
||||
Self {
|
||||
error_code: error.code.to_string(),
|
||||
error_message: error.error_name.unwrap_or(error.code.to_string()),
|
||||
error_message: error.error_name.unwrap_or(error.code),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -356,6 +356,7 @@ fn should_call_refund(refund: &diesel_models::refund::Refund, force_sync: bool)
|
||||
|| !matches!(
|
||||
refund.refund_status,
|
||||
diesel_models::enums::RefundStatus::Failure
|
||||
| diesel_models::enums::RefundStatus::Success
|
||||
);
|
||||
|
||||
predicate1 && predicate2
|
||||
|
||||
Reference in New Issue
Block a user