The php script will reside on my website <[login to view URL]>
which is running a Linux Server, hosted by [login to view URL]
There will be no human intervention and
the php script will be running 24/7.
Customers will make a call to the php script on the website,
giving a parameter number, which defines the Book Seller.
They will make a single PayPal payment, to the Book Seller,?
[for which I will determine the amount].?
and for which they will be buying a large quantity of ebooks and software,
plus they will get two customised ebooks, set up for them to give away their customised free ebooks to their prospects, [from another website].
Each purchase will generate a new entry in? the MySQL database,
with a new unique book number.
## Deliverables
The first task is to examine the format of the call,
which should be of the form [[login to view URL]][1]
where NNNNN is a digital integer parameter. [eg. 1017]
The value of the parameter must be greater than 998 and
less than or equal to [[login to view URL]][2]
If the parameter is incorrect then give the message
"Incorrect Parameter" and abort.
Otherwise pull in first_name, last_name, active_email, paypal_email.
from a screen.
[I will provide a working script which does most of this,
needing a few line edits only.]
load the key field book_number in the MySQL database
with the parameter number and read in one record.
[This will be the record for the Book Seller.]
pick up the field paypal_email and use it set up a PayPal call
to take a fixed amount which I will specify - [initially set this to $67].
If the PayPal call fails, abort with a message "Transaction failed".
If the transaction is OK, increment [[login to view URL]][2],
and display a message "To give away your free ebooks -
send your customers or go yourself to [[login to view URL]][3]"
[where ZZZZZ is the value in [[login to view URL]][2]],
then display a download list which I will specify.
Take the value in [[login to view URL]][2] and
load it into the key field book_number in the MySQL database,
to start a new record.
Given the data from the user input screen,
load the fields in the MySQL record with
first_name, last_name, active_email and paypal_email,
load book_flag field with "0",
load sell_date field with date,
load the seller_number field with the parameter value.
Write the new record to the mySQL database.
using the active_email address from the mySQL database,
send an email confirming the ebooks giveaway link above
plus the download list I will specify.
From the working script given for the screen input,
generate two emails to be sent to
<join2@[login to view URL]> and <join@[login to view URL]>
End of script...