Click here to Skip to main content
11,925,896 members (63,819 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


8 bookmarked

How to add a donation button for a Paypal gateway

, 12 Dec 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
Code to add a donation button for Paypal.

Write the below given code into an HTML file where you want to add a donation button.

<form action="" method="post">
    <input type="hidden" name="cmd" value="_xclick"/>
    <input type="hidden" name="business" value=""/>
    <input type="hidden" name="item_name" value="School Fund"/>
    <input type="hidden" name="item_number" value="2011"/>
    <input type="hidden" name="amount" value="50.00"/>
    <input type="hidden" name="no_shipping" value="2"/>
    <input type="hidden" name="no_note" value="1"/>
    <input type="hidden" name="currency_code" value="USD"/>
    <input type="hidden" name="tax" value="0"/>
    <input type="hidden" name="bn" value="PP-DonationsBF"/>
    <input type="image" src="" 
        border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"/>
    <img alt="" border="0" src="" width="1" height="1" />

where input type are fields to have values for your expectations, the name business shows the value for the type of business, item_name shows the type of item, amount for the value of item, and so on ...

And you are done with a button for your Paypal payment gateway.

And for the rest making a change in value for the line <input type="hidden" name="bn" value="PP-DonationsBF"/>,
you can switch between several types of alternatives:

  1. <input type="hidden" name="bn" value="PP-SubscriptionsBF"/>
  2. <input type="hidden" name="bn" value="PP-DonationsBF"/>
  3. <input type="submit" value="PayPal"/>
  4. <input type="hidden" name="bn" value="PP-BuyNowBF"/>
  5. <input type="hidden" name="bn" value="PP-ShopCartBF"/>

Hence your Paypal gateway is ready to face the world of payments.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Technical Lead Erls Corporation
India India
I am Dinesh kumar Choudhary by Name, a software Designer and Developer by Work, a Indian Hindu by Religion, Co-Founder of DSFoundation located at by profession, a Loving husband and a Caring Father by Relation.

I have a blog Website at DSFoundation is the Autonomous body to serve for the management of Local shops located at New Delhi, India. Now a days DSFoundation and its subsidiaries are managed by Erls Corporation, an Another initiative by me and my colleagues, in which i am the another CO-Founder of the Organization. Erls Corporation can be located at

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.151126.1 | Last Updated 12 Dec 2011
Article Copyright 2011 by Denno.Secqtinstien
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid