How to add PayPal Shopping Cart to a website?


Till date we have seen number of websites which use PayPal.com for accepting payments online. Mostly e-Commerce websites are the ones that have PayPal gateway integration. If our website has a provision for making an online payment with credit card then adding a PayPal payment option widens our customer base because people who don’t want to use a credit card can still make purchases. PayPal is one of the most popular payment gateway services available today. It has over a million active users and has a well defined API called PayPal IPN. Using PayPal’s free shopping cart will help customers purchase multiple items with a single payment. It also provides us to view a consolidated list of all items before purchasing. Shopping cart is a low-cost way for us to accept credit card and bank account payments.

Why PayPal ?

Quick Setup

  • You don’t need advanced programming skills to add a payment button to your site. It takes only fifteen minutes for setup and it is ready for use.
  • Hundreds of shopping carts are pre-integrated.
  • We don’t have pay at all until we receive our first payment.
  • Easy to use customization and integration tools.

Secure Transactions

  • Has a facility of automatic fraud screening (no additional charge) and customizable security filters.
  • It has PCI-compliant standards for data protection.

International Currencies

  • PayPal can accept payments in 22 currencies from 190 countries.

Follow the steps below to add PayPal shopping cart and view cart:

1) First of all we will have to sign up for a PayPal account by accessing the link below:
https://www.paypal.com/mrb/pal=6TUEY37GLM48U

Either select the premier account or Business account as per your need.

2) Log in to Premier or Business PayPal account.

- Click on the Sell tab.
- Click on the Shopping Cart link.
- Specify the name, price, and other details of the item to sell.
- Add more optional information such as shipping, sales tax, and option fields (for size, color, etc.).

3) Click “create” button to generate customized HTML code to add HTML Code for “Add to Cart” and “View Cart” buttons.You can create your own shopping cart payment buttons by altering the HTML code directly.

As illustrated below we need to create an “Add to Cart” button (in this case, to purchase a jewellery for $100)

<form name=”_xclick” target=”paypal” action=”https://www.paypal.com/cgi-bin/webscr” method=”post”>
<input type=”hidden” name=”cmd” value=”_cart”>
<input type=”hidden” name=”business” value=”me@mybiz.com”>
<input type=”hidden” name=”item_name” value=”jewellery “>
<input type=”hidden” name=”amount” value=”100″>
<input type=”image” src=”http://www.paypal.com/images/sc-but-01.gif” border=”0″ name=”submit” alt=”Make payments with PayPal – it’s fast, free and secure!”>
<input type=”hidden” name=”add” value=”1″>
</form>

This code will create an image like this :

add_to_cart

4) To add a View Cart button

<form name=”_xclick” target=”paypal” action=”https://www.paypal.com/cgi-bin/webscr” method=”post”>
<input type=”hidden” name=”cmd” value=”_cart”>
<input type=”hidden” name=”business” value=”me@mybiz.com”>
<input type=”image” src=”https://www.paypal.com/images/view_cart.gif” border=”0″ name=”submit” alt=”Make payments with PayPal – it’s fast, free and secure!”>
<input type=”hidden” name=”display” value=”1″>
</form>

This code will create an image like this :

view_cart

5) When a customer clicks the “Add to Cart” button, a new window will appear listing the contents of the buyer’s shopping cart, including the item just added. To make the purchase, the buyer clicks “Checkout” from this window.

This entry was posted in Tutorial and tagged , , . Bookmark the permalink.

Leave a Reply