Welcome to WebmasterWorld Guest from

Forum Moderators: buckworks

Message Too Old, No Replies

PayPal Integration Steps

1:13 pm on Aug 31, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Jan 27, 2004
votes: 0

I was wondering if someone could give me a basic break-down on PayPal integration. I'm considering it and I need to know if it can fit in my developpemnatl scheme.
4:54 am on Sept 1, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 16, 2004
votes: 0

I was against using PayPal for many years, until they recently added the ability for shoppers to pay via PayPal and not have a PayPal account.

Using the new "PayPal shopping cart" (buttons) you can very easily integrate PayPal payment processing into nearly anything from a full blown shopping cart, to email invoices, to custom buttons to display with one of a kind items.

I have recently written a shopping cart (Perl/CGI) script that generates the [Add to Cart], [View Cart] and [Checkout] buttons dynamically. It's very simple to do. I have also recently begun sending email invoices with PayPal payment buttons... nice, simple, easy to understand.

The rates aren't bad either... no monthly merchant account fees... if you don't make money you don't pay them anything.

8:45 am on Sept 1, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:May 4, 2003
votes: 0

PayPal has a very active developers group, and both they and separately, PayPal, have a lot of info about working with PayPal.
I suggest you mosey on over to the Developer's Forum and check out everything that is on offer:


7:17 am on Sept 2, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 16, 2004
votes: 0

The PayPal interface is a hosted one. There are two basic parts: 1) generating the payment button to insert into your checkout process and 2) writing a handler to process the IPN, the PayPal callback (HTTP POST) mechanism that transmits payment details to you.
10:39 am on Sept 2, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 8, 2003
votes: 0

It is much easier than you think. All you need is a script that parse the data of your own shopping cart and generate the form data needed for paypal.

For a typical cart, you'll need these variables:


where [x] is the index of the number of items contained in your cart. This is pretty much it.

IPN is just a string that paypal passes to your script. Just take the string and break it down and do whatever you want with it. Most people just take the quantity associated with the item, and deduct from your product DB. You can also use it as a trigger to email your customers about the status of the payment and such.

Another note: I find it easier to "package" your cart into an order "object", so both paypal and your credit card payment can use the same object in the check out process. This makes further update much easier and you don't need to manage 1 set of scripts for paypal and another set of scripts for credit card.

1:45 pm on Sept 2, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Jan 27, 2004
votes: 0

Raymond and Bo,


4:07 am on Sept 8, 2004 (gmt 0)

New User

10+ Year Member

joined:Dec 30, 2003
votes: 0

Paypal's IPN system is fantastic. I integrated it onto my site a few months ago and it's been extremely reliable and convenient.

I first went to the developer site and downloaded all the related PDF documentation. I printed these out, put them in a binder, and spent a day carefully reading through them. Then I spent half a day designing how it would integrate with my system, and another day writing a PHP script that would be my IPN processor. Paypal POSTS to this script whenever a payment (or refund) is made. It's a complex script that has nearly dozen steps, but once made it is secure and reliable.

Next, I created a personal account and sent about a dozen $1.00 test payments (which I later refunded). This is what they recommend, and it allowed thorough testing of the system. Now, I can collect credit card payments and issue refunds and my site user's accounts are automatically updated to reflect the change. All I do is read the email notices from the script to make sure everything went okay.


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members