Integration Guide

Table Of Contents
PayPal Payments Standard Integration Guide June 2012 99
Contribution Payments – Donate Buttons
Sample HTML Code for Donate Buttons
2
Sample HTML Code for Donate Buttons
The sample HTML code in this section demonstrates various features of Buy Now buttons:
“Sample HTML Code for a Basic Donate Button” on page 99
“Sample HTML Code for a Donate Button With a Fixed Contribution Amount” on
page 100
To protect against malicious users tampering with the HTML code for your Donate buttons
and submitting fraudulent contributions, see “Securing Your PayPal Payments Standard
Buttons” on page 337.”
IMPORTANT: Organizations with significant payment volume are required to take
precautions on securing PayPal Payments Standard buttons.
Sample HTML Code for a Basic Donate Button
The sample HTML code below illustrates a basic Donate button where donors enter their own
contribution amount during checkout. The code uses the currency_code variable to set the
currency for the contribution amounts that donors enter.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business"
value="donations@kcparkfriends.org">
<!-- Specify a Donate button. -->
<input type="hidden" name="cmd" value="_donations">
<!-- Specify details about the contribution -->
<input type="hidden" name="item_name" value="Friends of the Park">
<input type="hidden" name="item_number" value="Fall Cleanup Campaign">
<input type="hidden" name="currency_code" value="USD">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypal.com/en_US/i/btn/btn_donate_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: