By luisroc
Hi there, I have a question, my vps Centos 7 works fine but I recently upload a php script that allows payments with paypal via REST, unfourtnately, always receive next exception: Fatal error: Uncaught exception ‘PayPal\Exception\PayPalConnectionException’ with message ‘Cannot communicate securely with peer: no common encryption algorithm(s).’ in *****/****/paypal/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalHttpConnection.php:137
I tested the script in a couple of servers more and everything works fine, I don’t know if there’s a configuration I’m missing. Can anyone help me with this? I don’t know what can be the problem.
Greetings!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
I’m not sure, but I guess PayPal maybe does a reverse check. And if they do, then yes, a self-signed certificate is not allowed. You either need to use Let’s Encrypt (which is free) or buy a certificate.
And according to checking your certificate, it states that you’re running OpenSSL/1.0.1e-fips
in Apache/2.4.6
, which is probably the reason why you’re getting the error, since that version of OpenSSL is old and insecure.
Hi @luisroc
Which version of PHP, cURL and OpenSSL are you using? My guess would be that that one of these libraries are outdated and using an old algorithm (SSL or TLSv1) to try to communicate with PayPal, which they don’t allow.
I have tried your solution but I get same kind of problem: https://stackoverflow.com/questions/50194109/node-js-https-configuration-error-no-common-encryption-algorithms
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.