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
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
fix(ucs): allow shadow event publishing (#13611)
gopikrishna000b68f937887b7
diff --git a/crates/router/src/core/unified_connector_service.rs b/crates/router/src/core/unified_connector_service.rsindex c248721014..9cd0d71e8c 100644--- a/crates/router/src/core/unified_connector_service.rs+++ b/crates/router/src/core/unified_connector_service.rs@@ -3029,23 +3029,21 @@ where}};- if let ExecutionMode::Primary = execution_mode {- emit_ucs_connector_event(- state,- std::any::type_name::<T>(),- connector_name,- payment_id,- merchant_id,- refund_id,- dispute_id,- payout_id,- grpc_request_body,- status_code,- response_body,- external_latency,- execution_mode,- );- }+ emit_ucs_connector_event(+ state,+ std::any::type_name::<T>(),+ connector_name,+ payment_id,+ merchant_id,+ refund_id,+ dispute_id,+ payout_id,+ grpc_request_body,+ status_code,+ response_body,+ external_latency,+ execution_mode,+ );// Set external latency on router datarouter_result.map(|mut router_data| {@@ -3190,23 +3188,21 @@ where}};- if let ExecutionMode::Primary = execution_mode {- emit_ucs_connector_event(- state,- std::any::type_name::<T>(),- connector_name,- payment_id,- merchant_id,- refund_id,- dispute_id,- payout_id,- grpc_request_body,- status_code,- response_body,- external_latency,- execution_mode,- );- }+ emit_ucs_connector_event(+ state,+ std::any::type_name::<T>(),+ connector_name,+ payment_id,+ merchant_id,+ refund_id,+ dispute_id,+ payout_id,+ grpc_request_body,+ status_code,+ response_body,+ external_latency,+ execution_mode,+ );// Set external latency on router datarouter_result.map(|mut router_data| {diff --git a/crates/router/src/routes/app.rs b/crates/router/src/routes/app.rsindex 9faa7f464c..126375a026 100644--- a/crates/router/src/routes/app.rs+++ b/crates/router/src/routes/app.rs@@ -203,23 +203,12 @@ impl SessionState {ExecutionMode::Shadow => Some("shadow"),ExecutionMode::NotApplicable => None,};- let config_override = match unified_connector_service_execution_mode {- ExecutionMode::Shadow => Some(- serde_json::json!({- "events": {- "enabled": false- }- })- .to_string(),- ),- _ => None,- };GrpcHeadersUcs::builder().tenant_id(tenant_id).request_id(request_id).shadow_mode(shadow_mode).proxy_name(proxy_name)- .config_override(config_override)+ .config_override(None)}#[cfg(all(feature = "revenue_recovery", feature = "v2"))]pub fn get_recovery_grpc_headers(&self) -> GrpcRecoveryHeaders {