PHPpaypalipn returns INVALID, but payment_status = Completed. why?

Source: Internet
Author: User
This is the recorded log: [082220129: 53PM] Here is the recorded log:
[08/22/2012 PM]-FAIL: IPN Validation Failed.
Ipn post Vars from Paypal:

mc_gross=1.00, protection_eligibility=Eligible, address_status=confirmed, payer_id=N9MJ3E2F72RSA, tax=0.00, address_street=1 Main St, payment_date=21:53:35 Aug 22, 2012 PDT, **payment_status=Completed**, charset=windows-1252, address_zip=95131, first_name=buyer, mc_fee=0.33, address_country_code=US, address_name=buyer buyer, notify_version=3.6, custom=3ba049446d1a922fccf9233c32794f16, payer_status=verified, business=775357_1345694569_biz@qq.com, address_country=United States, address_city=San Jose, quantity=1, verify_sign=ALJkApMs7H6RB6yOv.fdCxcGTa-tANEn6Te6SHeQgyIYAwZVU3TIrY0A, payer_email=775357_1345694424_per@qq.com, txn_id=60Y885950A771745Y, payment_type=instant, last_name=buyer, address_state=CA, receiver_email=775357_1345694569_biz@qq.com, payment_fee=0.33, receiver_id=BPFVTFG92JFY4, txn_type=web_accept, item_name=xxx, mc_currency=USD, item_number=, residence_country=US, test_ipn=1, handling_amount=0.00, transaction_subject=3ba049446d1a922fccf9233c32794f16, payment_gross=1.00, shipping=0.00, ipn_track_id=f9305268979, **IPN Response from Paypal Server:** HTTP/1.1 200 OKDate: Thu, 23 Aug 2012 04:53:40 GMTServer: ApacheX-Frame-Options: SAMEORIGINSet-Cookie: c9MWDuvPtT9GIMyPc3jwol1VSlO=H9KuMTssqUu_tJf3Dam9rchmDS6GUQFouM5-KC3TtpHU199YtckVmNrqgSLfY9uIOFULbrXej6jtUILOdz4ImR-ruvjgSDh7RWeuAzPIVo40F7nN8Jxn1xVY2n-Ak8kFLmkUEm%7cSrCbIFQ6eG7qVUKiU5gXgRuZnXVRhIVr3AsqzO7z4At6yvgs588DjotxRox8tl_hJ4qi30%7cptKiyBJFIzge516dKd0-8zfnmTwVxF8Viz_QKeMZPIZPZ5Iu9OcdYiQyE8g861Be04KEt0%7c1345697620; domain=.paypal.com; path=/; Secure; HttpOnlySet-Cookie: cookie_check=yes; expires=Sun, 21-Aug-2022 04:53:40 GMT; domain=.paypal.com; path=/; Secure; HttpOnlySet-Cookie: navcmd=_notify-validate; domain=.paypal.com; path=/; Secure; HttpOnlySet-Cookie: navlns=0.0; expires=Wed, 18-Aug-2032 04:53:40 GMT; domain=.paypal.com; path=/; Secure; HttpOnlySet-Cookie: Apache=10.72.109.11.1345697620182214; path=/; expires=Sat, 16-Aug-42 04:53:40 GMTConnection: closeTransfer-Encoding: chunkedContent-Type: text/html; charset=UTF-87**INVALID**0

Reply content:

Here is the recorded log:
[08/22/2012 PM]-FAIL: IPN Validation Failed.
Ipn post Vars from Paypal:

mc_gross=1.00, protection_eligibility=Eligible, address_status=confirmed, payer_id=N9MJ3E2F72RSA, tax=0.00, address_street=1 Main St, payment_date=21:53:35 Aug 22, 2012 PDT, **payment_status=Completed**, charset=windows-1252, address_zip=95131, first_name=buyer, mc_fee=0.33, address_country_code=US, address_name=buyer buyer, notify_version=3.6, custom=3ba049446d1a922fccf9233c32794f16, payer_status=verified, business=775357_1345694569_biz@qq.com, address_country=United States, address_city=San Jose, quantity=1, verify_sign=ALJkApMs7H6RB6yOv.fdCxcGTa-tANEn6Te6SHeQgyIYAwZVU3TIrY0A, payer_email=775357_1345694424_per@qq.com, txn_id=60Y885950A771745Y, payment_type=instant, last_name=buyer, address_state=CA, receiver_email=775357_1345694569_biz@qq.com, payment_fee=0.33, receiver_id=BPFVTFG92JFY4, txn_type=web_accept, item_name=xxx, mc_currency=USD, item_number=, residence_country=US, test_ipn=1, handling_amount=0.00, transaction_subject=3ba049446d1a922fccf9233c32794f16, payment_gross=1.00, shipping=0.00, ipn_track_id=f9305268979, **IPN Response from Paypal Server:** HTTP/1.1 200 OKDate: Thu, 23 Aug 2012 04:53:40 GMTServer: ApacheX-Frame-Options: SAMEORIGINSet-Cookie: c9MWDuvPtT9GIMyPc3jwol1VSlO=H9KuMTssqUu_tJf3Dam9rchmDS6GUQFouM5-KC3TtpHU199YtckVmNrqgSLfY9uIOFULbrXej6jtUILOdz4ImR-ruvjgSDh7RWeuAzPIVo40F7nN8Jxn1xVY2n-Ak8kFLmkUEm%7cSrCbIFQ6eG7qVUKiU5gXgRuZnXVRhIVr3AsqzO7z4At6yvgs588DjotxRox8tl_hJ4qi30%7cptKiyBJFIzge516dKd0-8zfnmTwVxF8Viz_QKeMZPIZPZ5Iu9OcdYiQyE8g861Be04KEt0%7c1345697620; domain=.paypal.com; path=/; Secure; HttpOnlySet-Cookie: cookie_check=yes; expires=Sun, 21-Aug-2022 04:53:40 GMT; domain=.paypal.com; path=/; Secure; HttpOnlySet-Cookie: navcmd=_notify-validate; domain=.paypal.com; path=/; Secure; HttpOnlySet-Cookie: navlns=0.0; expires=Wed, 18-Aug-2032 04:53:40 GMT; domain=.paypal.com; path=/; Secure; HttpOnlySet-Cookie: Apache=10.72.109.11.1345697620182214; path=/; expires=Sat, 16-Aug-42 04:53:40 GMTConnection: closeTransfer-Encoding: chunkedContent-Type: text/html; charset=UTF-87**INVALID**0

In fact, IPN is recommended because it is asynchronous, and can avoid transaction status update failures caused by network problems.

You receive the invalid Response. The official check method is as follows:

  1. Check that your are posting your response to the correct URL, which is https://www.sandbox.paypal.com/cgi-bi... or https://www.paypal.com/cgi-bin/webscr... depending on whether you are testing in the Sandbox or you are live, respectively.
  2. Verify that your response contains exactly the same IPN variables and values in the same order, preceded with cmd = _ policy-validate.
  3. Ensure that you are encoding your response string and are using the same character encoding as the original message.

Suddenly you see test_ipn = 1 in your response, which means you used it to test paypal, but your response was actually received from paypal.com, of course, Invalid. Change your receiving address to sandbox.paypal.com.

IPN is not safe. we recommend that you use PDT ~

Hello, how did you obtain this IPN? I have never been able to get it .. Could you tell me? Very urgent. thank you !!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.