mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
fix(payment_methods): update payment method status only if existing status is not active (#4149)
This commit is contained in:
@ -936,7 +936,9 @@ async fn update_payment_method_status<F: Clone>(
|
||||
.await
|
||||
.to_not_found_response(errors::ApiErrorResponse::PaymentMethodNotFound)?;
|
||||
|
||||
if pm.status != attempt_status.into() {
|
||||
if pm.status != common_enums::PaymentMethodStatus::Active
|
||||
&& pm.status != attempt_status.into()
|
||||
{
|
||||
let updated_pm_status = common_enums::PaymentMethodStatus::from(attempt_status);
|
||||
|
||||
payment_data
|
||||
|
||||
Reference in New Issue
Block a user