Question about Paypal IPN, please help

Discussion in 'PayPal' started by craze3, Jan 5, 2008.

  1. #1
    I understand how IPN works.
    Say my IPN page is pp.php. This is the page that posts the info back to paypal and finds out that everything is okay.

    But is pp.php also the page that says "Thank you here is your download link" whenever a customer pays, or do I need to set a return URL for that in my paypal settings?

    If so, how do I make sure that the payment went through on the return URL? Do I log the successful transaction in a database when I validate the info in pp.php, and then check it at the thankyou.php return URL?
     
    craze3, Jan 5, 2008 IP
  2. 28081981

    28081981 Well-Known Member

    Messages:
    1,047
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    150
    #2
    can u pls care to elaborate... i didn't quite got that ... :confused:
     
    28081981, Jan 5, 2008 IP
  3. craze3

    craze3 Well-Known Member

    Messages:
    454
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Updated original post, should be a little easier to understand..
     
    craze3, Jan 6, 2008 IP
  4. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #4
    The script that processes the ipn should not contain the DL link. Once the conditions you have set are met it should forward the purchaser to the page that contains the DL link.

    The more or less common way of doing it with a DB is to write the sale to the DB with a status of pending when the customer buys and then have the IPN script change the status to paid when the process completes. Sometimes this can take several days if an e-check is used.
     
    Colbyt, Jan 6, 2008 IP
  5. craze3

    craze3 Well-Known Member

    Messages:
    454
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    110
    #5
    Okay, so after I make sure the payment amount and everything is correct, i do a location: header to the thankyou/DL page?
     
    craze3, Jan 6, 2008 IP
  6. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #6
    I have never written one.

    My understanding is that PP sends the info, you send it back and they confirm that what you got and sent is correct. When that happens your script then says okay and does whatever.

    I am giving away a paypal store cgi script on one of my sites. Why don't you grab a free copy and see how someone else did it. Grab it quick. I need to update that site with some new stuff later this week.
     
    Colbyt, Jan 6, 2008 IP