According to IPN Testing
Every listener must include code that handles the "error notification" IPN messages.
Either way you should follow the steps in the IPN troubleshooting tips step by step.
Here is a few I've picked out that should help.
- Check the URLs listed in your IPN history to ensure that PayPal is posting each IPN to your listener.
- Check your web server's access and error logs.
- Check your programming language's error log.
- Verify that your IPN listener is responding to all messages, even those you do not intend to process.
Further to the OPs comments
the code samples Paypal give, in which this step isn't performed. Is this step required?
it sounds like you are missing Step 2 from the workflow in the documentation
2. After receiving the IPN message from PayPal, your listener returns an empty HTTP 200 response to PayPal. Otherwise, PayPal resends the IPN message.
Judging by the PHP sample as well both seem to send the verification first, which doesn't tally with the workflow suggested by the documentation.
In which case you should just be able to do
Response.Status = "200 OK"
after the rest of the code, make sure nothing else is written back using Response.Write()
so the server response is blank, you could even use
Call Response.Clear()
before setting the Response.Status
to make sure nothing else has been written from the Response
buffer. This will only work however if Response.Buffer
has been set to True
beforehand (usually at the beginning of the script).