Skip to content

Commit 3c27b57

Browse files
ShankarSinghCSayak Bhattacharya
authored andcommitted
fix(router): add card expiry check in the network_transaction_id_and_card_details based MIT flow (#6504)
1 parent 771d20d commit 3c27b57

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/router/src/core/payments.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4470,6 +4470,11 @@ where
44704470

44714471
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")?;
44724472

4473+
helpers::validate_card_expiry(
4474+
&card_details_for_network_transaction_id.card_exp_month,
4475+
&card_details_for_network_transaction_id.card_exp_year,
4476+
)?;
4477+
44734478
let network_transaction_id_supported_connectors = &state
44744479
.conf
44754480
.network_transaction_id_supported_connectors

0 commit comments

Comments
 (0)