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:
Kartikeya Hegde
2023-05-30 13:43:17 +05:30
committed by GitHub
parent 77e60c82fa
commit fa392c40a8
107 changed files with 3818 additions and 1267 deletions

View File

@ -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()?;