Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
fix(payment_methods): revert the filter for getting the mcas which are disabled (#4756)
Amisha Prabhat9fb2a8301453
diff --git a/crates/diesel_models/src/query/merchant_connector_account.rs b/crates/diesel_models/src/query/merchant_connector_account.rsindex cc73bd7a53..bd24d12ec2 100644--- a/crates/diesel_models/src/query/merchant_connector_account.rs+++ b/crates/diesel_models/src/query/merchant_connector_account.rs@@ -124,9 +124,7 @@ impl MerchantConnectorAccount {if get_disabled {generics::generic_filter::<<Self as HasTable>::Table, _, _, _>(conn,- dsl::merchant_id- .eq(merchant_id.to_owned())- .and(dsl::disabled.eq(true)),+ dsl::merchant_id.eq(merchant_id.to_owned()),None,None,Some(dsl::created_at.asc()),diff --git a/crates/router/src/core/payment_methods/cards.rs b/crates/router/src/core/payment_methods/cards.rsindex 5a12334c38..9fe8d899ea 100644--- a/crates/router/src/core/payment_methods/cards.rs+++ b/crates/router/src/core/payment_methods/cards.rs@@ -3700,7 +3700,12 @@ pub async fn get_mca_status(.change_context(errors::ApiErrorResponse::MerchantConnectorAccountNotFound {id: merchant_id.to_string(),})?;+let mut mca_ids = HashSet::new();+ let mcas = mcas+ .into_iter()+ .filter(|mca| mca.disabled == Some(true))+ .collect::<Vec<_>>();for mca in mcas {mca_ids.insert(mca.merchant_connector_id);