If you are like me and 95% of the population that has a website, you use WordPress. Well what if you want to put a “Donate” button on your site? Sounds easy right? Wrong. When you place Paypal’s HTML into WordPress and publish the page, you will see a button, but when clicked, all that comes up is an error.
Why is this?
The reason is because Paypal hates you. But here is how to get around that problem. Instead of calling their customer support and asking them how to get the buttons to work, because they are trained not to help you and act like they have never heard this problem before, when in fact it is every other phone call, just do what I did:
Step 1: Open Your Web Page for Editing. Open the file to which you will add the Donate Button.
Step 2: Retrieve the HTML Code for a Donate Button.
On the button creation page, select the “Donations” button option to start creating your button.
In the “Organization name/service” field, type in the purpose for the donation or the name of your organization.
Optional – The “Donation ID” field can be used to help you track donations, but isn’t needed.
Optional – You can use the “Customize text or appearance” option to make the button smaller, remove the credit card logos, or even use your own custom image instead, such as your organization’s logo. If you use your own image, it must already be hosted on its own URL.
Choose the currency you want to use to accept donations. By default it is set to USD.
For “Contribution amount” you can either let donors enter any amount they choose, or request a fixed amount.
By default, payments are sent to the PayPal account that you used to create your button and are only identifiable by an email address or by a secured merchant account ID – this helps to keep your account’s email address safe and secure. It is recommended that you keep the default “Use my secure merchant account ID” option so that your email address will not be exposed within the button code.
Click “Create Button” to save your button and generate the code you need to add it to your website.
You will need to copy the code in order to place it on your website. Click “Select Code” underneath the box containing the HTML. This will highlight all of the HTML for you.
Step 3: Paste the HTML Code into your WordPress page or post.
The code will look something like this:
<form action=”https://www.paypal.com/cgi-bin/webscr” method=”post” target=”_top”>
<input type=”hidden” name=”cmd” value=”_s-xclick”>
<input type=”hidden” name=”hosted_button_id” value=”JECT6YKLFA7C6″>
<input type=”image” src=”https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif” border=”0″ name=”submit” alt=”PayPal – The safer, easier way to pay online!”>
<img alt=”” border=”0″ src=”https://www.paypalobjects.com/en_US/i/scr/pixel.gif” width=”1″ height=”1″>
That code will not work and return and error message.
To make it work, take the following value above “JECT6YKLFA7C6″, and put it into the following code:
<a href=”https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JECT6YKLFA7C6″><img src=”https://www.paypal.com/en_US/i/btn/btn_donateCC_LG_global.gif” border=”0″/></a>
Now your donate button works in WordPress!
Or you can spend a few hours learning how this plugin works.