Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix(pm_auth): Fixed deserialize logic in pm_auth core (#5615)

Sarthak Sonif66b09fed50b
diff --git a/crates/router/src/core/pm_auth.rs b/crates/router/src/core/pm_auth.rs
index 64c1918c5e..47f843030e 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::<serde_json::Value, masking::WithType>(
&(&state).into(),
type_name!(storage::PaymentMethod),