Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PayPal SSL错误/问题_Ssl_Paypal_Sslv3 - Fatal编程技术网

PayPal SSL错误/问题

PayPal SSL错误/问题,ssl,paypal,sslv3,Ssl,Paypal,Sslv3,我在尝试与paypal api通信时不断收到此消息 这是我的贝宝课程 <?php class MyPayPal { function PPHttpPost($methodName_, $nvpStr_, $PayPalApiUsername, $PayPalApiPassword, $PayPalApiSignature, $PayPalMode) { // Set up your API credentials, PayPal end point, an

我在尝试与paypal api通信时不断收到此消息

这是我的贝宝课程

<?php
class MyPayPal {

    function PPHttpPost($methodName_, $nvpStr_, $PayPalApiUsername, $PayPalApiPassword, $PayPalApiSignature, $PayPalMode) {
            // Set up your API credentials, PayPal end point, and API version.
            $API_UserName = urlencode($PayPalApiUsername);
            $API_Password = urlencode($PayPalApiPassword);
            $API_Signature = urlencode($PayPalApiSignature);

            $paypalmode = ($PayPalMode=='sandbox') ? '.sandbox' : '';

            $API_Endpoint = "https://api-3t".$paypalmode.".paypal.com/nvp";
            $version = urlencode('109.0');

            // Set the curl parameters.
            $ch = curl_init();

            curl_setopt($ch, CURLOPT_URL, $API_Endpoint);
            curl_setopt($ch, CURLOPT_VERBOSE, 1);

            // Turn off the server and peer verification (TrustManager Concept).
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_POST, 1);


            // Set the API operation, version, and API signature in the request.
            $nvpreq = "METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_";

            // Set the request as a POST FIELD for curl.
            curl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);

            // Get response from the server.
            $httpResponse = curl_exec($ch);

            if(!$httpResponse) {
                exit("$methodName_ failed: ".curl_error($ch).'('.curl_errno($ch).')');
            }

            // Extract the response details.
            $httpResponseAr = explode("&", $httpResponse);

            $httpParsedResponseAr = array();
            foreach ($httpResponseAr as $i => $value) {
                $tmpAr = explode("=", $value);
                if(sizeof($tmpAr) > 1) {
                    $httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];
                }
            }

            if((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {
                exit("Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.");
            }

        return $httpParsedResponseAr;
    }

}
?>
我读过一些关于它的文章,但似乎没有任何帮助

我知道PayPal正在用他们的API做一些事情,但问题是,我的代码在localhost上运行得很好,但在远程服务器上似乎失败了(为了以防万一,我还获得了SSL证书,而且也没有任何变化)

谁能给我解释一下,好像我是个哑巴,我应该遵循什么程序?服务器端说这不是他们的错。。。(我不知道这是怎么回事…)

编辑:两周前,同样的代码,在服务器上运行得很好。顺便说一句,请阅读并按照指南中的信息进行修复


PayPal刚刚在2016年1月19日正式启动了开关,这就是为什么你的东西以前能用,而现在不能用的原因

服务器上的人说这不是他们的问题。其他客户对paypal没有异议,因此,必须是我。(然而,我敢打赌,所有这些客户都在生产中,这意味着,在6月份之前,贝宝将继续接受他们向他们抛出的任何协议)是的,没错。他们将在六月份被猛然唤醒。如果他们不愿意和你一起工作,我建议你找一个新的主持人。这是一个众所周知的问题。我已经列出了我的本地TLS版本(使用OpenSSL 1.0.1g意味着我在本地确实支持TLS 1.2,他们正在运行版本0.9.8…这将我限制为TLS 1.0…好吧…那很有趣…我只是想让我的在线商店在本周运行,我不知道现在该怎么办…=。=顺便说一句,也必须要有SSL证书吗?它在两周前运行,但我没有,他们收费。)给我120欧元,用于一年的SSL支持,但是…以前不需要,现在需要吗?顺便说一句,感谢您保持这种状态。您不需要在站点上安装SSL证书。您只需要确保服务器上的软件堆栈(即OpenSSL、cURL、PHP)可以处理TLS 1.2的回退。因此,既然他们给了我1个月的试用期,我将取消购买SSL证书并要求退款。今天晚些时候,我将再次打电话给他们,询问openSSL…如果没有…是时候获得一个now主机并打败他们了…昨天,在电话中与我交谈的人对这件事感到骄傲,而我又错了开发不良软件…^^'
SetExpressCheckout failed: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure(35)