Paypal SDK Adaptive Payments 列表中的未知密码:TLSv1
我正在尝试使用 SetPaymentOptions 实现自适应支付.我收到以下错误:
I'm trying to implement adaptive payments with SetPaymentOptions. I'm getting the following error:
SDK 异常输入 PPConnectionException
SDK Exception Type PPConnectionException
列表中的消息未知密码:TLSv1
Message Unknown cipher in list: TLSv1
详细消息连接到 https://svcs.paypal.com/AdaptivePayments/SetPaymentOptions 时出错
Detailed message Error connecting to https://svcs.paypal.com/AdaptivePayments/SetPaymentOptions
我不知道这是什么意思.关于如何让这个工作的任何想法?我在 PPHttpconfig 中有我的部分代码:
I dont know what this means. Any idea on how to get this working? I have this for part of my code in the PPHttpconfig:
public static $DEFAULT_CURL_OPTS = array(
CURLOPT_SSLVERSION => 1,
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_TIMEOUT => 60, // maximum number of seconds to allow cURL functions to execute
CURLOPT_USERAGENT => 'PayPal-PHP-SDK',
CURLOPT_HTTPHEADER => array(),
CURLOPT_SSL_VERIFYHOST => 2,
CURLOPT_SSL_VERIFYPEER => 1,
CURLOPT_SSL_CIPHER_LIST => 'TLSv1',
);
推荐答案
似乎如果您使用的是 NSS 而不是 OpenSSL,具有密码列表会导致问题,因为 TLSv1 不在 NSS 中.
Seems if you are using NSS instead of OpenSSL, Having Cipher List is causing the issue, as TLSv1 is not in the NSS.
如果您遇到该错误,您可能需要运行
If you are having that error, you might want to run
php -r "print_r(curl_version());"
如果输出有
[ssl_version] => NSS/...
这意味着,你有 NSS.然后你可以从数组中删除 CURLOPT_SSL_CIPHER_LIST
It means, you have NSS. Then you can just remove the CURLOPT_SSL_CIPHER_LIST from the array
public static $DEFAULT_CURL_OPTS = array(
CURLOPT_SSLVERSION => 1,
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_TIMEOUT => 60, // maximum number of seconds to allow cURL functions to execute
CURLOPT_USERAGENT => 'PayPal-PHP-SDK',
CURLOPT_HTTPHEADER => array(),
CURLOPT_SSL_VERIFYHOST => 2,
CURLOPT_SSL_VERIFYPEER => 1,
);
发布是在以下位置修复的:https://github.com/paypal/sdk-core-php/releases/tag/v2.5.8
The release was made with the fix at : https://github.com/paypal/sdk-core-php/releases/tag/v2.5.8
相关文章