Integration Guide

Table Of Contents
Website Payments Standard Integration Guide September 2008 63
Single-Item Payments – Buy Now Buttons
Sample HTML Code for Buy Now Buttons
1
<!-- Provide a dropdown menu option field. -->
<input type="hidden" name="on0" value="Type">Type of sauce <br />
<select name="os0">
<option value="Select a type">-- Select a type --</option>
<option value="Red">Red sauce</option>
<option value="Green">Green sauce</option>
</select> <br />
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif"
alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1"
src="https://www.paypal.com/en_US/i/scr/pixel.gif" >
</form>
The sample code above produces the following result on your webpage:
Paste the code onto your webpage below an image or a text description of the item.
Sample Code for a Buy Now Button With Product Options With Prices
The sample code below illustrates a basic Buy Now button with a dropdown menu of product
options that have separate prices for each option. Only one of the dropdown menus in the set
product options that your Buy Now button offers can have prices.
Product options with prices specify the prices in two places:
z The dropdown menu displays the prices for each option – buyers see the prices they pay for
each option.
z A list of hidden HTML variables repeats the prices for each option – PayPal uses these
prices to charge buyers for the options they choose.
Dropdown menus with option prices use the following variables:
z currency_code – sets the currency for option prices
z item_index – identifies which dropdown menu of product option has prices
z option_select* and option_amount* – repeats the prices for each option
N OTE: You cannot specify item IDs for production options with prices to have PayPal track
inventory for your item. PayPal can track inventory by product option only for buttons
that you save in your PayPal account.
<form action="https://www.paypal.com/cgi-bin/webscr"
method="post">
<!-- Identify your business so that you can collect the payments. -->