refactor(payment_methods): List the Payment Methods for Merchant , based on the connector type (#4909)

Co-authored-by: Narayan Bhat <48803246+Narayanbhat166@users.noreply.github.com>
This commit is contained in:
Amisha Prabhat
2024-08-02 18:33:41 +05:30
committed by GitHub
parent 37e34e3bfd
commit f3677f268c
73 changed files with 2712 additions and 8691 deletions

View File

@ -123,7 +123,10 @@ pub fn filter_mca_based_on_business_profile(
if let Some(profile_id) = profile_id {
merchant_connector_accounts
.into_iter()
.filter(|mca| mca.profile_id.as_ref() == Some(&profile_id))
.filter(|mca| {
mca.profile_id.as_ref() == Some(&profile_id)
&& mca.connector_type == ConnectorType::PaymentProcessor
})
.collect::<Vec<_>>()
} else {
merchant_connector_accounts