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)

    Question about Paypal IPN script

    I used the default paypal script I found online for my website. For the most part it processes recurring subscriptions just fine. Occasionally the following IF statement is executed and I'm not sure why. Can someone explain this?

    Thanks!

    if (strcmp ($res, "INVALID") == 0) {

    }
    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,789
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Paypal returns INVALID to the paypalipn script if the values passed to it by the script are not ones that it has seen previously. This is how it prevents the IPN script completing a non existent payment if the IPN script is called directly rather than being called from Paypal.
    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 Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    858
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    So is it nothing to worry about when this takes place? Is this likely from a googlebot or other indexing spider hitting the page? Wait, no that can't be it, because I track the IP address when the IPN script is run, and it always belongs to paypal when this INVALID situation occurs. So why is paypal executing my script in an invalid setting? Any info you can provide would really be appreciated!!!
    Convert your dollars into silver coins. www.convert2silver.com

  4. #4
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    858
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    felgall, are you still there?
    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
  •