From 564b4604327b2bac680ed8874eeb7a1e8e7ee2f0 Mon Sep 17 00:00:00 2001 From: Malay Awasthi Date: Mon, 4 Nov 2024 17:17:01 +0530 Subject: [PATCH] minor-fix --- crates/router/src/connector/paybox/transformers.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/router/src/connector/paybox/transformers.rs b/crates/router/src/connector/paybox/transformers.rs index 4b9c25f6dba6..4e1270f419c8 100644 --- a/crates/router/src/connector/paybox/transformers.rs +++ b/crates/router/src/connector/paybox/transformers.rs @@ -1224,14 +1224,12 @@ fn get_card_expiry_month_year_2_digit( card_exp_month: Secret, card_exp_year: Secret, ) -> Result, errors::ConnectorError> { - let year_2_digit = card_exp_year - .peek() - .get(..2) - .ok_or(errors::ConnectorError::RequestEncodingFailed)? - .to_string(); Ok(Secret::new(format!( "{}{}", card_exp_month.peek(), - year_2_digit + card_exp_year + .peek() + .get(card_exp_year.peek().len() - 2..) + .ok_or(errors::ConnectorError::RequestEncodingFailed)? ))) }