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
HTML Samples
PayPal Shopping Cart HTML and Variables
A
138 May, 2005 Merchant User Manual and Integration Guide
Shopping Cart Variables
The Shopping Cart variables are the same as the Buy Now and Donation variables. The
following table lists all of the variables that are specific to the Shopping Cart Button.
For more information on the additional variables, please to the HTML and Hyperlink
Variables section of the PayPal Buy Now Buttons HTML Code and Variables section of
Appendix A.
Adding PayPal Checkout To Your Third-Party Shopping Cart
Required Variables
The code for your PayPal post requires the following three hidden variables and an image as
the form submit:
This means that the minimum required code for your post to PayPal will look like this:
<form action=”https://www.stage1b.paypal.com/cgi-bin/webscr” method=”post”>
<input type=”hidden” name=”cmd” value=”_cart”>
<input type=”hidden” name=”upload” value=”1”>
<input type=”hidden” name=”business” value=”franck-reg@paypal.com”>
<input type=”hidden” name=”item_name_1” value=”Item Name1”>
<input type=”hidden” name=”amount_1” value=”1.00”>
<input type=”hidden” name=”item_name_2” value=”Item Name2”>
<input type=”hidden” name=”amount_2” value=”2.00”>
<input type=”submit”” value=”Upload Cart”>
</form>
Additional Variables
The additional variables that PayPal offers to customize your form post are the same as the
additional variables for Buy Now and Donations.
TABLE A.2 Shopping Cart Variables
Name Status Description
Character
Length
handling_
cart
Optional Single handling fee to be charged cart-wide. If
handling_cart is used in multiple Add to Cart buttons,
the handling_cart value of the first item will be used.
T
ABLE A.3 Third-Party Shopping Cart Variables
Name Description
business Email address on your PayPal account.
item_name Name of the item (or a name for the Shopping Cart).
amount Price of the item (the total price of all items in the Shopping
Cart).