@@ -388,11 +388,21 @@ impl<T: PaymentMethodDataTypes>
388388 // Extract payment method data
389389 let payment_method = match & item. request . payment_method_data {
390390 PaymentMethodData :: Card ( card_data) => {
391+ // Convert year to YY format (last 2 digits)
392+ let year_str = card_data. card_exp_year . peek ( ) ;
393+ let year_yy = if year_str. len ( ) == 4 {
394+ // YYYY format - take last 2 digits
395+ Secret :: new ( year_str[ 2 ..] . to_string ( ) )
396+ } else {
397+ // Already YY format
398+ card_data. card_exp_year . clone ( )
399+ } ;
400+
391401 let payment_card = PaymentCard {
392402 number : card_data. card_number . clone ( ) ,
393403 expiry_date : ExpiryDate {
394404 month : card_data. card_exp_month . peek ( ) . clone ( ) ,
395- year : card_data . card_exp_year . peek ( ) . clone ( ) ,
405+ year : year_yy . peek ( ) . clone ( ) ,
396406 } ,
397407 security_code : Some ( card_data. card_cvc . clone ( ) ) ,
398408 holder : item. request . customer_name . clone ( ) ,
@@ -511,7 +521,7 @@ impl TryFrom<&RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsRespo
511521 // For void transactions, we only need to specify the transaction type
512522 // The transaction ID is passed in the URL path parameter
513523 Ok ( Self {
514- request_type : "VoidTransaction " . to_string ( ) ,
524+ request_type : "VoidPreAuthTransactions " . to_string ( ) ,
515525 } )
516526 }
517527}
0 commit comments