How to sell a download?

They have: 4 posts

Joined: Feb 2006

I'm very new to web work but I've been making my way through slowly...

I am building a site using Joomla (finishmyphoto.com) where I will offer photo retouching services. People will upload their photo to me (that part is done outside of Joomla and wrapped in, and it works!!)

After I am finished with the photo I would like to notify the customer and provide a link to a page that has the photo with a "buy" button linked to paypal. After they buy it, they are allowed to download the image.

It doesn't really matter to me if this is done in Joomla or even a third party service as long as it is easy for the customer to buy.

Does anyone know of a way that I can do this and integrate it into my website?

She has: 31 posts

Joined: Jan 2006

There are numerous ways you could accomplish this.

Being a PHP buff, I'll tell you how I'd do it.

Have the photos uploaded to a specific directory.
Block direct access to this directory via chmod or .htacess.
Have a PHP file in the same directory which can access the files, then re-generate them.
Require a password/access code to the PHP file (issued by PayPal IPN).

After reviewing what I've written, that seems overly complicated. Hopefully someone else will have a much simpler approach.

They have: 4 posts

Joined: Feb 2006

Okay, all of that I can figure out with the exception of the paypal IPN. Would paypal send this information directly to the customer in an email? I'm assuming the IPN has some way of responding to a script on my server telling it that the charge went through????

She has: 31 posts

Joined: Jan 2006

When your customer clicks 'Continue' on the last page of their paypal transaction the IPN script on paypal.com sends your chosen webpage (yoursite.com/yourpage.php) the word FAILED or SUCCESS along with all the data of the transaction (amount payed, buyers email/country/state, etc).

You then use that information to do something. For example if they've payed $2 you give them access to the download twice, if they've payed $4 you give them access 4 times, whatever.

In my example I say issue a random password to the user. Keep this password along with their username in your database and allow access to the file for that user/pass.

Busy's picture

He has: 6,151 posts

Joined: May 2001

Also be sure to put a watermark (like 'sample') across your image or you may not get paid

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.