mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 18:17:13 +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 |             .await | ||||||
|             .to_not_found_response(errors::ApiErrorResponse::PaymentMethodNotFound)?; |             .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); |             let updated_pm_status = common_enums::PaymentMethodStatus::from(attempt_status); | ||||||
|  |  | ||||||
|             payment_data |             payment_data | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Chethan Rao
					Chethan Rao