Integration Guide

Table Of Contents
The PayPal Shopping Cart – Add to Cart and View Cart Buttons
Sample HTML Code for Add to Cart Buttons
6
296 June 2012 PayPal Payments Standard Integration Guide
value="http://www.kinskards.com/birthday_cards.html">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
onclick=getContinueShoppingURL(this.form)
src="https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif"
alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1"
src="https://www.paypal.com/en_US/i/scr/pixel.gif" >
</form>
See also “Sample HTML Code for View Cart Buttons that Continue Shopping on the Current
Merchant Webpage” on page 302.
Sample HTML Code for Add to Cart Buttons with Discounts
The sample HTML code in this section demonstrates how to specify discounts:
“Sample Code for Add to Cart Buttons with a Flat Discount Amount” on page 296
“Sample Code for Add to Cart Buttons with Multiple Discount Amounts” on page 297
“Sample Code for Add to Cart Buttons with a Discount Percentage” on page 298
“Sample Code for Add to Cart Buttons with Multiple Discount Percentages” on page 298
“Sample Code for Add to Cart Buttons with a Buy One, Get One Free Discount” on
page 299
Sample Code for Add to Cart Buttons with a Flat Discount Amount
The sample HTML code below illustrates a basic Add to Cart button with these features:
An item named “Birthday - Cake and Candle”.
An item price of $5.95 USD.
A $2.00 discount applies to the item.
PayPal calculates tax and shipping based on rates that you set up in your PayPal account.
The buyers PayPal Shopping Cart opens in a separate browser window or tab.
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr"
method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="kin@kinskards.com">
<!-- Specify a PayPal Shopping Cart Add to Cart button. -->
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name"