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(core): added debug logs for authentication sync And superposition config resolution (#13733)
Sahkal Poddarf1b51a2c98e4
diff --git a/crates/external_services/src/superposition.rs b/crates/external_services/src/superposition.rsindex 1b59f4f5e3..1db1bbb150 100644--- a/crates/external_services/src/superposition.rs+++ b/crates/external_services/src/superposition.rs@@ -1122,6 +1122,7 @@ pub trait Config {) -> impl std::future::Future<Output = CustomResult<Self::Output, SuperpositionError>> + Sendwhereopen_feature::Client: GetValue<Self::Output>,+ Self::Output: std::fmt::Debug,{let targeting_key_str = targeting_key.map(|id| id.targeting_key_value().to_owned());async move {@@ -1171,9 +1172,10 @@ pub trait Config {match result {Ok(value) => {router_env::logger::info!(- "Superposition config hit: key='{}', type='{}'",+ "Superposition config hit: key='{}', type='{}', value='{:?}'",resolved_key,- std::any::type_name::<Self::Output>()+ std::any::type_name::<Self::Output>(),+ value);config_metrics::CONFIG_SUPERPOSITION_FETCH.add(1,diff --git a/crates/router/src/core/configs.rs b/crates/router/src/core/configs.rsindex 4a8fde620e..e612cb5f89 100644--- a/crates/router/src/core/configs.rs+++ b/crates/router/src/core/configs.rs@@ -151,6 +151,7 @@ pub async fn fetch_db_config_for_dimensions<C>(whereC: DatabaseBackedConfig,C::Output: ConfigType,+ C::Output: std::fmt::Debug,open_feature::Client: superposition::GetValue<C::Output>,{let db_keys = <C as DatabaseBackedConfig>::db_keys(dimensions);@@ -205,6 +206,7 @@ pub async fn fetch_db_config<C>(whereC: DatabaseBackedConfig,C::Output: ConfigType,+ C::Output: std::fmt::Debug,open_feature::Client: superposition::GetValue<C::Output>,{let config_type = C::KEY;diff --git a/crates/router/src/core/payments/operations/payment_confirm.rs b/crates/router/src/core/payments/operations/payment_confirm.rsindex 0333c62a77..ab0f2a1004 100644--- a/crates/router/src/core/payments/operations/payment_confirm.rs+++ b/crates/router/src/core/payments/operations/payment_confirm.rs@@ -2276,7 +2276,7 @@ impl<F: Clone + Send + Sync> Domain<F, api::PaymentsRequest, PaymentData<F>> for.change_context(errors::ApiErrorResponse::InternalServerError).attach_printable("Failed to call authentication sync flow")?} else {- crate::core::unified_authentication_service::authentication_sync_core(+ let resp = crate::core::unified_authentication_service::authentication_sync_core(state.clone(),platform.clone(),services::api::AuthFlow::Merchant,@@ -2285,13 +2285,15 @@ impl<F: Clone + Send + Sync> Domain<F, api::PaymentsRequest, PaymentData<F>> for.await?.get_json_body().change_context(errors::ApiErrorResponse::InternalServerError)- .attach_printable("Failed to get json body from authentication sync response")?- }- } else {- return Err(errors::ApiErrorResponse::InternalServerError).attach_printable("Pull mechanism disabled or terminal status during post-authentication sync")?;- };+ .attach_printable("Failed to get json body from authentication sync response")?;+ router_env::logger::info!("Authentication Microservice Sync Response is : {:#?}", resp);+ resp+ }+ } else {+ return Err(errors::ApiErrorResponse::InternalServerError).attach_printable("Pull mechanism disabled or terminal status during post-authentication sync")?;+ };- let updated_authentication_status = sync_response.status;+ let updated_authentication_status = sync_response.status;let authentication_domain_model = authentication::transformers::construct_authentication_domain_model((