Integration Guide
Table Of Contents
- Preface
- How Website Payments Standard Works
- Using Your Merchant Account Profile and Tools
- The Account Profile Summary
- Branding PayPal’s Payment Pages
- Streamlining Purchases with Website Payment Preferences
- Blocking Certain Kinds of Payment
- Adding Your Credit Card Statement Name
- Getting Customer Contact Telephone Numbers
- Language Encoding Your Data
- Multi-User Access to Your PayPal Account
- PayPal-Supported Currencies
- Issuing Refunds
- Single-Item Payment: Buy Now and Donations
- Multiple-Item Payment: Shopping Cart
- Encrypted Website Payments
- Testing in the PayPal Sandbox
- Website Payments Standard HTML FORM Basics
- Website Payments Standard HTML Variables
- Country Codes
- Index
Website Payments Standard HTML FORM Basics
Prepopulating FORMs
7
94 November 2005 Website Payments Standard Checkout Integration Guide
The value of currency_code must be a code from Table 2.2, “PayPal-Supported Currencies,
Currency Codes, and Maximum Transaction Amounts” on page 56.
NOTE: If currency_code is not included, the default currency is USD.
URL-Encoding Variable Values
Variables such as return, cancel_return, image_url require a URL as their values. You
must ensure that these values are URL-encoded before you pass them to PayPal. URL-
encoding is the substitution of characters required in URLs with characters that will not be
misinterpreted by web servers. For example, a colon character is replaced with the characters
%3A.
Prepopulating FORMs
Account Optional (also called Website Payments Express) allows you to accept payments
from customers without a PayPal account. However, checking out with PayPal is often faster
than forcing the customer to reenter information that is already stored on PayPal. For repeat
purchases, it is to your advantage to get your customers to create a PayPal account.
During a payment transaction, you can prepopulate a FORM by including HTML input
variables specifically for this purpose. A complete description of these variables is in
Table A.7, “HTML Variables: Prepopulating PayPal FORMs or Address Overriding” on
page 103.
IMPORTANT:The value of the cmd variable must be _ext-enter, and you must include
the redirect_cmd variable, the value of which must be _xclick.
Sample HTML for FORM Prepopulation
The following sample HTML shows the optional prepopulation fields with the required
variables in payment buttons. The field entries must be dynamically generated by your website
and included in the URL to which your customers are sent when they make a PayPal payment.
EXAMPLE 7.1 HTML for FORM Prepopulation
<form action=”https://www.paypal.com/cgi-bin/webscr” method=”POST”>
<input type=”hidden” name=”cmd ” value=”_ext-enter”>
<input type=”hidden” name=”redire ct_cmd” value=”_xclic k”>
<input type=”hidden” name=”business” value=”seller@designerfotos.com”>
<input type=”hidden” name=”item_name” value=”hat”>
<input type=”hidden” name=”item_number” value=”123”>
<input type=”hidden” name=”amount” value=”15.00”>
<input type=”hidden” name=”first_ name” value=”John”>
<input type=”hidden” name=”last_n ame” value=”Doe”>
<input type=”hidden” name=”addres s1” value=”9 Elm Street”>