Creating a Simple PayPal-Based Storefront
One of the things I've been doing in my spare time lately is
working on the Skyline High
School Class of 1987 Reunion web site. One of the apps that I
have written (from the ground up) allows alumni to send their
confirmations (or regrets) on-line. If it is a confirmation being
sent, then I display a "Buy It Now" PayPal button to allow the
person to pay with PayPal if he/she so desires.
So, in order to do this, I created a set of products that include
all the combinations of confirmation possibilities (with their
respective price points) - five products in all. This is pretty
easy for anyone to do, and you don't need a shopping cart... I
just used the
"Buy It Now" buttons.
What I wasn't aware of is the elaborate "sandbox" system, called the
PayPal Development
Center, that PayPal has set up to allow any user to test
out the payment processing system with any set of pre-configured
products. It is very handy and allows a developer to get all the
kinks of of the system while using quasi-cash, instead of the real
stuff.
PayPal also allows you to redirect the buyer back to a
specified URL after the transaction has been completed.
It is pretty easy to set up. Furthermore, there is a handy
Payment
Data Transfer mechanism that PayPal has put into place. With
just a little help from the LWP::UserAgent and Crypt::SSLeay perl
modules, I am able to retrieve a whole bunch of information about
the buyer's transaction such as the payment type, payment status,
payment date, payment gross, and payment fee after the buyer has
been redirected back to my script.
Contact me for source code if interested.
:: Posted by rus on Wed, 14 Mar 2007 11:19 pm
:: Filed under /tech
|