From 0cebf41ca058fb502ed547e29b3722c60ea34423 Mon Sep 17 00:00:00 2001 From: Matthew O'Loughlin Date: Thu, 28 Jan 2016 09:43:41 +1030 Subject: [PATCH 1/2] Paypal sandbox now requires TLS 1.2 for the postback. --- app/code/local/Aligent/Paypal/Model/Ipn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/local/Aligent/Paypal/Model/Ipn.php b/app/code/local/Aligent/Paypal/Model/Ipn.php index 25213ed..956e8e1 100644 --- a/app/code/local/Aligent/Paypal/Model/Ipn.php +++ b/app/code/local/Aligent/Paypal/Model/Ipn.php @@ -107,7 +107,7 @@ protected function _postBack(Zend_Http_Client_Adapter_Interface $httpAdapter) $sReq = substr($sReq, 1); $this->_debugData['postback'] = $sReq; $this->_debugData['postback_to'] = $this->_config->getPaypalUrl(); - + $httpAdapter->addOption(CURLOPT_SSLVERSION,6); $httpAdapter->write(Zend_Http_Client::POST, $this->_config->getPaypalUrl(), '1.1', array(), $sReq); try { $response = $httpAdapter->read(); From 72174a6365d3914abefcbab7013d42b73bffabdf Mon Sep 17 00:00:00 2001 From: Matthew O'Loughlin Date: Thu, 28 Jan 2016 09:55:10 +1030 Subject: [PATCH 2/2] Add comment for the magic number usage. --- app/code/local/Aligent/Paypal/Model/Ipn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/local/Aligent/Paypal/Model/Ipn.php b/app/code/local/Aligent/Paypal/Model/Ipn.php index 956e8e1..f2c9f2a 100644 --- a/app/code/local/Aligent/Paypal/Model/Ipn.php +++ b/app/code/local/Aligent/Paypal/Model/Ipn.php @@ -107,7 +107,7 @@ protected function _postBack(Zend_Http_Client_Adapter_Interface $httpAdapter) $sReq = substr($sReq, 1); $this->_debugData['postback'] = $sReq; $this->_debugData['postback_to'] = $this->_config->getPaypalUrl(); - $httpAdapter->addOption(CURLOPT_SSLVERSION,6); + $httpAdapter->addOption(CURLOPT_SSLVERSION,6); //6 == CURL_SSLVERSION_TLSv1_2 $httpAdapter->write(Zend_Http_Client::POST, $this->_config->getPaypalUrl(), '1.1', array(), $sReq); try { $response = $httpAdapter->read();