【发布时间】:2017-09-30 07:57:22
【问题描述】:
我是 PHP 和 PayPal 的新手,并试图根据以下 PayPal 文章确定是否需要升级 TLS:https://www.paypal-knowledge.com/infocenter/index?page=content&id=FAQ1914
为了验证我正在使用 tlstest.paypal.com 端点的系统,如下所示:
$header = '';
$header .= "POST /cgi-bin/webscr HTTP/1.1\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Host: tlstest.paypal.com\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
$paypaladdr = 'tlstest.paypal.com';
$fp = fsockopen('ssl://'.$paypaladdr, 443, $errno, $errstr, 30);
我立即收到以下回复:
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 20
Connection: keep-alive
然后在几分钟 (6-8) 分钟后,我得到: PayPal_Connection_OK
您知道为什么要花这么长时间才能收到 PayPal_Connection_OK 消息吗? 我希望生产端点不会发生这种情况。 我可以走了吗?
提前谢谢你。
【问题讨论】:
标签: php paypal https tls1.2 fsockopen