homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / Ecommerce
Forum Library, Charter, Moderators: buckworks

Ecommerce Forum

PayPal Integration Steps

10+ Year Member

Msg#: 2695 posted 1:13 pm on Aug 31, 2004 (gmt 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.



WebmasterWorld Senior Member 10+ Year Member

Msg#: 2695 posted 4:54 am on Sep 1, 2004 (gmt 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.

Mr Bo Jangles

10+ Year Member

Msg#: 2695 posted 8:45 am on Sep 1, 2004 (gmt 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:



10+ Year Member

Msg#: 2695 posted 7:17 am on Sep 2, 2004 (gmt 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+ Year Member

Msg#: 2695 posted 10:39 am on Sep 2, 2004 (gmt 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.


10+ Year Member

Msg#: 2695 posted 1:45 pm on Sep 2, 2004 (gmt 0)

Raymond and Bo,



10+ Year Member

Msg#: 2695 posted 4:07 am on Sep 8, 2004 (gmt 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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Ecommerce
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved