Skip to content

Commit

Permalink
fix(payment_methods): update payment method status only if existing s…
Browse files Browse the repository at this point in the history
…tatus is not active (#4149)
  • Loading branch information
Chethan-rao authored Mar 20, 2024
1 parent 9b9bce8 commit 0e9b252
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0e9b252

Please sign in to comment.