mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 01:57:45 +08:00 
			
		
		
		
	refactor(pm_list): get profile_id from business_details in list pm (#2131)
This commit is contained in:
		| @ -91,12 +91,12 @@ pub fn create_identity_from_certificate_and_key( | ||||
|  | ||||
| pub fn filter_mca_based_on_business_profile( | ||||
|     merchant_connector_accounts: Vec<domain::MerchantConnectorAccount>, | ||||
|     payment_intent: Option<&PaymentIntent>, | ||||
|     profile_id: Option<String>, | ||||
| ) -> Vec<domain::MerchantConnectorAccount> { | ||||
|     if let Some(payment_intent) = payment_intent { | ||||
|     if let Some(profile_id) = profile_id { | ||||
|         merchant_connector_accounts | ||||
|             .into_iter() | ||||
|             .filter(|mca| mca.profile_id == payment_intent.profile_id) | ||||
|             .filter(|mca| mca.profile_id.as_ref() == Some(&profile_id)) | ||||
|             .collect::<Vec<_>>() | ||||
|     } else { | ||||
|         merchant_connector_accounts | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Narayan Bhat
					Narayan Bhat