User's Manual
Table Of Contents
- Preface
- Introduction
- PayPal Payments Overview
- Getting Started
- PayPal Account Optional
- Creating Buy Now and Donation Buttons
- Creating Shopping Cart Buttons
- Adding PayPal to Your Third- party Shopping Cart
- Custom Payment Pages
- Calculating Shipping, Handling, and Tax
- Creating Customer Contact Telephone
- Auto Return
- Backend Integration - Payment Notifications
- Using Multiple Currencies
- Language Encoding for Your Data
- Testing
- Processing eChecks
- Security
- HTML Samples
- IPN and PDT Variables
- About These Tables of Variables
- test_ipn Variable in Sandbox
- IPN Variables in All Posts
- Buyer Information
- Basic Information
- Advanced and Custom Information
- Shopping Cart Information
- Currency and Currency Exchange
- Auctions
- Mass Payment
- Subscriptions Variables
- Dispute Notification Variables
- PDT-Specific Variables
- Country Codes
Merchant User Manual and Integration Guide May, 2005 137
HTML Samples
PayPal Shopping Cart HTML and Variables
A
PayPal Shopping Cart HTML and Variables
PayPal Shopping Cart HTML
Rather than creating a separate button for every single item you wish to sell with the PayPal
Shopping Cart, you can manipulate the Add to Cart HTML code to create different Add to
Cart buttons.
Standard Add to Cart HTML
The following HTML shows the output of a generic Add to Cart button (several optional
fields are shown):
IMPORTANT:You can change the values for any of the variables, with the exception of the
first two lines:
<form target="paypal" action="https://www.paypal.com/cgi-
bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
These lines are required and must not be changed.
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="nora-alice@paypal.com">
<input type="hidden" name="item_name" value="Baseball Hat">
<input type="hidden" name="item_number" value="12345">
<input type="hidden" name="amount" value="15.00">
<input type="hidden" name="cn" value="How Did You Hear About Us?">
<table>
<tr>
<td><input type="hidden" name="on0" value="Color?">Color?
<select name="os0">
<option value="Red">Red
<option value="Green">Green
<option value="Blue">Blue</select></td>
</tr>
</table>
<input type="image" src="https://www.paypal.com/images/x-click-but22.gif" border="0"
name="submit" alt="Make payments with PayPal - it’s fast, free and secure!">
<input type="hidden" name="add" value="1">
</form>