ipn未返回已验证或无效


ipn not returning VERIFIED or INVALiD

我正在使用Michas ipn脚本,我正在接收PayPal和OK 200的验证,但脚本的这一部分似乎停止了。我添加了//注释

    if ($this->use_curl) $this->curlPost($encoded_data); 
    else $this->fsockPost($encoded_data); 
    if (strpos($this->response_status, '200') === false) { 
        throw new Exception("Invalid response status: ".$this->response_status);
    } 
    throw new Exception("status ".$this->response_status);//returns status 200
    throw new Exception("status ".$this->response);//see below
    if (strpos($this->response, "VERIFIED") !== false) { 
        return true; throw new Exception("Verified");//nothing returned
    } elseif (strpos($this->response, "INVALID") !== false) { 
        return false;  throw new Exception("Invalid");//nothing returned
    } else {
        throw new Exception("Unexpected response from PayPal.");
    }

下面是paypal使用throw new Exception("status ".$this->response)返回的结果;

    [19-Oct-2015 14:59:53 UTC] HTTP/1.1 200 OK
    Server: Apache
    X-Frame-Options: SAMEORIGIN
    Cache-Control: max-age=0, no-cache, no-store, must-revalidate
    Pragma: no-cache
    Paypal-Debug-Id: fdea911830b4f
    Cache-Control: max-age=0, no-cache, no-store, must-revalidate
    Pragma: no-cache
    Content-Type: text/html; charset=UTF-8
    DC: slc-b-origin-www-2.paypal.com
    Date: Mon, 19 Oct 2015 14:59:47 GMT
    Content-Length: 8
    Connection: close
    Set-Cookie: cwrClyrK4LoCV1fydGbAxiNL6iG=xW6oYJfS6eHsqsgzQsbhMbE7-VbWj_1d-cNcQrxwKKa-56EbhXpjNMeHUi8wgEe_5J_Dtv9ksoVEE-fvmRQgjZzNrt6UX4Vc-vnhF4q-ymaA7GTWHgypoE-4nnN4eGGmxT8ekVletsOzZuSkcpr2uCuZ_o_2qe4gZnucegLPdnP1H6wLCQSh9vAeMUUlKG_TO92-4NA_LvcAtk83p7uwjzB7L8U1c2vvLivfiS-g3j6oKowAWAhOYtwLlLEVvnpXoWAOyGtPZJNbLDF_hub-VCdh9PA_4UhvMQYJyHv3nSzqvDwqhklL1fk87t3lLzyizpPkZweG6mi-iQyBk4PgS_merjRIESmqD0uNeJL_EIqAkBEZilxWwHmMKskh07SYx146nytFFfAKk8kFQ58_uZ6mxeX9EyBPsUg6z2xMC8OrTyPDqaWH8038mUW;
    domain=.paypal.com; 
    path=/; Secure; HttpOnly
    Set-Cookie: cookie_check=yes; expires=Thu, 16-Oct-2025 14:59:47 GMT; domain=.paypal.com; path=/; Secure; HttpOnly
    Set-Cookie: navcmd=_notify-validate; domain=.paypal.com; path=/;     Secure; HttpOnly
    Set-Cookie: navlns=0.0; expires=Wed, 18-Oct-2017 14:59:47 GMT; domain=.paypal.com; path=/; Secure; HttpOnly
    Set-Cookie: Apache=10.74.8.134.1445266787217963; path=/; expires=Wed, 11-Oct-45 14:59:47 GMT
    Set-Cookie: X-PP-SILOVER=name%3DLIVE6.WEB.1%26silo_version%3D880%26app%3Dappdispatcher%26TIME%3D1661281622; domain=.paypal.com; path=/; Secure; HttpOnly
    Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT
    Set-Cookie: Apache=10.74.8.69.1445266787199279; path=/; expires=Wed, 11-Oct-45 14:59:47 GMT
    Set-Cookie: AKDC=slc-b-origin-www-2.paypal.com; expires=Mon, 19-Oct-2015 15:29:47 GMT; path=/; secure
    Strict-Transport-Security: max-age=63072000
    VERIFIED

我不知道从这里去哪里?

问题出在PayPal遵守SHA-256。我发现这个脚本由Wade Schuler从原来的Micah Carrick IPN分叉,这里是链接https://github.com/WadeShuler/PHP-PayPal-IPN要让它工作,请添加位于https://knowledge.symantec.com/support/ua-support/index?page=content&actp=CROSSLINK&id=SO5624的G5 crt,其中包括将抛出握手错误。我希望这对你也有帮助!