commerce_paypal_process_ipn() only returns FALSE in the case of an error, what leads to a HTTP status code of 200. We need to tell paypal though that something went wrong, so it is going to retry sending the IPN.

I'd suggest simply wrapping commerce_paypal_process_ipn() in some other page callback which translates a FALSE return statement to some http error code, e.g. error 400 (bad request) https://developer.paypal.com/docs/classic/ipn/integration-guide/HTMLStat...

CommentFileSizeAuthor
#2 commerce_paypal-2631778.patch1.75 KBa.milkovsky
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

fago created an issue. See original summary.

a.milkovsky’s picture

Status: Active » Needs review
StatusFileSize
new1.75 KB

Added a page callback to processes an incoming IPN.

mglaman’s picture

Version: 7.x-2.3 » 7.x-2.x-dev
anybody’s picture

+1 for this, I think this makes a lot of sense. What may be cases where commerce_paypal_process_ipn() returns false?

anybody’s picture

Status: Needs review » Reviewed & tested by the community

We've been using this for years now, I guess it's RTBC ;)

anybody’s picture

Kudos to @a.milkovsky, I created a MR from #2 - can a maintainer perhaps review and commit this important fix please?

anybody’s picture

Any plan to merge this? Works great for us since months now.

damienmckenna’s picture

Title: Failed IPN validation does incorrectly lead to HTTP status 200 » Failed IPN validation incorrectly leads to HTTP status 200
tomtech’s picture

Status: Reviewed & tested by the community » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.