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(routing): preserve routed_through in Apple Pay web-domain auto-retry flow (#12489)

Prajjwal Kumar07ab0c4c9211
diff --git a/crates/router/src/core/payments/routing.rs b/crates/router/src/core/payments/routing.rs
index 0a6fb879d2..5a90b08dd0 100644
--- a/crates/router/src/core/payments/routing.rs
+++ b/crates/router/src/core/payments/routing.rs
@@ -1257,6 +1257,11 @@ where
.first()
.ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)?;
+ routing_data.routed_through =
+ Some(first_connector.connector_data.connector_name.to_string());
+ routing_data.merchant_connector_id =
+ first_connector.connector_data.merchant_connector_id.clone();
+
#[cfg(feature = "retry")]
{
let should_do_retry = crate::core::payments::retry::config_should_call_gsm(
@@ -1297,17 +1302,6 @@ where
}
if connector_call_type.is_none() {
- routing_data.routed_through = Some(
- first_connector
- .connector_data
- .connector_name
- .to_string()
- .clone(),
- );
-
- routing_data.merchant_connector_id =
- first_connector.connector_data.merchant_connector_id.clone();
-
crate::core::payments::helpers::override_setup_future_usage_to_on_session(
&*state.store,
payment_data,