Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(connector): Expiration Year Incorrectly Populated as YYYY Format in Paybox Mandates #6474

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions crates/router/src/connector/paybox/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1224,14 +1224,12 @@ fn get_card_expiry_month_year_2_digit(
card_exp_month: Secret<String>,
card_exp_year: Secret<String>,
) -> Result<Secret<String>, 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)?
)))
}
Loading