PDT returning 423 as first line before success?

微笑、不失礼 提交于 2019-12-12 01:09:55

问题


I'm trying to get PDT working in the sandbox, and have just run afoul of the problem of using HTTP 1.1 as described here:

https://stackoverflow.com/a/14701946/391615

Having changed everything, when I create my connection to

$fp = fsockopen ('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30);
fputs ($fp, $header . $req);

// read the body data 
$res = '';
while (!feof($fp)) 
{
    $line = fgets ($fp, 1024);
    // etc...

I find that the very first lines return look like this:

423
SUCCESS
mc_gross=240.00
invoice=PP0000
protection_eligibility=Partially+Eligible+-+INR+Only
address_status=unconfirmed

Any idea what the 423 is all about?


回答1:


Well here we go: PHP fsockopen() / fread() returns messed up data

Looks like it's chunked data being returned from the server



来源:https://stackoverflow.com/questions/16563516/pdt-returning-423-as-first-line-before-success

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!