9

I see this error when i am checking out.

Unable to communicate with the PayPal gateway.

Step to produce error: When i reach on payment information tab of checkout. This error comes. What can be reason. Magento: 1.9

---- Error Log ----

ERR (3): exception 'Exception' with message 'PayPal NVP CURL connection error #35: SSL connect error' in /path-to-file/app/code/core/Mage/Paypal/Model/Api/Nvp.php:983
Stack trace:
#0 /path-to-file/app/code/core/Mage/Paypal/Model/Api/Nvp.php(616): Mage_Paypal_Model_Api_Nvp->call('SetExpressCheck...', Array)
#1 /path-to-file/app/code/core/Mage/Paypal/Model/Express/Checkout.php(381): Mage_Paypal_Model_Api_Nvp->callSetExpressCheckout()
#2 /path-to-file/app/code/core/Mage/Paypal/Controller/Express/Abstract.php(108): Mage_Paypal_Model_Express_Checkout->start('http://dev.XXXX...', 'http://dev.XXX...', false)
#3 /path-to-file/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Paypal_Controller_Express_Abstract->startAction()
#4 /path-to-file/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('start')
#5 /path-to-file/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#6 /path-to-file/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#7 /path-to-file/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#8 /path-to-file/index.php(86): Mage::run('', 'store')
#9 {main}
3
  • You should be getting some errors in the log file could you post them please Feb 27, 2016 at 9:07
  • By the way sometimes it's caused by ssl not being enabled on your store Feb 27, 2016 at 9:07
  • Site is on devlopment server and in sub directory but i enabled SSL in options of magento-admin. Error log is also posted. Pls guide if more details are required?
    – Jarnail S
    Feb 28, 2016 at 7:32

2 Answers 2

4

To solve this issue, you can follow these instructions as below:

1. Disable SSL verification.

You go to the Magento backend, then choose rSystem-> Configuration-> Payment Methods and find PayPal Express Checkout

You click to "Configure" button, then expand "Advanced settings" section and you'll see "Enable SSL verification" option that you need to disable. Let’s turn it to "No".

2. In Sanbox mode

The reason is that Paypal has removed the support to protocol lower than tls 1.2 for their sandboxes. Therefore, you should update your curl and libcurl packages and specify the version in the magento code: CURL_SSLVERSION_TLSv1_2 (6)

Firstly, you have to disable SSL verification

Secondly, you update the curl library from 7.19 to 7.40 (or later version) by running the following command from ssh:

curl -v -s https://api-3t.sandbox.paypal.com/nvp

Sometimes, if the server does not run (SSL error), you can follow this question in Stackoverflow.com to update curl library:

Besides, in case you don’t have the access permission to update curl, use this hot fix:

You open: app/code/core/Mage/Paypal/Model/Api/Nvp.php

In line 945, you make the change in the Paypal Nvp module instead of the libraries by finding:

try {

    $http = new Varien_Http_Adapter_Curl();

After that, you insert the following code snippet to this line:

$http->addOptions(array(CURLOPT_SSLVERSION => 6));
1
  • Why we need to Disable SSL verification.? Apr 26, 2019 at 9:10
2

I had the exact same problem 2 days ago when testing a transaction with PayPal in sandbox mode.

The reason turned out to be a temporary issue with PayPal because 1-2 hours later everything worked again.

3
  • I am having same issue from last 2 days.
    – Jarnail S
    Feb 28, 2016 at 12:28
  • If it persist maybe try to contact PayPal tech support?
    – george
    Feb 29, 2016 at 14:37
  • I am getting same error by using all paypal options from backend. Try to contact the support if they can help
    – Jarnail S
    Mar 1, 2016 at 3:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.