• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

7. IPN and PDT > 86. Synchronizing PDT and IPN

Synchronizing PDT and IPN

Ensure that your product is delivered, even when PDT fails and the return page never shows, by introducing redundancy with IPN.

PayPal’s PDT system [Hack #85] automatically redirects your customers back to your web page after they pay and sends the transaction information along with them. While this is an effective way to deliver products and services to your customers without forcing them to wait for IPN to contact your server, it’s certainly not infallible. If you care about record keeping, you’ll want to use IPN to record payment details into a database [Hack #82] so that you don’t miss any payments.

This hack shows how to coordinate PDT with IPN to ensure that every transaction is processed by your server. The potential problem here is that when using PDT, or even the return variable feature, your customer can be redirected back to your web site before the IPN system has finished processing. You can address this issue by checking your local database to see whether or not the transaction details have been inserted yet; this refreshes the return page until the order has been processed and the IPN data has been received.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint