IPN is getting INVALID in LIVE box, but working good with Sandbox

kjsunilkj
New Community Member

IPN is getting INVALID in LIVE box, but working good with Sandbox. Please do help me to identify the issue here

 

---------------------------------------POST Response----------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------
[12/05/2016 12:31 PM] - https://www.paypal.com/cgi-bin/webscr (curl)
--------------------------------------------------------------------------------
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
HTTP_X_PP_AZ_LOCATOR: slcb.slc
Paypal-Debug-Id: 121ce9f69f66d
Cache-Control: max-age=0, no-cache, no-store, must-revalidate
Pragma: no-cache
Content-Type: text/html; charset=UTF-8
DC: ccg11-origin-www-2.paypal.com
Date: Mon, 05 Dec 2016 07:01:45 GMT
Content-Length: 7
Connection: close
Set-Cookie: cwrClyrK4LoCV1fydGbAxiNL6iG=bf5bwUgrcWamn6k91U1NUAZkA3NGCG1wZxs0jc6q_AhpBWaQoM-CqFFtscvkqNvLj65gO-soqQDt8ga0U5Vysj_EdYEl26gt0p9ciReayVHdUryazEtEqjhv1hD8pgVsMlxvhFP1pQ5ZoOtWS_nwvGJH9nQjxOQA1IPwED-iLtOtXOVUFf8z6lyIMN3mM8Sw3tDCN5EQ7-DqBJZ1pcm621hrA4lz9L_s9YvROxRNnnZHRSKb_NVr7qs5dFc0-ZOu5qNtOC18HMPHD9EHowtBe2GqHN8EQr00Djv3pv7pJVWQdv3ABAJ6Rxd6ph4ZghZV2vIlj1IL2ifMOPX91CbH7dHCpw2LFHabIdtOFuMjsZ7yaaX7l8PL4Ey6_bI5AHPmPR8Uu9_P1DSAZ6VRCQveLyRDQgGV3Y2i4BrwQ-7UVYAEkXRz48VlzIV6ZBK; domain=.paypal.com; path=/; Secure; HttpOnly
Set-Cookie: cookie_check=yes; expires=Thu, 03-Dec-2026 07:01:44 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, 05-Dec-2018 07:01:44 GMT; domain=.paypal.com; path=/; Secure; HttpOnly
Set-Cookie: X-PP-SILOVER=name%3DLIVE5.WEB.1%26silo_version%3D880%26app%3Dappdispatcher%26TIME%3D3624944984%26HTTP_X_PP_AZ_LOCATOR%3Dslcb.slc; Expires=Mon, 05 Dec 2016 07:31:45 GMT; domain=.paypal.com; path=/; Secure; HttpOnly
Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT
Set-Cookie: AKDC=ccg11-origin-www-2.paypal.com; expires=Mon, 05-Dec-2016 07:31:45 GMT; path=/; secure
Set-Cookie: akavpau_ppsd=1480921905~id=9013a9da138d7db2cc2294221d985852; path=/
Strict-Transport-Security: max-age=63072000

INVALID
--------------------------------------------------------------------------------
txn_id 3MJ6733400603303W
mc_currency USD
mc_fee 0.70
mc_gross 9.00
protection_eligibility ELIGIBLE
payment_date 2016-12-05T07:01:32Z
payment_fee 0.70
payment_gross 9.00
payment_status Completed
payment_type INSTANT_TRANSFER
business ESLK5VUUMC9X4
receiver_id ESLK5VUUMC9X4
payer_email kadsfdsran.vindsfsdfayadfk@gmfdsfail.com
payer_id VUF4U6G8UYJP8
payer_status VERIFIED
first_name dfdsf
last_name sdfsdfs
address_name dfdfsf
address_street 45453stredfdfet
address_city dfddfsd
address_state Tasmania
address_country_code AU
address_zip 454543
residence_country AU
item_name Online OQA
item_number P000000123445270
quantity 1
charset windows-1252

===============================================================================================

Respective code snippet, Here the below code is throwing false and returnign invalid IPN,

 

elseif (strpos($this->response, "INVALID") !== false) {
return false;

 

----------------------------------------------------------------------------

 

public function processIpn($post_data=null) {

$encoded_data = 'cmd=_notify-validate';

if ($post_data === null) {
// use raw POST data
if (!empty($_POST)) {
$this->post_data = $_POST;
$encoded_data .= '&'.file_get_contents('php://input');
} else {
throw new Exception("No POST data found.");
}
} else {
// use provided data array
$this->post_data = $post_data;

foreach ($this->post_data as $key => $value) {
$encoded_data .= "&$key=".urlencode($value);
}
}

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);
}

if (strpos($this->response, "VERIFIED") !== false) {
return true;
} elseif (strpos($this->response, "INVALID") !== false) {
return false;
} else {
throw new Exception("Unexpected response from PayPal.");
}
}

 

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.