From cc72c91bc7c0f380e8d5e2a2be1f1d3b7437bba0 Mon Sep 17 00:00:00 2001 From: hrithikeshvm Date: Mon, 4 Dec 2023 14:14:58 +0530 Subject: [PATCH] address comments --- crates/router/src/core/payments/helpers.rs | 21 +++---------------- .../payments/operations/payment_create.rs | 2 -- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/crates/router/src/core/payments/helpers.rs b/crates/router/src/core/payments/helpers.rs index faacb8ed1375..042356a338d2 100644 --- a/crates/router/src/core/payments/helpers.rs +++ b/crates/router/src/core/payments/helpers.rs @@ -1486,19 +1486,6 @@ pub async fn retrieve_card_with_permanent_token( .change_context(errors::ApiErrorResponse::InternalServerError) .attach_printable("failed to fetch card information from the permanent locker")?; - let payment_method = state - .store - .find_payment_method(token) - .await - .change_context(errors::ApiErrorResponse::InternalServerError) - .attach_printable("Failed to fetch payment method")?; - let card_network = payment_method - .scheme - .map(|scheme| scheme.parse_enum("CardNetwork")) - .transpose() - .change_context(errors::ApiErrorResponse::InternalServerError) - .attach_printable("Failed deserilaize card network")?; - let name_on_card = if let Some(name_on_card) = card.name_on_card.clone() { if card.name_on_card.unwrap_or_default().expose().is_empty() { card_token_data @@ -1519,12 +1506,10 @@ pub async fn retrieve_card_with_permanent_token( card_exp_month: card.card_exp_month, card_exp_year: card.card_exp_year, card_cvc: card_cvc.unwrap_or_default(), - card_issuer: card.card_brand.or(payment_method.issuer_name), + card_issuer: card.card_brand, nick_name: card.nick_name.map(masking::Secret::new), - card_network, - card_type: payment_method - .payment_method_type - .map(|payment_method_type| payment_method_type.to_string()), + card_network: None, + card_type: None, card_issuing_country: None, bank_code: None, }; diff --git a/crates/router/src/core/payments/operations/payment_create.rs b/crates/router/src/core/payments/operations/payment_create.rs index 9923bd4424bd..6d83b946448a 100644 --- a/crates/router/src/core/payments/operations/payment_create.rs +++ b/crates/router/src/core/payments/operations/payment_create.rs @@ -298,8 +298,6 @@ impl payment_method_data.apply_additional_payment_data(additional_payment_data) }); - logger::debug!(payment_method_data_after_card_bin_call=?payment_method_data_after_card_bin_call); - let payment_data = PaymentData { flow: PhantomData, payment_intent,