PayPal Pro Payflow Expiration Date Bugfix
-
My client has been having issues with payments going through for months now. We couldn’t figure out where the bug was originating because, quite honestly, there are a lot of different sub processes. in the end, i finally figured out that PayPal simply does NOT allow 6-digit expiration dates, but inside of
class-woo-paypal-gateway-paypal-pro-payflow-api-handler.php
, in the functionrequest_do_payment()
, the expiration date is added, but it’s specified as being 6-digits via a function fromclass-woo-paypal-gateway-paypal-pro-payflow.php
on line 97 (if length is2
it adds 2000…). this is obviously a MAJOR problem since PayPal throws an indiscriminate error that does not tell you this is the issue specifically. i fixed this for now by just usingsubstr($card->exp_year, -2)
inside ofrequest_do_payment()
, but this needs to be fixed permanently. i’m happy to write the fix myself if given access. please let me know as i don’t want anyone else to waste the hours and months i’ve spent figuring out this issue (since some of the TXs go through and others don’t, it’s really hard to figure out why it was actually happening).
- The topic ‘PayPal Pro Payflow Expiration Date Bugfix’ is closed to new replies.