Integration Guide

Table Of Contents
Website Payments Standard Integration Guide September 2008 229
The PayPal Shopping Cart – Add to Cart and View Cart Buttons
Sample HTML Code for Add to Cart Buttons
4
To protect against malicious users tampering with the HTML code for your Add to Cart
buttons and submitting fraudulent payments, see Chapter 6, “Securing Your Website Payments
Standard Buttons.”
IMPORTANT: Organizations with significant payment volume are required to take
precautions on securing Website Payment Standard buttons.
Sample HTML Code for a Basic Add to Cart Button
The sample HTML code below illustrates a basic Add to Cart button with these features:
z An item named “Birthday - Cake and Candle”.
z An item price of $3.95 USD.
z PayPal calculates tax and shipping based on rates that you set up in your PayPal account.
z 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"
value="Birthday - Cake and Candle">
<input type="hidden" name="amount" value="3.95">
<input type="hidden" name="currency_code" value="USD">
<!-- 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 HTML Code for Add to Cart Buttons With Product Options
When you add production options to your Add to Cart buttons with HTML code that you write
yourself, you can have a maximum of 10 product options, each with their own sets of choices.
The options can be either dropdown menus or text boxes. Only one of the dropdown menu
options can have options with prices.