Paypal IPN模拟器不一致工作

时间:2016-06-11 00:42:44

标签: php paypal paypal-ipn

Paypal IPN模拟器似乎非常错误。

我的监听器和模拟器之间的握手有时会返回VERIFIED,但其他时间大部分都会INVALID

我正在使用此IPN script进行握手:

$listener = new IpnListener();
$listener->use_sandbox = true;

$verified = false;

try {
    $listener->requirePostMethod();
    $verified = $listener->processIpn();
} catch(Exception $e) {
    error_log($e->getMessage());
    exit(0);
}

if ($verified) {
    // do stuff with the database
} else {
    error_log($listener->getReport()); // when the handshake is INVALID, it goes here 
}

这是我会得到的报告:

[10-Jun-2016 18:30:09 America/Denver] --------------------------------------------------------------------------------
[06/10/2016 6:30 PM] - https://www.sandbox.paypal.com/cgi-bin/webscr (curl)
--------------------------------------------------------------------------------
HTTP/1.1 200 OK

Date: Sat, 11 Jun 2016 00:30:08 GMT

Server: Apache

X-Frame-Options: SAMEORIGIN

Set-Cookie: c9MWDuvPtT9GIMyPc3jwol1VSlO=PbW-3Qmnqq_FObMy8QDFtFBB99ZEVawBnK4mxnzwaWVVzq5qcP4k87k_XI-FS_cYc0Bbv_GmFX28V2tZtfADGMNg2nmCXHnc9S5uc9CRyii4u3y-mayDWAiJDDVbPB_uPXNyRxEF2P7QWqKcwWEjLKbQU9ZFFCGM9SXUSLTR4oHBJ9nc3CcCkcHJUzlJQ5BneUx_cNqZdP887uPjbe6JoNnbMkHJxjneQyWLDhzdkSsgqCOUcx4awl7F3vCA7XTNv7BOr90BidPdRnulJmiDHAzEu9GfsjOdjRRl9fs3W6h-UmrvBKdwcFdV22pjxfTdA-j5tGaERsvyRhzJU1Wg4B8mFI3Rh7UotoQSrSPtL9WSH2J7SSUobFivI2YEdnXWEjsM3fYZZtQGtLFMvEczclH-sS0LOwNOlx9u60OMwrgKA14zeLcN773_Yxq; domain=.paypal.com; path=/; Secure; HttpOnly

Set-Cookie: cookie_check=yes; expires=Tue, 09-Jun-2026 00:30:09 GMT; domain=.paypal.com; path=/; Secure; HttpOnly

Set-Cookie: navcmd=_notify-validate; domain=.paypal.com; path=/; Secure; HttpOnly

Set-Cookie: navlns=0.0; expires=Mon, 11-Jun-2018 00:30:09 GMT; domain=.paypal.com; path=/; Secure; HttpOnly

Set-Cookie: Apache=10.72.108.11.1465605008753741; path=/; expires=Mon, 04-Jun-46 00:30:08 GMT

Vary: Accept-Encoding,User-Agent

X-Cnection: close

HTTP_X_PP_AZ_LOCATOR: sandbox.slc

Paypal-Debug-Id: 15636c1fb3bcc

Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.WEB.1%26silo_version%3D1880%26app%3Dappdispatcher%26TIME%3D2421906263%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Sat, 11 Jun 2016 01:00:09 GMT; domain=.paypal.com; path=/; Secure; HttpOnly

Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT

Strict-Transport-Security: max-age=14400

Transfer-Encoding: chunked

Content-Type: text/html; charset=UTF-8



INVALID
--------------------------------------------------------------------------------
payment_type             instant
payment_date             Fri Jun 10 2012 20:01:10 GMT-0400
payment_status           Completed
address_status           confirmed
payer_status             verified
first_name               John
last_name                Smith
payer_email              buyer@paypalsandbox.com
payer_id                 TESTBUYERID01
address_name             John Smith
address_country          United States
address_country_code     US
address_zip              95131
address_state            CA
address_city             San Jose
address_street           123 any street
business                 XXXXXXXXXXXXXX
receiver_email           seller@paypalsandbox.com
receiver_id              seller@paypalsandbox.com
residence_country        US
item_name                something
item_number              AK-1234
quantity                 1
shipping                 3.04
tax                      2.02
mc_currency              USD
mc_fee                   0.44
mc_gross                 12.34
mc_gross_1               9.34

使用模拟器可以进行的请求数量是否存在某种限制?我无法弄清楚它偶尔会起作用的原因。

0 个答案:

没有答案