From 560cc759274388c40297295ee3fe117a49ef5400 Mon Sep 17 00:00:00 2001 From: Sarthak Soni Date: Tue, 13 Aug 2024 16:53:25 +0530 Subject: [PATCH] fix(pm_auth): Fixed desirealize logic in pm_auth core --- crates/router/src/core/pm_auth.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/router/src/core/pm_auth.rs b/crates/router/src/core/pm_auth.rs index 64c1918c5e5d..47f843030eeb 100644 --- a/crates/router/src/core/pm_auth.rs +++ b/crates/router/src/core/pm_auth.rs @@ -346,7 +346,9 @@ async fn store_bank_details_in_payment_methods( > = HashMap::new(); for pm in payment_methods { - if pm.payment_method == Some(enums::PaymentMethod::BankDebit) { + if pm.payment_method == Some(enums::PaymentMethod::BankDebit) + && pm.payment_method_data.is_some() + { let bank_details_pm_data = crypto_operation::( &(&state).into(), type_name!(storage::PaymentMethod),