0
votes

Having some issues with the PayPal sandbox and the PHP SDK, which had been working fine up until now (or at least the past 2 or 3 days). I'm contacting the sandbox via the SDK (which is using cURL).

error:140740BF:SSL routines:SSL23_CLIENT_HELLO:no protocols available

As I understand it, PayPal just recently (Jan 19-20th 2016) updated their sandbox to only accept TLS 1.2 (in preparation for the same change to their production enviroment scheduled several months down the road).

I'm on Ubuntu 12.04, and here's what I've tried

  • Upgrading openssl to the latest version available
  • Upgrading PayPal PHP SDK version
  • Upgrading cURL version (was 7.22, built 7.46 from source and confirmed PHP is using that version by checking "curl_version();" output.
  • changing to the following PayPal SSL config values

CURLOPT_SSLVERSION => 6

CURLOPT_SSL_CIPHER_LIST => 'TLSv1'

Previously CURLOPT_SSLVERSION was set to "3" (old, deprecated SSL v3). I was getting this message:

error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

After updating CURLOPT_SSLVERSION to "6" (TLS 1.2), I get the error I first mentioned ("no protocols available").

I've done hours of extensive Google searching on this today, and haven't been able to make any progress. I'm not sure if this is an issue on PayPal's side of things or on mine. If anyone has any ideas that might be able to point me in the right direction, that would be wonderful.

Thanks

3
@mjz19910 thanks, just checked and it seems to be right, however. api-3t.sandbox.paypal.com/2.0 , according to this page developer.paypal.com/docs/classic/api/endpoints0kay

3 Answers

0
votes

I found another question about 12 hours ago, The same error was caused

Set the ssl cipher list to DEFAULT.

0
votes

Turned out to be outdated cURL version after all, which couldn't support the TLS 1.2 connection. I'm on Ubuntu 12.04 which only supports cURL 7.22. I had mentioned that tried to upgrade cURL (did it from source) but don't think I set it up properly or reloaded my configurations properly. Was able to confirm the fix by upgrading cURL on a second machine that was displaying the same symptoms

0
votes

I had a similar problem, solution for me was to update curl and openssl:

sudo add-apt-repository ppa:rsrchboy/ppa
sudo apt-get update
sudo apt-get --only-upgrade install curl openssl libssl1.0.0 libssl-dev

If you want to check if your system will connect to paypal sandbox try (before and after the upgrade):

curl -v https://api.sandbox.paypal.com

You should be able to use

CURLOPT_SSLVERSION => 6

now.