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: use updated session state for refund ucs shadow mode using mitm proxy (#10061)

gopikrishna0005ff88d77457a
diff --git a/crates/router/src/core/refunds.rs b/crates/router/src/core/refunds.rs
index 2bf04ee35a..51f9d4cbec 100644
--- a/crates/router/src/core/refunds.rs
+++ b/crates/router/src/core/refunds.rs
@@ -229,7 +229,7 @@ pub async fn trigger_refund_to_gateway(
// Access token available or not needed - proceed with execution
// Check which gateway system to use for refunds
- let (execution_path, _session_state) =
+ let (execution_path, updated_state) =
unified_connector_service::should_call_unified_connector_service(
state,
merchant_context,
@@ -274,7 +274,7 @@ pub async fn trigger_refund_to_gateway(
}
common_enums::ExecutionPath::ShadowUnifiedConnectorService => {
Box::pin(execute_refund_execute_via_direct_with_ucs_shadow(
- state,
+ &updated_state,
&connector,
merchant_context,
refund,
@@ -832,7 +832,7 @@ pub async fn sync_refund_with_gateway(
// Access token available or not needed - proceed with execution
// Check which gateway system to use for refund sync
- let (execution_path, _session_state) =
+ let (execution_path, updated_state) =
unified_connector_service::should_call_unified_connector_service(
state,
merchant_context,
@@ -875,7 +875,7 @@ pub async fn sync_refund_with_gateway(
}
common_enums::ExecutionPath::ShadowUnifiedConnectorService => {
Box::pin(execute_refund_sync_via_direct_with_ucs_shadow(
- state,
+ &updated_state,
&connector,
merchant_context,
router_data,