mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 17:47:54 +08:00
refactor(connectors): [Checkout] PII data masking (#3775)
This commit is contained in:
@ -188,7 +188,7 @@ pub struct CardSource {
|
|||||||
pub struct WalletSource {
|
pub struct WalletSource {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub source_type: CheckoutSourceTypes,
|
pub source_type: CheckoutSourceTypes,
|
||||||
pub token: String,
|
pub token: Secret<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize)]
|
#[derive(Debug, Serialize)]
|
||||||
@ -301,7 +301,7 @@ impl TryFrom<&CheckoutRouterData<&types::PaymentsAuthorizeRouterData>> for Payme
|
|||||||
Ok(PaymentSource::Wallets(WalletSource {
|
Ok(PaymentSource::Wallets(WalletSource {
|
||||||
source_type: CheckoutSourceTypes::Token,
|
source_type: CheckoutSourceTypes::Token,
|
||||||
token: match item.router_data.get_payment_method_token()? {
|
token: match item.router_data.get_payment_method_token()? {
|
||||||
types::PaymentMethodToken::Token(token) => token,
|
types::PaymentMethodToken::Token(token) => token.into(),
|
||||||
types::PaymentMethodToken::ApplePayDecrypt(_) => {
|
types::PaymentMethodToken::ApplePayDecrypt(_) => {
|
||||||
Err(errors::ConnectorError::InvalidWalletToken)?
|
Err(errors::ConnectorError::InvalidWalletToken)?
|
||||||
}
|
}
|
||||||
@ -314,7 +314,7 @@ impl TryFrom<&CheckoutRouterData<&types::PaymentsAuthorizeRouterData>> for Payme
|
|||||||
types::PaymentMethodToken::Token(apple_pay_payment_token) => {
|
types::PaymentMethodToken::Token(apple_pay_payment_token) => {
|
||||||
Ok(PaymentSource::Wallets(WalletSource {
|
Ok(PaymentSource::Wallets(WalletSource {
|
||||||
source_type: CheckoutSourceTypes::Token,
|
source_type: CheckoutSourceTypes::Token,
|
||||||
token: apple_pay_payment_token,
|
token: apple_pay_payment_token.into(),
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
types::PaymentMethodToken::ApplePayDecrypt(decrypt_data) => {
|
types::PaymentMethodToken::ApplePayDecrypt(decrypt_data) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user