AUG
11
2021
“Invalid HTTP response version: 2″ PayPal Payflowpro in Magento 1.x
The following exception logged on attempt to process PayPal Payflowpro payments in Magento 1.7.0.2: ERR (3): Zend_Http_Exception: Invalid HTTP response version: 2 in lib/Zend/Http/Response.php:182 Stack trace: #0 lib/Zend/Http/Response.php(665): Zend_Http_Response->__construct(200, Array, ‘RESULT=0&PNREF=…’, ‘2’, false) #1 lib/Zend/Http/Client.php(1007): Zend_Http_Response::fromString(‘HTTP/2 200 \r\nco…’) Cause Response from PayPal server is now returned with HTTP/2 version, while old Zend Framework and Magento code is capable in parsing only HTTP/1.0 and HTTP/1.1 responses. Solution It can be fixed with adjusting regular expressions matching… Read the rest