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

refactor(connector): [Mollie] Mask PII data (#3856)

AkshayaFoigerffbe042fdccd
diff --git a/crates/router/src/connector/mollie/transformers.rs b/crates/router/src/connector/mollie/transformers.rs
index af1159cd2c..be4691341b 100644
--- a/crates/router/src/connector/mollie/transformers.rs
+++ b/crates/router/src/connector/mollie/transformers.rs
@@ -64,7 +64,7 @@ pub struct MolliePaymentsRequest {
payment_method_data: PaymentMethodData,
metadata: Option<MollieMetadata>,
sequence_type: SequenceType,
- mandate_id: Option<String>,
+ mandate_id: Option<Secret<String>>,
}
#[derive(Default, Debug, Serialize, Deserialize)]
@@ -92,7 +92,7 @@ pub enum PaymentMethodData {
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ApplePayMethodData {
- apple_pay_payment_token: String,
+ apple_pay_payment_token: Secret<String>,
}
#[derive(Debug, Serialize)]
@@ -333,7 +333,7 @@ fn get_payment_method_for_wallet(
}
api_models::payments::WalletData::ApplePay(applepay_wallet_data) => {
Ok(PaymentMethodData::Applepay(Box::new(ApplePayMethodData {
- apple_pay_payment_token: applepay_wallet_data.payment_data.to_owned(),
+ apple_pay_payment_token: Secret::new(applepay_wallet_data.payment_data.to_owned()),
})))
}
_ => Err(errors::ConnectorError::NotImplemented(
@@ -451,16 +451,16 @@ pub struct Links {
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct CardDetails {
- pub card_number: String,
- pub card_holder: String,
- pub card_expiry_date: String,
- pub card_cvv: String,
+ pub card_number: Secret<String>,
+ pub card_holder: Secret<String>,
+ pub card_expiry_date: Secret<String>,
+ pub card_cvv: Secret<String>,
}
#[derive(Debug, Serialize, Eq, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct BankDetails {
- billing_email: String,
+ billing_email: Email,
}
pub struct MollieAuthType {