Tip:
Highlight text to annotate it
X
Hi my name's Mike Kay from Mersey Internet
and welcome to my
video tutorial number one
How to sell downloadable products
This tutorial will explain how to use Linklok
to sell an eBook
you could apply the method shown here to any downloadable file of course not
just eBooks
so what do you need?
as well as Linklok of course
you'll need a Paypal account
a test PDF file
and of course a suitable website with FTP access
so first thing to do
we need to configure your Paypal account
so i've already logged in
so the first thing to do is to click on, Profile
then in the right hand column
click on IPN preferences
now the screen you see here maybe slightly different
to the one displayed now
because i've been on the screen before
it looks different to the first time you come on it
so I'm going to click Choose IPN settings. You should just click whatever you see
Click the button to enable Receive IPN messages
and then the notification URL
enter the URL to the script
this will be
your website address
followed by
the IPN script name
which is linklokipn.php
and click Save
so now Paypal will call the script
when payment is made
and the script will send an email to the purchaser
that contains links
that will allow them
to download the file they just purchased
as well as an email we really want to take them back to our website
and the way to do this we need to set up
some more settings in Paypal
so again click on profile
and on the right hand column click on
website payment preferences
enable auto return
and set the auto return URL
to the following
the website address
followed by
linklokipnret
.php
now scroll down a bit further to payment data transfer
and enable it
and then go down to the bottom
and click save
now theres a couple of ways of doing the next part but the simplest is to go back into
website payment preferences again
where you've just been
scroll down to PDT
and there you see
a string
of characters
called the identity token
highlight this
and copy it to the clipboard
and that's your paypal account setup
We'll be using this string that you've copied
to insert it into the IPN script
in the next part
if you haven't already done so
extract the Linklok files into a folder on your
computer
you'll see here this script itself called linklokipn.php
and the other file we referenced called linklokipnret.php
you'll also need
the test file you're going to sell sell
which I've called SellMe.pdf
and i'm going upload that now to my webserver
and we need to put it preferably into a folder outside the web root
i'm going to create a folder called forsale
if your hosting doesn't allow you to put files outside your web root
then you should create
a randomly named folder
that would be very hard to guess
this won't be as secure as putting it outside your web root
but it may be sufficient for your project
depends on how important security is to you
so upload sellme.pdf
now before we upload the script we need to make a few changes to it
open it up in any text editor. I'm using Wordpad on a pc
At the top of the file you'll see a number of admin variables
we need to update their value
so the first one is LinklokURL
set list too
your website address
/linklokipn.php
the next one
is PaypalEmail
set this to your primary Paypal email address
the next three
are
information about your website
your company name
and
this will be used typically in the emails that are sent to purchases
purchasers to say where to contact you
in the emails that are sent to
purchasers
you might want to receive a copy of these emails just to check that they
are working properly
put here
the email address where you want these emails to be sent
next one is
LinkKey this is a random string
used by Linklok for encryption purposes
any random string will do
and if you want to good website for generating them I'd suggest grc.com
/passwords.htm
next is the PDT token
this is the string that we copied from our Paypal account
just paste it in here
and finally
we're going to use
Linklok's manual
order entry
facility
to test that things are working okay
so you need to enter an admin password here. you can make up any password you
want
when you finish testing it
set it back to
an empty string
to disable it
one more important thing
at the top of the file you'll see Products products
or if it's not there you need to add it
this describes your
file that you're selling
The first part is any identity string you want to use I've used Id1
next one is a short description of the file
Don't use commas in this description
next is the price
and this may not be the actual price you're selling at on your website
because
you may be using discount vouchers for example
so it may not always be easy to tell what the price is the prices
The price you put in here should be the minimum that you are prepared to accept
and it's only really used as a security check by
Linklok
So if the purchase tries to go through
less than this value
then it will be blocked
as you can see here I have used
two different currencies you don't have to use multiple currencies
you can just
use a single currency
and next is the location of the file you are selling
the filename SellMe.pdf
is in
a folder called forsale
under my
hosting home directory
next parameter just set it to zero It's there for legacy reasons
the next one is how long
the download link will be valid for
that's set to 24 hours so
I can't remember if this is just minutes
or days
err minutes or seconds
anyway I know that 1440 is 24 hours
I'm sure you can work it out better than me
Once you have made these changes
save the file
and upload it
along with link Linklokipnret
to your website
home directory
So now this should all work.
What we'll do now is use the
manual test
money order entry facility
to test
that this works
so if you go to this URL, your website address slash
linklokipn.php
?orderform=1
this should come up
err what was the password I can't remember, pacman
the manual order entry form will now appear apparent
and you should be able to select
your file that you are selling
from the drop down
the only fields you have to fill in
or have to consider filling in
is the email address
that you want the
that you want to use
if you leave this blank
then the form will display the links here on the screen
So if I click Send Links
SellMe.pdf
appears
and if I click on it
there it is
for me to download
I won't do it now
so you test that to test that it works
enter an email address here and click send links
and I've done this already
you should check that you get an email like this address
thanking you for your order
this is the email that will be sent to the purchaser
and in it, it will contain
the link
to download
check that that works
that's proved that it's working
all we need to do now is to
set up a button to use on your own website. A Buy Now button.
so the easiest way
to generate a button is to use Paypal's
button wizard
so if you go into your paypal account
and click on the merchant services
you'll see here under start accepting payments payments
Add a Paypal Button to your web site
so for the purposes of this tutorial we're gonna sell a single item
click on sell single items
choose a button type, Buy Now
itemname
anything you want
for the purposes of this
tutorial anyway
under item ID now this is important
that this matches the ID you used in your Linklokipn script
so we used id1
so I'll set that to id1
the price
uh... as i said before this doesn't have to be the same
what you put in
although it must be greater
than that value
and then just click at the bottom
Create button
it will generate the HTML
for your button
just highlight it, copy it
and paste it into your web site
and that's it
now when the purchaser comes along they click on your Buy Now
button
Paypal is already set up
They'll pay on the Paypal site
Paypal will call the IPN script
which will send them an email
and then return them to your site
where they'll see a link to click on
where they can download it
so they have two ways of downloading the file
directly on your side
and as a backup they will also receive an email
and that's it, I hope you enjoyed my
tutorial, my first one
I'm planning on doing
some more
using more complex features of the Linklok IPN script
such as using mySQL databases
but that's all for this tutorial
so for further information
go back to my website
you'll find details of
future tutorials