From 3283d94b0dd90a6c9fba395fdea6e1aaeb3e2bb5 Mon Sep 17 00:00:00 2001 From: Shankar Singh C Date: Thu, 7 Nov 2024 16:19:12 +0530 Subject: [PATCH] fix(router): add card expiry check in the network_transaction_id_and_card_details based mit flow --- crates/router/src/core/payments.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/router/src/core/payments.rs b/crates/router/src/core/payments.rs index 5d75001b118a..a09510a4c4e3 100644 --- a/crates/router/src/core/payments.rs +++ b/crates/router/src/core/payments.rs @@ -4464,6 +4464,11 @@ where let (mandate_reference_id, card_details_for_network_transaction_id)= hyperswitch_domain_models::payment_method_data::CardDetailsForNetworkTransactionId::get_nti_and_card_details_for_mit_flow(recurring_payment_details.clone()).get_required_value("network transaction id and card details").attach_printable("Failed to fetch network transaction id and card details for mit")?; + helpers::validate_card_expiry( + &card_details_for_network_transaction_id.card_exp_month, + &card_details_for_network_transaction_id.card_exp_year, + )?; + let network_transaction_id_supported_connectors = &state .conf .network_transaction_id_supported_connectors