mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
feat: add routing support for v2 sdk session flow (#6763)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -188,15 +188,20 @@ pub async fn create_routing_algorithm_under_profile(
|
||||
)
|
||||
.await?
|
||||
.get_required_value("Profile")?;
|
||||
|
||||
let merchant_id = merchant_account.get_id();
|
||||
core_utils::validate_profile_id_from_auth_layer(authentication_profile_id, &business_profile)?;
|
||||
|
||||
let all_mcas = helpers::MerchantConnectorAccounts::get_all_mcas(
|
||||
merchant_account.get_id(),
|
||||
&key_store,
|
||||
&state,
|
||||
)
|
||||
.await?;
|
||||
let all_mcas = state
|
||||
.store
|
||||
.find_merchant_connector_account_by_merchant_id_and_disabled_list(
|
||||
key_manager_state,
|
||||
merchant_id,
|
||||
true,
|
||||
&key_store,
|
||||
)
|
||||
.await
|
||||
.change_context(errors::ApiErrorResponse::MerchantConnectorAccountNotFound {
|
||||
id: merchant_id.get_string_repr().to_owned(),
|
||||
})?;
|
||||
|
||||
let name_mca_id_set = helpers::ConnectNameAndMCAIdForProfile(
|
||||
all_mcas.filter_by_profile(business_profile.get_id(), |mca| {
|
||||
|
||||
Reference in New Issue
Block a user