Integration Guide

Table Of Contents
Website Payments Standard Integration Guide September 2008 239
The PayPal Shopping Cart – Add to Cart and View Cart Buttons
Sample HTML Code for View Cart Buttons
4
Sample HTML Code for a View Cart Button
View Cart buttons contain no payment information, so you do not need to take on precautions
on securing them.
The value for the business variable must match a confirmed email address on file with your
PayPal account, and it must match the value that you used for the business variables on your
Add to Cart buttons.
<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 View Cart button. -->
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="display" value="1">
<!-- Display the View Cart button. -->
<input type="image" name="submit" border="0"
src="https://www.paypal.com/en_US/i/btn/btn_viewcart_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>
The sample code above produces the following result:
Paste the code onto the pages or your website wherever you want buyers to click to view the
contents of their PayPal Shopping Carts and begin the checkout process.
Sample HTML Code for a View Cart Button That Opens the Shopping Cart
in the Merchant Window
By default, when buyers click View Cart buttons, the PayPal Shopping Cart opens in a
separate browser window.You can simplify the shopping experience for you buyers by
opening the PayPal Shopping Cart in the same browser window that displays the pages of your
website.
The sample HTML code below for a View Cart button illustrates how to open the PayPal
Shopping Cart in the same browser window as the merchant website.
<form target="_self" action="https://www.paypal.com/cgi-bin/webscr"