SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    858
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Paypal IPN randomly fails

    I have a IPN script, written in PHP, that I use to process payments from my website members. For the most part it works great. However, a few times per month certain transactions never come through. So then I have to login to the paypal website, go to the IPN History page, and have it resend the transaction that never made it to my server. They always have a HTTP status code of 200, so paypal employees tell me everything is working fine on their end. I'm not so sure though.

    It's to the point that its costing me a lot of time, having to babysit the process and make sure each transaction actually gets successfully processed by my IPN script. I'm at a loss as to why it works most of the time, but not always. Has anyone else seen this? What kind of suggestions do you have?

    Thanks!
    Convert your dollars into silver coins. www.convert2silver.com

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,784
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Is there something that the ones that fail have in common? If you have multiple paths through your script then perhaps there is an error in one of them causing those payments that follow that path to fail.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Wizard TheRedDevil's Avatar
    Join Date
    Sep 2004
    Location
    Norway
    Posts
    1,196
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    As the staff at Paypal told you, the problem is most probably on your side. The chance this is on Paypal's side is 0.00000000000000001%, as else it would be a wide spread issue.

    Keep in mind that if your script fail due to a error, the web server will return a 200 OK http status code.

    If you dont already do it, start logging php errors, and then the next time you have one failing, search the error log and you will most probably find the problem.

    You can also add error reporting to any critical parts of your IPN script, i.e. database updates, etc. This is more tricky if you dont already have a built in system for error reporting and use it frequently.

  4. #4
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    858
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TheRedDevil View Post
    Keep in mind that if your script fail due to a error, the web server will return a 200 OK http status code.
    Is there anything I can do to my code so that if it does have an error it won't send a 200 OK status code?

    Thanks!
    Convert your dollars into silver coins. www.convert2silver.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •