Adding a PayPal Donate Now to Site

Adding a PayPal "Donate Now" button to your site is really easy. All you need is a paypal account, once logged in you can use the helpful wizard that walks you through the very quick and easy process.

The Wizard

To create your donate now button (it's actually a form), do this to get to the automated wizard.

  1. Login to PayPal.
  2. Goto the Merchant Services Tab
  3. Click the Create payment buttons for your website image
  4. Now follow through the wizard

Choose payment type and button details

Customize advanced features

Once you are finished hit the Create Button button to get the HTML code of the button, which you then paste into your site.

Get the HTML

Now just grab the HTML for pasting into your site.

Finally, Clean up the HTML

For some reason the wizard gives you old HTML instead of XHTML, so you will need to convert it to XHTML by ending with a /> instead of just >, and then wrapping all the elements within the form inside a div.

HTML Before

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="LF9N4MHDAAGCY">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

XHTML After

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<div>
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="hosted_button_id" value="LF9N4MHDAAGCY" />
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" />
<img alt="" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1" />
</div>
</form>

More Info

Web Design form PayPal

Comments