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
298 June 2012 PayPal Payments Standard Integration Guide
<input type="hidden" name="discount_amount2" value="0.20">
<input type="hidden" name="discount_num" value="4">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
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>
Sample Code for Add to Cart Buttons with a Discount Percentage
The sample HTML code below illustrates a basic Add to Cart button that applies a 10%
discount. This discount applies only to the first item regardless of the quantity purchased.
<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"
value="Birthday - Cake and Candle">
<input type="hidden" name="amount" value="3.95">
<input type="hidden" name="currency_code" value="USD">
<!-- Specify the discount amount that applies to the item. -->
<input type="hidden" name="discount_rate" value="10">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
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>
Sample Code for Add to Cart Buttons with Multiple Discount Percentages
The sample HTML code below illustrates a basic Add to Cart button that charges the normal
price for the first item and applies a 10% discount for the next 9 items.