Integration Guide

Table Of Contents
PayPal Payments Standard Integration Guide June 2012 285
The PayPal Shopping Cart – Add to Cart and View Cart Buttons
Sample HTML Code for Add to Cart Buttons
6
Avoiding Problems With Pasted HTML Code
After you paste the HTML code onto your webpage, ensure that it matches exactly the HTML
code you copied from PayPal. Pasted code may not match the generated code for the following
reasons:
You did not copy all of the generated code.
Your HTML editing tool may have special areas for pasting HTML code and other areas
for pasting display text. Be sure you paste the generated code into a field that accepts
HTML code.
Your HTML editing tool might change some characters in the pasted code.
Sample HTML Code for Add to Cart Buttons
The sample HTML code in this section demonstrates various features of Add to Cart buttons:
“Sample HTML Code for a Basic Add to Cart Button” on page 285
“Sample HTML Code for Add to Cart Buttons With Product Options” on page 286
“Sample HTML Code for Add to Cart Buttons that Open the Shopping Cart in the
Merchant Window” on page 290
“Sample HTML Code for Add to Cart Buttons that Continue Shopping on the Current
Merchant Webpage” on page 293
“Sample HTML Code for Add to Cart Buttons with Discounts” on page 296
To protect against malicious users tampering with the HTML code for your Add to Cart
buttons and submitting fraudulent payments, see “Securing Your PayPal Payments Standard
Buttons” on page 337.”
IMPORTANT: Organizations with significant payment volume are required to take
precautions on securing PayPal 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:
An item named “Birthday - Cake and Candle”.
An item price of $3.95 USD.
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.