Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix: remove straight through routing from routing approach (#8695)

Sarthak Soni53e7e7fa8191
diff --git a/crates/common_enums/src/enums.rs b/crates/common_enums/src/enums.rs
index 687e42728f..9f45c679ed 100644
--- a/crates/common_enums/src/enums.rs
+++ b/crates/common_enums/src/enums.rs
@@ -8566,7 +8566,6 @@ impl RoutingApproach {
"SR_SELECTION_V3_ROUTING" => Self::SuccessRateExploitation,
"SR_V3_HEDGING" => Self::SuccessRateExploration,
"NTW_BASED_ROUTING" => Self::DebitRouting,
- "DEFAULT" => Self::StraightThroughRouting,
_ => Self::DefaultFallback,
}
}
diff --git a/crates/router/src/core/payments.rs b/crates/router/src/core/payments.rs
index a8f718e239..3eb1d335a1 100644
--- a/crates/router/src/core/payments.rs
+++ b/crates/router/src/core/payments.rs
@@ -8029,10 +8029,6 @@ where
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable("Failed execution of straight through routing")?;
- payment_data.set_routing_approach_in_attempt(Some(
- common_enums::RoutingApproach::StraightThroughRouting,
- ));
-
if check_eligibility {
let transaction_data = core_routing::PaymentsDslInput::new(
payment_data.get_setup_mandate(),
diff --git a/crates/router/src/core/payments/routing.rs b/crates/router/src/core/payments/routing.rs
index 547f49ce55..8207f71c1a 100644
--- a/crates/router/src/core/payments/routing.rs
+++ b/crates/router/src/core/payments/routing.rs
@@ -522,10 +522,7 @@ pub async fn perform_static_routing_v1(
};
let (routable_connectors, routing_approach) = match cached_algorithm.as_ref() {
- CachedAlgorithm::Single(conn) => (
- vec![(**conn).clone()],
- Some(common_enums::RoutingApproach::StraightThroughRouting),
- ),
+ CachedAlgorithm::Single(conn) => (vec![(**conn).clone()], None),
CachedAlgorithm::Priority(plist) => (plist.clone(), None),
CachedAlgorithm::VolumeSplit(splits) => (
perform_volume_split(splits.to_vec())
@@ -1393,10 +1390,7 @@ async fn perform_session_routing_for_pm_type(
.await?;
match cached_algorithm.as_ref() {
- CachedAlgorithm::Single(conn) => (
- vec![(**conn).clone()],
- Some(common_enums::RoutingApproach::StraightThroughRouting),
- ),
+ CachedAlgorithm::Single(conn) => (vec![(**conn).clone()], None),
CachedAlgorithm::Priority(plist) => (plist.clone(), None),
CachedAlgorithm::VolumeSplit(splits) => (
perform_volume_split(splits.to_vec())