haymeadows
Forum Replies Created
-
Commenting out all references fixed the problem.
//if (strlen($card_exp_year) == 2) {
//$card_exp_year += 2000;
//}Needed to comment out both files:
/…paypal-pro-payflow.php
/…paypal-gateway-functions.phpActually, it is converting card numbers incorrectly from 02/21 to 02/2020.
Hoping someone sees this. Pretty sure this is the part of the code that is converting card numbers incorrectly from 02/21 to 02/2000. I just don’t know what to change it to?
// Format values
$card_number = str_replace(array(‘ ‘, ‘-‘), ”, $card_number);
$card_expiry = array_map(‘trim’, explode(‘/’, $card_expiry));
$card_exp_month = str_pad($card_expiry[0], 2, “0”, STR_PAD_LEFT);
$card_exp_year = isset($card_expiry[1]) ? $card_expiry[1] : ”;if (isset($_POST[‘pal_pro_payflow-card-start’])) {
$card_start = wc_clean($_POST[‘pal_pro_payflow-card-start’]);
$card_start = array_map(‘trim’, explode(‘/’, $card_start));
$card_start_month = str_pad($card_start[0], 2, “0”, STR_PAD_LEFT);
$card_start_year = $card_start[1];
} else {
$card_start_month = ”;
$card_start_year = ”;
}if (strlen($card_exp_year) == 2) {
$card_exp_year += 2000;
}if (strlen($card_start_year) == 2) {
$card_start_year += 2000;
}Tearing my hair out for weeks as well. What I finally figured out is the card with expiration 2/21 gets submitted as 2/20, and thus rejected. Looking for a fix. Would appreciated one ASAP as this would be our preferred payment method to use. Thank you.