Pay before you upload?

Discussion in 'PHP' started by chrisj, Jul 17, 2007.

  1. #1
    I have a basic Upload script where a user Browses his desktop, selects a file to upload and Submits it. And then returns to any page I direct them to.

    I'd like to modify this so that the user is required to first make a small paypal payment before uploading is allowed, each time.

    Any thoughts on how I might accomplish this?

    Thanks.
     
    chrisj, Jul 17, 2007 IP
  2. LosNir

    LosNir Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you can use cookies.
     
    LosNir, Jul 17, 2007 IP
  3. chrisj

    chrisj Well-Known Member

    Messages:
    606
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #3
    Could you elaborate please?
     
    chrisj, Jul 17, 2007 IP
  4. LosNir

    LosNir Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    first check if the cookie exists, if yes then show the upload script,
    if not, show the donate button, and in paypal you have an option to redirect the user to a page you choose when the transaction is completed, so use that option and redirect him to a page that set the cookie.
     
    LosNir, Jul 17, 2007 IP
  5. PwrUps

    PwrUps Peon

    Messages:
    377
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Since he wants to have them pay for every upload, he would have to make sure he expires the cookie after the upload then.
     
    PwrUps, Jul 17, 2007 IP
  6. LosNir

    LosNir Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    He don't have to make it expire,
    just when the upload is completed he can delete the cookie.
     
    LosNir, Jul 17, 2007 IP
  7. ZenOswyn

    ZenOswyn Peon

    Messages:
    50
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You'd probably want to use paypal for this, as they offer several solutions that will integrate into your application easily.

    This is where you should start.
     
    ZenOswyn, Jul 17, 2007 IP
  8. LosNir

    LosNir Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Please read before you post..
     
    LosNir, Jul 17, 2007 IP