Integration Guide

Table Of Contents
Website Payments Standard Integration Guide September 2008 337
11
HTML Form Basics for Website
Payments Standard
This chapter describes in technical terms the basic functionality of Website Payments Standard
and its use of HTML Forms. Use the information in this chapter as a guide to writing the
HTML code yourself for Website Payments Standard payment buttons. A wide variety of
HTML authoring tools exist. This guide does not describe all the possibilities.
People who pay you through Website Payments Standard interact with HTML forms and
hidden HTML input variables that you place on your website. When someone clicks a
payment button in an HTML form on a webpage, the form submits the variables and their
values to PayPal. You set the values of the variables to produce the desired effect, such as
invoking the Buy Now, the Donate, the Subscribe, or the PayPal Shopping Cart checkout
experience and various other PayPal features.
N OTE: The PayPal website offers tools that let you create the HTML code for Buy Now,
Donate, Subscribe, and PayPal Shopping Cart buttons. For more information, see
Chapter 1, “Single-Item Payments – Buy Now Buttons”, Chapter 2, “Contribution
Payments – Donate Buttons”, Chapter 3, “Recurring Payments – Subscribe Buttons”,
and Chapter 4, “The PayPal Shopping Cart – Add to Cart and View Cart Buttons”.
Form AttributesACTION and METHOD
The FORM tag includes two required attributes, action and method, which always looks like
this:
<FORM action="https://www.paypal.com/cgi-bin/webscr" method="post">
IMPORTANT: Do not change these values.These attributes are required for all Buy Now
buttons, shopping cart buttons, and Donate buttons.
Hidden Input Variables
HTML input variables in a PayPal Website Payments Standard FORM are always hidden from
the payers view. They have the following general format:
<INPUT TYPE="hidden" name="variableName" value="allowedValue">
The variableName is any of the variables described in Appendix A, “HTML Variables for
Website Payments Standard,” and the
allowedValue is any of the values detailed for those
variables.