mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 19:42:27 +08:00
feat: encrypt PII fields before saving it in the database (#1043)
Co-authored-by: Nishant Joshi <nishant.joshi@juspay.in>
This commit is contained in:
@ -14,7 +14,7 @@ use crate::{
|
||||
types::{
|
||||
self,
|
||||
api::{self, PaymentMethodCreateExt},
|
||||
storage,
|
||||
domain,
|
||||
},
|
||||
utils::OptionExt,
|
||||
};
|
||||
@ -23,8 +23,8 @@ pub async fn save_payment_method<F: Clone, FData>(
|
||||
state: &AppState,
|
||||
connector: &api::ConnectorData,
|
||||
resp: types::RouterData<F, FData, types::PaymentsResponseData>,
|
||||
maybe_customer: &Option<storage::Customer>,
|
||||
merchant_account: &storage::MerchantAccount,
|
||||
maybe_customer: &Option<domain::Customer>,
|
||||
merchant_account: &domain::MerchantAccount,
|
||||
) -> RouterResult<Option<String>>
|
||||
where
|
||||
FData: mandate::MandateBehaviour,
|
||||
@ -128,7 +128,7 @@ where
|
||||
|
||||
pub async fn save_in_locker(
|
||||
state: &AppState,
|
||||
merchant_account: &storage::MerchantAccount,
|
||||
merchant_account: &domain::MerchantAccount,
|
||||
payment_method_request: api::PaymentMethodCreate,
|
||||
) -> RouterResult<(api_models::payment_methods::PaymentMethodResponse, bool)> {
|
||||
payment_method_request.validate()?;
|
||||
|
||||
Reference in New Issue
Block a user