Integration Guide

Table Of Contents
Website Payments Standard Integration Guide September 2008 251
Third-Party Shopping Carts – The Cart Upload Command
Integrating PayPal with Third Party Shopping Carts
5
Setting the Tax for the Entire Cart
Use the tax_cart variable to specify a tax amount that applies to the entire transaction,
rather than to individual items. The tax_cart variable overrides any per-item tax amount
specified with tax_
x.
Setting the Shipping Charge for the Entire Cart
Use the shipping variable to specify the total amount of shipping charge for the entire cart
and its payment transaction. The value of shipping is used for the shipping charges,
regardless of the merchant’s profile-based shipping rates and rate basis.
Setting the Weight for the Entire Cart
Use the weight_cart and weight_unit variables to specify the total weight of the cart, if
the merchant’s profile-based shipping rates are configured with a basis of weight. The
weight_cart variable overrides any per-item weights specified with weight_x.
Passing the Aggregate Shopping Cart Amount to PayPal
You can aggregate your entire shopping cart and pass the total amount to PayPal. You must
post a single item_name_1 for the entire cart and the total price of the cart contents in
amount_1 as though it were a purchase of a single item.
N OTE: One drawback with passing aggregate cart information is that buyers do not see the
individual items in their order on the PayPal payment pages.
The following HTML is identical to “HTML for Passing Individual Item Detail to PayPal” on
page 250 except the individual items amounts and item names are aggregated into a single
amount and a single item.
EXAMPLE 5.2 HTML for Aggregate Cart Detail to PayPal
<form action="https://www.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="seller@designerfotos.com">
<input type="hidden" name="item_name_1" value="Aggregated items">
<input type="hidden" name="amount_1" value="3.00">
<input type="submit" value="PayPal">
</form>
Securing Your Shopping Cart
After you have customized you third party shopping cart, protect against malicious users
tampering with the button code and submitting an incorrect charge by using one of the