@@ -98,7 +98,7 @@ pub async fn create_routing_config(
98
98
merchant_account : domain:: MerchantAccount ,
99
99
key_store : domain:: MerchantKeyStore ,
100
100
request : routing_types:: RoutingConfigRequest ,
101
- # [ cfg ( feature = "business_profile_routing" ) ] transaction_type : & enums:: TransactionType ,
101
+ transaction_type : & enums:: TransactionType ,
102
102
) -> RouterResponse < routing_types:: RoutingDictionaryRecord > {
103
103
metrics:: ROUTING_CREATE_REQUEST_RECEIVED . add ( & metrics:: CONTEXT , 1 , & [ ] ) ;
104
104
let db = state. store . as_ref ( ) ;
@@ -217,6 +217,7 @@ pub async fn create_routing_config(
217
217
description : description. clone ( ) ,
218
218
created_at : timestamp,
219
219
modified_at : timestamp,
220
+ algorithm_for : Some ( * transaction_type) ,
220
221
} ;
221
222
merchant_dictionary. records . push ( new_record. clone ( ) ) ;
222
223
@@ -441,7 +442,9 @@ pub async fn retrieve_routing_config(
441
442
algorithm,
442
443
created_at : record. created_at ,
443
444
modified_at : record. modified_at ,
444
- algorithm_for : record. algorithm_for ,
445
+ algorithm_for : record
446
+ . algorithm_for
447
+ . unwrap_or ( enums:: TransactionType :: Payment ) ,
445
448
} ;
446
449
447
450
metrics:: ROUTING_RETRIEVE_CONFIG_SUCCESS_RESPONSE . add ( & metrics:: CONTEXT , 1 , & [ ] ) ;
@@ -799,7 +802,9 @@ pub async fn retrieve_linked_routing_config(
799
802
algorithm : the_algorithm,
800
803
created_at : record. created_at ,
801
804
modified_at : record. modified_at ,
802
- algorithm_for : record. algorithm_for ,
805
+ algorithm_for : record
806
+ . algorithm_for
807
+ . unwrap_or ( enums:: TransactionType :: Payment ) ,
803
808
} )
804
809
} else {
805
810
None
0 commit comments