feat(core): customer_details storage in payment_intent (#5007)

Co-authored-by: Narayan Bhat <narayan.bhat@juspay.in>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Prajjwal Kumar
2024-06-28 15:06:19 +05:30
committed by GitHub
parent a172cba5d3
commit bb9a97154c
20 changed files with 380 additions and 110 deletions

View File

@ -421,6 +421,7 @@ async fn store_bank_details_in_payment_methods(
let encrypted_data =
cards::create_encrypted_data(&key_store, Some(payment_method_data))
.await
.map(|details| details.into())
.ok_or(ApiErrorResponse::InternalServerError)?;
let pm_update = storage::PaymentMethodUpdate::PaymentMethodDataUpdate {
payment_method_data: Some(encrypted_data),
@ -432,6 +433,7 @@ async fn store_bank_details_in_payment_methods(
let encrypted_data =
cards::create_encrypted_data(&key_store, Some(payment_method_data))
.await
.map(|details| details.into())
.ok_or(ApiErrorResponse::InternalServerError)?;
let pm_id = generate_id(consts::ID_LENGTH, "pm");
let now = common_utils::date_time::now();