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
refactor(connector): [Klarna] Mask PII data (#3854)
AkshayaFoiger384f32ba2d8f
diff --git a/crates/router/src/connector/klarna/transformers.rs b/crates/router/src/connector/klarna/transformers.rsindex c12f8ed1b1..29dccfbf32 100644--- a/crates/router/src/connector/klarna/transformers.rs+++ b/crates/router/src/connector/klarna/transformers.rs@@ -1,6 +1,6 @@use api_models::payments;use error_stack::report;-use masking::Secret;+use masking::{ExposeInterface, Secret};use serde::{Deserialize, Serialize};use crate::{@@ -66,8 +66,8 @@ pub struct KlarnaSessionRequest {#[derive(Deserialize, Serialize, Debug)]pub struct KlarnaSessionResponse {- pub client_token: String,- pub session_id: String,+ pub client_token: Secret<String>,+ pub session_id: Secret<String>,}impl TryFrom<&types::PaymentsSessionRouterData> for KlarnaSessionRequest {@@ -110,8 +110,8 @@ impl TryFrom<types::PaymentsSessionResponseRouterData<KlarnaSessionResponse>>response: Ok(types::PaymentsResponseData::SessionResponse {session_token: types::api::SessionToken::Klarna(Box::new(payments::KlarnaSessionTokenResponse {- session_token: response.client_token.clone(),- session_id: response.session_id.clone(),+ session_token: response.client_token.clone().expose(),+ session_id: response.session_id.clone().expose(),},)),}),