mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
refactor(connector): [Trustpay][Volt] Mask PII data (#3932)
This commit is contained in:
@ -6,7 +6,7 @@ use common_utils::{
|
|||||||
pii::{self, Email},
|
pii::{self, Email},
|
||||||
};
|
};
|
||||||
use error_stack::{report, ResultExt};
|
use error_stack::{report, ResultExt};
|
||||||
use masking::{PeekInterface, Secret};
|
use masking::{ExposeInterface, PeekInterface, Secret};
|
||||||
use reqwest::Url;
|
use reqwest::Url;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
@ -1073,8 +1073,8 @@ pub struct GooglePayTransactionInfo {
|
|||||||
#[derive(Clone, Default, Debug, Deserialize, Serialize)]
|
#[derive(Clone, Default, Debug, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct GooglePayMerchantInfo {
|
pub struct GooglePayMerchantInfo {
|
||||||
pub merchant_name: String,
|
pub merchant_name: Secret<String>,
|
||||||
pub merchant_id: String,
|
pub merchant_id: Secret<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Default, Debug, Deserialize, Serialize)]
|
#[derive(Clone, Default, Debug, Deserialize, Serialize)]
|
||||||
@ -1090,7 +1090,7 @@ pub struct GooglePayAllowedPaymentMethods {
|
|||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct GpayTokenParameters {
|
pub struct GpayTokenParameters {
|
||||||
pub gateway: String,
|
pub gateway: String,
|
||||||
pub gateway_merchant_id: String,
|
pub gateway_merchant_id: Secret<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Default, Debug, Deserialize, Serialize)]
|
#[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 {
|
impl From<GooglePayMerchantInfo> for api_models::payments::GpayMerchantInfo {
|
||||||
fn from(value: GooglePayMerchantInfo) -> Self {
|
fn from(value: GooglePayMerchantInfo) -> Self {
|
||||||
Self {
|
Self {
|
||||||
merchant_id: Some(value.merchant_id),
|
merchant_id: Some(value.merchant_id.expose()),
|
||||||
merchant_name: value.merchant_name,
|
merchant_name: value.merchant_name.expose(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1333,7 +1333,7 @@ impl From<GpayTokenParameters> for api_models::payments::GpayTokenParameters {
|
|||||||
fn from(value: GpayTokenParameters) -> Self {
|
fn from(value: GpayTokenParameters) -> Self {
|
||||||
Self {
|
Self {
|
||||||
gateway: value.gateway,
|
gateway: value.gateway,
|
||||||
gateway_merchant_id: Some(value.gateway_merchant_id),
|
gateway_merchant_id: Some(value.gateway_merchant_id.expose()),
|
||||||
stripe_version: None,
|
stripe_version: None,
|
||||||
stripe_publishable_key: None,
|
stripe_publishable_key: None,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -190,7 +190,7 @@ pub struct VoltAuthUpdateResponse {
|
|||||||
pub access_token: Secret<String>,
|
pub access_token: Secret<String>,
|
||||||
pub token_type: String,
|
pub token_type: String,
|
||||||
pub expires_in: i64,
|
pub expires_in: i64,
|
||||||
pub refresh_token: String,
|
pub refresh_token: Secret<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<F, T> TryFrom<types::ResponseRouterData<F, VoltAuthUpdateResponse, T, types::AccessToken>>
|
impl<F, T> TryFrom<types::ResponseRouterData<F, VoltAuthUpdateResponse, T, types::AccessToken>>
|
||||||
|
|||||||
Reference in New Issue
Block a user