Integration Guide

Table Of Contents
HTML Form Basics for Website Payments Standard
Overriding Addresses Stored With PayPal
11
342 September 2008 Website Payments Standard Integration Guide
Overriding Addresses Stored With PayPal
For people who already have PayPal accounts and whom you already prompted for a shipping
address before they choose to pay with PayPal, you can use the entered address instead of the
address the person has stored with PayPal. Set the address_override variable to 1, as in
the following example:
<INPUT TYPE="hidden" name="address_override" value="1">
You must also include FORM variables that contain the person’s address information, as
detailed in “HTML Variables for Prepopulating PayPal Checkout Pages” on page 361.”
The payer is shown the passed-in address but cannot edit it. No address is shown if the address
is not valid, such as missing required fields like country, or if the address is not included at all.
For a detailed description of how overriding the address and other settings affect the PayPal
billing and shipping addresses, see Appendix B, “Address Handling (U.S. Merchants Only).”
Sample HTML for Overriding Addresses Stored With PayPal
The following HTML code shows the address_override variable in conjunction with the
prepopulation variables for overriding a payers address that is stored with PayPal.
EXAMPLE 11.2 HTML for Overriding Addresses Stored With PayPal
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="seller@designerfotos.com">
<input type="hidden" name="item_name"
value="Memorex 256MB Memory Stick">
<input type="hidden" name="item_number" value="MEM32507725">
<input type="hidden" name="amount" value="3">
<input type="hidden" name="tax" value="1">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<!-- Enable override of payer’s stored PayPal address. -->
<input type="hidden" name="address_override" value="1">
<!-- Set prepopulation variables to override stored address. -->
<input type="hidden" name="first_name" value="John">
<input type="hidden" name="last_name" value="Doe">
<input type="hidden" name="address1" value="345 Lark Ave">
<input type="hidden" name="city" value="San Jose">
<input type="hidden" name="state" value="CA">
<input type="hidden" name="zip" value="95121">
<input type="hidden" name="country" value="US">
<input type="image" name="submit" border="0"