Skip to content

Commit

Permalink
refactor: resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sakilmostak committed Apr 30, 2024
1 parent 016ec72 commit cb64646
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
5 changes: 1 addition & 4 deletions crates/router/src/connector/paypal/transformers.rs
Expand Up @@ -23,9 +23,6 @@ use crate::{
},
};

#[cfg(feature = "payouts")]
const LANGUAGE: &str = "en-US";

#[derive(Debug, Serialize)]
pub struct PaypalRouterData<T> {
pub amount: String,
Expand Down Expand Up @@ -1616,7 +1613,7 @@ impl TryFrom<&PaypalRouterData<&types::PayoutsRouterData<api::PoFulfill>>> for P
amount,
payout_method_data,
note: item.router_data.description.to_owned(),
notification_language: LANGUAGE.to_string(),
notification_language: consts::DEFAULT_NOTIFICATION_SCRIPT_LANGUAGE.to_string(),
})
}
}
Expand Down
1 change: 1 addition & 0 deletions crates/router/src/consts.rs
Expand Up @@ -38,6 +38,7 @@ pub(crate) const LOW_BALANCE_ERROR_MESSAGE: &str = "Insufficient balance in the
pub(crate) const CONNECTOR_UNAUTHORIZED_ERROR: &str = "Authentication Error from the connector";
pub(crate) const CANNOT_CONTINUE_AUTH: &str =
"Cannot continue with Authorization due to failed Liability Shift.";
pub(crate) const DEFAULT_NOTIFICATION_SCRIPT_LANGUAGE: &str = "en-US";

// General purpose base64 engines
pub(crate) const BASE64_ENGINE: base64::engine::GeneralPurpose =
Expand Down
8 changes: 4 additions & 4 deletions crates/router/src/core/payment_methods/vault.rs
Expand Up @@ -421,7 +421,7 @@ impl Vaultable for api::CardPayout {
pub struct TokenizedWalletSensitiveValues {
pub email: Option<Email>,
pub telephone_number: Option<masking::Secret<String>>,
pub paypal_id: Option<masking::Secret<String>>,
pub wallet_id: Option<masking::Secret<String>>,
pub wallet_type: PaymentMethodType,
}

Expand All @@ -437,13 +437,13 @@ impl Vaultable for api::WalletPayout {
Self::Paypal(paypal_data) => TokenizedWalletSensitiveValues {
email: paypal_data.email.clone(),
telephone_number: paypal_data.telephone_number.clone(),
paypal_id: paypal_data.paypal_id.clone(),
wallet_id: paypal_data.paypal_id.clone(),
wallet_type: PaymentMethodType::Paypal,
},
Self::Venmo(venmo_data) => TokenizedWalletSensitiveValues {
email: None,
telephone_number: venmo_data.telephone_number.clone(),
paypal_id: None,
wallet_id: None,
wallet_type: PaymentMethodType::Venmo,
},
};
Expand Down Expand Up @@ -481,7 +481,7 @@ impl Vaultable for api::WalletPayout {
PaymentMethodType::Paypal => Self::Paypal(api_models::payouts::Paypal {
email: value1.email,
telephone_number: value1.telephone_number,
paypal_id: value1.paypal_id,
paypal_id: value1.wallet_id,
}),
PaymentMethodType::Venmo => Self::Venmo(api_models::payouts::Venmo {
telephone_number: value1.telephone_number,
Expand Down

0 comments on commit cb64646

Please sign in to comment.