Geesu
Geesu

Reputation: 6008

Paypal IPN continuously hits my IPN page w/the same transaction

I just moved my server to a new host, and obviously changed the DNS for my paypal ipn page.

For some reason paypal keeps hitting my page about every 30 seconds with the same transactions over and over again.

So of course its verified then stored in the database as duplicate records.

Has anyone had this problem? Or know how to fix?

Upvotes: 1

Views: 1303

Answers (2)

j08691
j08691

Reputation: 207983

According to PayPal's IPN documntation:

Your listener must respond to each message, whether or not you intend to do anything with it. If you do not respond, PayPal assumes that the message was not received and resends the message. PayPal continues to resend the message periodically until your listener sends the correct message back, although the interval between resent messages increases each time. The message can be resent for up to four days.

This resend algorithm can lead to situations in which PayPal resends the IPN message while you are sending back the original message. In this case, you should send your response again, to cover the possibility that PayPal did not actually receive your response the first time. You should also ensure that you do not process the transaction associated with the message twice.

IMPORTANT: PayPal expects to receive a response to an IPN message within 30 seconds. Your listener should not perform time-consuming operations, such as creating a process, before responding to the IPN message.

So a) is your script properly responding and b) is the notify_url parameter from your transaction different with your DNS change?

Upvotes: 0

gintas
gintas

Reputation: 2178

Make sure that your browser is returning 200 OK status to paypal.

Either way, you should store IPN tracking IDs (ipn_track_id) in your database and check for duplicates. This is the only guaranteed way to solve your problem.

Upvotes: 1

Related Questions