我正在使用Michas ipn脚本,我从PayPal和OK 200收到VERIFIED,但脚本的这部分似乎停止了。我添加了//记号
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
我不确定从哪里开始?
答案 0 :(得分:0)
问题是PayPal坚持使用SHA-256。我发现Wade Schuler的这个脚本是从最初的Micah Carrick IPN分叉的,这里是链接https://github.com/WadeShuler/PHP-PayPal-IPN为了让它工作,添加这个G5 crt位于https://knowledge.symantec.com/support/ua-support/index?page=content&actp=CROSSLINK&id=SO5624包含的那个将抛出握手错误。我希望这对你也有帮助!