Can one rely on Paypal IPN solely to record purchases?

前端 未结 5 699
清歌不尽
清歌不尽 2021-02-10 21:42

I\'m setting up a simple \'buy now\' transaction from a website with these major steps:

  1. Select product from price list
  2. Review selection (amounts, tax etc)
5条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-10 22:11

    As the designer and administrator of a system that has processed over 600,000 PayPal payments in the last three years - relying exclusively on IPN will allow some errors to slip through the cracks.

    Real data:

            Total transactions   No IPN    Invalid IPN  Duplicate IPN
    year 1      170,000 +          2           101           0
    year 2      205,000 +         54            15           3
    year 3      230,000 +         20            24          13
    

    Fortunately, our system is structured with PDT (Payment Data Transfer) as a 'backup' so we didn't lose any transaction data or have unhappy customers. Note: PDT can't be relied upon exclusively either - in fact, early this year, there was a major problem with the reliability of PDT returns.

    The most common 'invalid' IPN returns are an HTML error page or truncated results ... I can provide samples if desired.

    The best choice is a combination of both IPN and PDT (with your 'cart' data stored in your DB as you are). Either the IPN processs or the PDT process can create the transaction (and delete the 'cart' data record in the DB). The second process to arrive will then not have a 'cart' entry from which to record a transaction.

    NOTE: - as you noted in your final solution to use a custom field - be aware there is a length limitation to the custom field and it can be truncated upon being returned to you.

提交回复
热议问题