4 Replies - 345 Views - Last Post: 22 June 2011 - 08:46 AM

#1 djbdr248  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 06-February 09

Download file after paying?

Posted 20 June 2011 - 12:02 PM

How can I allow someone to download a file only after they pay for it?
Is This A Good Question/Topic? 0
  • +

Replies To: Download file after paying?

#2 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 9143
  • View blog
  • Posts: 33,935
  • Joined: 27-December 08

Re: Download file after paying?

Posted 20 June 2011 - 12:05 PM

Moved to Web Development.

You will need to use a server-side language to control this. I would also use something like an .htaccess file to prevent linking to the file directly. The server-side language can really simply check if the user has paid (are you tracking this in a database?), and if so, add an <a> tag linking to the File.

How are you handling payment? Paypal has an API you might want to check out.
Was This Post Helpful? 0
  • +
  • -

#3 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 6602
  • View blog
  • Posts: 23,924
  • Joined: 12-June 08

Re: Download file after paying?

Posted 20 June 2011 - 12:06 PM

Have a system that validates a transaction and generates a one time virtual path link that maps to a specific file hidden internally.
Was This Post Helpful? 0
  • +
  • -

#4 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3113
  • View blog
  • Posts: 4,675
  • Joined: 08-June 10

Re: Download file after paying?

Posted 20 June 2011 - 01:52 PM

Interestingly the HTTP protocol specifies a 402 Payment Required header, but only as "Reserved for future use". - That was like 12 years ago. Makes you wonder what "future" they are talking about.
Was This Post Helpful? 2
  • +
  • -

#5 digitalsoularts  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 44
  • Joined: 10-May 11

Re: Download file after paying?

Posted 22 June 2011 - 08:46 AM

the alternative is to do this manually, get the customer to send you their e-mail and to specify the way of paying, once you receive their payment send them the file as a mail attachment. This will work for you only for a limited amount of customers. If you think you're going to have so much downloads ,that you won't be able to find the time for handling it, ignore my solution (sending an e-mail shouden't take more than 5 mins ,also you can send the same e-mail to multiple recipients at the same time) .
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1