django-paypal: Fatal Failure / 400 Bad Request

Some seemingly random small percentage of IPNs fail with

Invalid postback. (<html> <body> Fatal Failure <br> </body> </html> )

We can’t find any way to reliably reproduce the error, resorting to manually making payments repeatedly until it triggers. A Google search of “Fatal Failure” gives a few results, but no real suggestions on the cause, so I was wondering if you had seen this before.

Sometimes PayPal will attempt the IPN a few more times, but it will either error in the same way, or django-paypal will consider it invalid due to “Duplicate txn_id”, where the only previous records of the same transaction ID are the failed postbacks. I think this is a bug with duplicate_txn_id not filtering out flagged IPNs (they all have the same status, so it thinks they’re duplicates), but maybe this is desired behaviour and I’m missing something.

The fact that PayPal sometimes repeats the failed IPNs and sometimes doesn’t suggests that sometimes PayPal thinks it’s confirmed the postback when giving the error, but I have no idea what could cause that.

Any suggestions? We’ve been banging our heads against the wall here.

About this issue

  • Original URL
  • State: open
  • Created 9 years ago
  • Comments: 30 (11 by maintainers)

Most upvoted comments

@HoshiYamazaki I cant thank you enough, it works !!! I had almost given up… Got 25 200 OK out of 25… for the first time 😃