mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
refactor(dynamic_routing): add logic for creating merchant account in decision engine (#8191)
Co-authored-by: Shankar Singh C <shankar.singh@juspay.in> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -578,6 +578,7 @@ pub async fn link_routing_config(
|
||||
business_profile.get_id(),
|
||||
routing_algorithm.algorithm_data.clone(),
|
||||
routing_types::DynamicRoutingType::SuccessRateBasedRouting,
|
||||
&mut dynamic_routing_ref,
|
||||
)
|
||||
.await
|
||||
.change_context(errors::ApiErrorResponse::InternalServerError)
|
||||
@ -608,6 +609,7 @@ pub async fn link_routing_config(
|
||||
business_profile.get_id(),
|
||||
routing_algorithm.algorithm_data.clone(),
|
||||
routing_types::DynamicRoutingType::EliminationRouting,
|
||||
&mut dynamic_routing_ref,
|
||||
)
|
||||
.await
|
||||
.change_context(errors::ApiErrorResponse::InternalServerError)
|
||||
@ -1929,6 +1931,9 @@ pub async fn contract_based_dynamic_routing_setup(
|
||||
elimination_routing_algorithm: None,
|
||||
dynamic_routing_volume_split: None,
|
||||
contract_based_routing: Some(contract_algo),
|
||||
is_merchant_created_in_decision_engine: dynamic_routing_algo_ref
|
||||
.as_ref()
|
||||
.is_some_and(|algo| algo.is_merchant_created_in_decision_engine),
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user