{"action":"closed","issue":{"url":"https://api.github.com/repos/paypal/ipn-code-samples/issues/40","labels_url":"https://api.github.com/repos/paypal/ipn-code-samples/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/paypal/ipn-code-samples/issues/40/comments","events_url":"https://api.github.com/repos/paypal/ipn-code-samples/issues/40/events","html_url":"https://github.com/paypal/ipn-code-samples/issues/40","id":121073017,"number":40,"title":"PHP sample: always INVALID","user":{"login":"kingkrausel","id":2597979,"avatar_url":"https://avatars.githubusercontent.com/u/2597979?v=3","gravatar_id":"","url":"https://api.github.com/users/kingkrausel","html_url":"https://github.com/kingkrausel","followers_url":"https://api.github.com/users/kingkrausel/followers","following_url":"https://api.github.com/users/kingkrausel/following{/other_user}","gists_url":"https://api.github.com/users/kingkrausel/gists{/gist_id}","starred_url":"https://api.github.com/users/kingkrausel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kingkrausel/subscriptions","organizations_url":"https://api.github.com/users/kingkrausel/orgs","repos_url":"https://api.github.com/users/kingkrausel/repos","events_url":"https://api.github.com/users/kingkrausel/events{/privacy}","received_events_url":"https://api.github.com/users/kingkrausel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-08T18:48:30Z","updated_at":"2015-12-21T21:40:36Z","closed_at":"2015-12-21T21:40:36Z","body":"Hi,\r\n\r\nI used the php sample IPN validation script on my server and I always get a response of \"INVALID\" back.\r\nHere is the log:\r\n```\r\n[2015-12-08 19:04 Europe/Berlin] HTTP request of validation request:POST /cgi-bin/webscr HTTP/1.1\r\nHost: www.sandbox.paypal.com\r\nAccept: */*\r\nConnection: Close\r\nContent-Length: 893\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n for IPN payload: cmd=_notify-validate&payment_type=instant&payment_date=Tue+Dec+08+2015+18%3A57%3A39+GMT%2B0100+%28Mitteleurop%C3%A4ische+Zeit%29&payment_status=Pending&address_status=confirmed&payer_status=verified&first_name=John&last_name=Smith&payer_email=buyer%40paypalsandbox.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=seller%40paypalsandbox.com&receiver_email=seller%40paypalsandbox.com&receiver_id=seller%40paypalsandbox.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_gross1=12.34&txn_type=web_accept&txn_id=980123876&notify_version=2.1&custom=xyz123&invoice=abc1234&test_ipn=1&verify_sign=AaGLRDllUtUfQeYdp0nsQQjeQj7SA62cuD5Umejya85JB-9AkGC3lEAz\r\n[2015-12-08 19:04 Europe/Berlin] HTTP response of validation request: HTTP/1.1 200 OK\r\nDate: Tue, 08 Dec 2015 18:04:43 GMT\r\nServer: Apache\r\nX-Frame-Options: SAMEORIGIN\r\nSet-Cookie: c9MWDuvPtT9GIMyPc3jwol1VSlO=h6bpBZc0AYiHZ8Fk6hi43AeNAI6ZYhHxRZkCj9AXhTUo00p9vnwM90i_8ZzkPSWvwuVFAK_HEUv1ckVzHU_M9y4Tbef2n-bDIG3nkBwu4PhZAzt7byCmRHu-SrHzCwYDM1huxJMsjm6tzkdVQAU_mGRIZXKUXxmda_fokiz4LtYDDeXjU7TWhKCsTouhoL7QKPN7fmr5hJdkIkU8tGpHCz6M04XyfVD1Owf83s5D5tbmggCe682CIIgB-ZfdxqwGB4GyAbvL_y8Y1gEEsU_A8sjU4tWV3gRB92MFU280jqqJRQpEe6osjXjik8SoQf1cHTNCDlZt1w3Aja4CK1NGG0O9KFG-iRjhZuB53JU3SraF61-mF_coQr-M5RIXWvhDtuSzGjXXzVYraGiELZPLFHmR2tb8xFhFfvZpVM6DplK9d4rECkHmOkuqg7y; domain=.paypal.com; path=/; Secure; HttpOnly\r\nSet-Cookie: cookie_check=yes; expires=Fri, 05-Dec-2025 18:04:43 GMT; domain=.paypal.com; path=/; Secure; HttpOnly\r\nSet-Cookie: navcmd=_notify-validate; domain=.paypal.com; path=/; Secure; HttpOnly\r\nSet-Cookie: navlns=0.0; expires=Thu, 07-Dec-2017 18:04:43 GMT; domain=.paypal.com; path=/; Secure; HttpOnly\r\nSet-Cookie: Apache=10.72.108.11.1449597883168095; path=/; expires=Thu, 30-Nov-45 18:04:43 GMT\r\nVary: Accept-Encoding,User-Agent\r\nConnection: close\r\nPaypal-Debug-Id: 46c7b9323ea4\r\nSet-Cookie: X-PP-SILOVER=name%3DSANDBOX3.WEB.1%26silo_version%3D880%26app%3Dappdispatcher%26TIME%3D3139135318; domain=.paypal.com; path=/; Secure; HttpOnly\r\nSet-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT\r\nSet-Cookie: Apache=10.72.128.11.1449597883146763; path=/; expires=Thu, 30-Nov-45 18:04:43 GMT\r\nStrict-Transport-Security: max-age=14400\r\nTransfer-Encoding: chunked\r\nContent-Type: text/html; charset=UTF-8\r\n\r\nINVALID\r\n[2015-12-08 19:04 Europe/Berlin] Invalid IPN: cmd=_notify-validate&payment_type=instant&payment_date=Tue+Dec+08+2015+18%3A57%3A39+GMT%2B0100+%28Mitteleurop%C3%A4ische+Zeit%29&payment_status=Pending&address_status=confirmed&payer_status=verified&first_name=John&last_name=Smith&payer_email=buyer%40paypalsandbox.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=seller%40paypalsandbox.com&receiver_email=seller%40paypalsandbox.com&receiver_id=seller%40paypalsandbox.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_gross1=12.34&txn_type=web_accept&txn_id=980123876&notify_version=2.1&custom=xyz123&invoice=abc1234&test_ipn=1&verify_sign=AaGLRDllUtUfQeYdp0nsQQjeQj7SA62cuD5Umejya85JB-9AkGC3lEAz\r\n```\r\n\r\nMaybe something is wrong with the encoding/deconding, because of the 'payment_date' parameter (contains some special characters)?\r\n\r\n"}}