refactor(connector): [Trustpay][Volt] Mask PII data (#3932)

This commit is contained in:
AkshayaFoiger
2024-03-11 14:42:56 +05:30
committed by GitHub
parent 7391416e24
commit a179b9c90c
2 changed files with 8 additions and 8 deletions

View File

@ -6,7 +6,7 @@ use common_utils::{
pii::{self, Email},
};
use error_stack::{report, ResultExt};
use masking::{PeekInterface, Secret};
use masking::{ExposeInterface, PeekInterface, Secret};
use reqwest::Url;
use serde::{Deserialize, Serialize};
@ -1073,8 +1073,8 @@ pub struct GooglePayTransactionInfo {
#[derive(Clone, Default, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct GooglePayMerchantInfo {
pub merchant_name: String,
pub merchant_id: String,
pub merchant_name: Secret<String>,
pub merchant_id: Secret<String>,
}
#[derive(Clone, Default, Debug, Deserialize, Serialize)]
@ -1090,7 +1090,7 @@ pub struct GooglePayAllowedPaymentMethods {
#[serde(rename_all = "camelCase")]
pub struct GpayTokenParameters {
pub gateway: String,
pub gateway_merchant_id: String,
pub gateway_merchant_id: Secret<String>,
}
#[derive(Clone, Default, Debug, Deserialize, Serialize)]
@ -1295,8 +1295,8 @@ impl From<GooglePayTransactionInfo> for api_models::payments::GpayTransactionInf
impl From<GooglePayMerchantInfo> for api_models::payments::GpayMerchantInfo {
fn from(value: GooglePayMerchantInfo) -> Self {
Self {
merchant_id: Some(value.merchant_id),
merchant_name: value.merchant_name,
merchant_id: Some(value.merchant_id.expose()),
merchant_name: value.merchant_name.expose(),
}
}
}
@ -1333,7 +1333,7 @@ impl From<GpayTokenParameters> for api_models::payments::GpayTokenParameters {
fn from(value: GpayTokenParameters) -> Self {
Self {
gateway: value.gateway,
gateway_merchant_id: Some(value.gateway_merchant_id),
gateway_merchant_id: Some(value.gateway_merchant_id.expose()),
stripe_version: None,
stripe_publishable_key: None,
}

View File

@ -190,7 +190,7 @@ pub struct VoltAuthUpdateResponse {
pub access_token: Secret<String>,
pub token_type: String,
pub expires_in: i64,
pub refresh_token: String,
pub refresh_token: Secret<String>,
}
impl<F, T> TryFrom<types::ResponseRouterData<F, VoltAuthUpdateResponse, T, types::AccessToken>>