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),