PayPal NVP错误:CURL请求失败:SSL连接错误(35) [英] PayPal NVP Error: CURL Request failed: SSL connect error (35)
问题描述
连接PayPal(NVP)API时出现此错误; CURL请求失败:SSL连接错误(35)
这意味着我无法连接,因为我可能正在使用SSL3,如何解决此问题,因为如果不进行测试就无法上线.我是否必须更改服务器或可以在CURL中对其进行修复?请求?
我有您现在面临的解决方法(我也面临着上周沙盒环境的问题),现在您应该在curl调用中尝试类似的方法/p>
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSLVERSION, 6); //6 is for TLSV1.2
详细信息
CURLOPT_SSLVERSION CURL_SSLVERSION_DEFAULT(0),CURL_SSLVERSION_TLSv1(1),CURL_SSLVERSION_SSLv2(2),CURL_SSLVERSION_SSLv3(3),CURL_SSLVERSION_TLSv1_0(4),CURL_SSLVERSION_TLSv1_1(5)之一或CURL_SSL
.
注意: 最好的选择是不要设置它,并让它使用默认值.考虑到已知漏洞,将其设置为2或3是非常危险的 在SSLv2和SSLv3中.
信用: http://php.net/manual/en/function. curl-setopt.php
希望它对某人有帮助.
I am getting this error when connecting the PayPal (NVP) API; CURL Request failed: SSL connect error(35)
This means that I can't connect because I am probably using SSL3, how can I fix this issue as I can't go live without testing.. Do I have to change my server or can I fix it in the CURL request?
I have the workaround solution which you facing now(i too facing the problem from last week with sandbox environment) now you should try something like in your curl call
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSLVERSION, 6); //6 is for TLSV1.2
DETAILS
CURLOPT_SSLVERSION One of CURL_SSLVERSION_DEFAULT (0), CURL_SSLVERSION_TLSv1 (1), CURL_SSLVERSION_SSLv2 (2), CURL_SSLVERSION_SSLv3 (3), CURL_SSLVERSION_TLSv1_0 (4), CURL_SSLVERSION_TLSv1_1 (5) or CURL_SSLVERSION_TLSv1_2 (6)
.
Note: Your best bet is to not set this and let it use the default. Setting it to 2 or 3 is very dangerous given the known vulnerabilities in SSLv2 and SSLv3.
CREDITS: http://php.net/manual/en/function.curl-setopt.php
Hope it helps to someone.
这篇关于PayPal NVP错误:CURL请求失败:SSL连接错误(35)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!