PayPal Donate Plugin for WordPress
Published by eJone 2 years ago in Click Tech Tags: donate, donation, paypal, plugin, programming, sidebar, wordpress.
This is a plugin for WordPress that adds a small PayPal Donation form on your sidebar. It allows visitors of your site to make a donation or contribution via PayPal, the most popular and largest online payment processing service. Some settings can be changed via the Options Page.
For a while now every (almost) technology blog I came across on the internet has the PayPal Donate button. Sometimes they are located on an article, but most of them they can be found on the sidebar. Obviously I didn’t want to be left out, so I went to seek the code for my own PayPal Donate button.
However, I thought WordPress had a plugin for almost everything and did a quick search. To my surprise, there weren’t any (if there are please let me know so I can correct this). The closest that I found was Patrick Chia’s PayPal Donate Widget Plugin. I must thank him for his creating that plugin. Nonetheless, I’m not ready to play with Widgets yet, so I was still out of luck.
I thought to myself, how hard is it to create a plugin for WordPress? After looking at some sample codes and reading some articles found on WordPress (watch out for this cool video demonstration on creating your first plugin), I decided to give it a shot.
And so, the PayPal Donate Plugin for WordPress was born.
Installation is very straight-forward:
- extract the zip file into your wp-content/plugins/ folder
- activate it in your WordPress Plugins Dashboard
- enter your details in the Options page (make sure you do this!)
- insert code snippet to your sidebar.php
These settings are currently configurable on the Options page:
- PayPal E-mail Address
- Currency
- Donation Reference
- Return URL
- Cancelled URL
- Choice of buttons (the ones in use by PayPal)
Example code snippet:
<h2><?php _e('Tip Jar'); ?></h2>
<?php if (function_exists('ec_paypaldonate')) { ec_paypaldonate(); } ?>
This is my first ever WordPress plugin so please be gentle. The code is still a bit messy, but it definitely works on my installation of WordPress (v2.0.3). It still needs to be thoroughly tested so please don’t blame me if anything breaks! Testers, suggestions and comments are most welcome.
Please report any bugs and support questions in this WordPress forum thread.
Oh, and if you happen to like my plugin, I wouldn’t mind a small donation as well. *cheeky-grin*
Download PayPal Donate Plugin for WordPress here:
wp-paypal-donate-v0.3.zip (12kb)
wp-paypal-donate-v0.2beta.zip (12kb)
Changelog:
-
18 June 2006 (Version 0.3)
- No longer beta.
- Moved currency options from actual form to the Options page.
- Remove 1.00 as an amount selection.
- Removed Yen as a currency selection since 100 Yen works only to about 86 cents.
- Improved Options page, now remembers button and currency selection.
- Added credits to source code
- 15 June 2006 (Version 0.2beta) - Now validates ok on XHTML 1.0.
- 14 June 2006 (Version 0.1beta) - First public Release.
Credits:
- Thanks to Patrick Chia for his PayPal Donate Widget Plugin. It inspired me to develope the non-widget version of the plugin. His version can be found at http://blogates.com/patrick/2006/04/07/paypal-donate-widget-plugin/
- Thanks to Ryan Duff for his WordPress Contact Form plugin. His codes helped me a lot with the development of my first plugin. His plugin can be found at http://ryanduff.net/projects/wp-contactform/
See Also:
Recent Posts:
- The SAPPHIRE Radeon X1950 PRO AGP - Will it fit in a Shuttle G2?
- The SAPPHIRE Radeon X1950 PRO AGP - Long Live AGP!
- Leadtek WinFast 7600GT - Best AGP Video Card for Shuttle XPC?
- Windows XP setup hangs at “Setup is inspecting your computer’s hardware configuration”
- WordPress.org Is Down?
- PayPal Donate Plugin for WordPress
- Synchronise Your Firefox Bookmarks (And More) With Google Browser Sync
- Prevent Accidental Closure of Tabs in Apple Safari
- Firefox 1.5.0.4 Released
- What Is RSS and Why Should You Care?
40 Responses to “PayPal Donate Plugin for WordPress”
-
1 Pingback on Aug 19th, 2006 at 9:18pm
-
2 Pingback on Nov 9th, 2006 at 5:52pm
- 3 Pingback on Nov 16th, 2006 at 4:31pm
-
4 Pingback on Feb 4th, 2007 at 1:56am
-
5 Pingback on Apr 11th, 2007 at 6:01pm
- 6 Trackback on Aug 7th, 2007 at 1:30am
-
7 Pingback on Nov 28th, 2007 at 8:10am
-
8 Trackback on Dec 2nd, 2007 at 11:28am
- 9 Trackback on Feb 6th, 2008 at 1:13am
- 10 Pingback on Feb 20th, 2008 at 6:52am



Hey dude,
Nice plugin, I was looking for exactly this kind of thing a few weeks ago. I’ll give it a try shortly. That said, I have a hard time trusting any website with 8 ads on a page. You are crazy! That just my personal opinion.
Cheers!
Haha! Thanks. I was waiting for somebody to comment on the ads. I promise to reduce them on your next visit.
Hope the plugin works for. Let me know if you have any problems.
Hello,
I’m having a very hard time configuring the options-paypaldonate.php file.
Can you please specify which of the lines needs to be modified, and in what way?
Specifically I’m having a couple problems:
First, this line: $location = get_option(’siteurl’) - Where do i point it to?
Second, I get this error when I click the PayPal button which takes me to this site:
https://www.paypal.com/cgi-bin/webscr
“We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to resolve the problem. If this payment is for an eBay listing, you can contact the seller via the “Ask Seller a Question” link on the listing page. When you have the correct email address, payment can be made at www.paypal.com.”
and Third, the PayPal button does not show up in the sidebar. I thought it was because maybe the image was HotLink protected on the paypal website. But I changed it and put it on my server and still nothing.
Any ideas?
Thanks in advance!
Hi there;
First thanks very much for the Plugin. My theme doesn’t do widgets (I don’t think) so it saves grief.
Now I’m really sorry if this is a bone headed question but I’m nor figuring it out :-/
Where is the output for the “code snippet”? I have everything else installed and the options are configured…but I keep expecting a popup or an email or something with the code for the sidebar: Am I missing something fundamental?
Thanks.
Ed
HaHaHa
Never mind I figured it out….
I’m a dork…
Great PI Thanks!
Hello!
I installed Wordpress on my server, and set up a site. It’s a relly nice piece of software. However, I am missing a piece of functionality, and
couldn’t find a suitable answer for it. Mayou you know a plugin I could use?I need to automatically inserts ads in my posts.And not AdSense ads, but rather HTML snippets defined by me (affiliate links, etc). Let’s say I would insert a tag in my post:
– ad here –
and the plugin would automatically replace it with some HTML code, when the post is displayed on my site.I really don’t need any fancy configuration options etc, just the basic replace functionality.
Do you know a plugin that can handle this?
Is there a way to add the function of keeping track of donations and listing names of donators under the form?
ahhhhhhhhhhhhh, Thanks a lot man. I been trying to code one for me but my php skill seems to be far from functional. THANKS (in big words)
Vielen Dank für das Plugin. Genau sowas habe ich gesucht
Hello,
Just wondering if anyone could help. I did something stupid and started my blog using a numerical archive system, and now I'd like to change it so that the post title is part of the URL for SEO reasons. Is there any Wordpress plugins that anyone knows of that could switch it without sending Googlers to invalid pages? Maybe some sort of redirector to the correct page?
Thanks.
A nice plugin. I wonder, is it possible to add to the plugin the additional functionality provided at PayPal for creating buttons, such as encryption for secure processing, allowing donors to add an optional note, etc.? That would be great. Even so, nice work on this. Thanks very much.
thanx my friend…
really love it!
Is it possible to have a Sidebar Widgets version of this plugin? The code does not seem to work with Widgets
- MENJ
Could someone please explain to a new blogger how to add the code to the Sidebar inside SmartFTP? I see a subfolder for “Sidebar Widget” but no Sidebar.php and it’s impossible to copy and paste the code snippet into the inside of a folder. Help!
MENJ: If you read through my post, there’s a link to the Widgets version of this plugin, where I got my inspiration from.
Acro: Sorry, I’m not to sure how Blogger works. This plugin is for Wordpress only
Can you please tell me how to find the output code? I know it is here somewhere but I am lost.
Thanks!
~Ray
I have been reading and understand that the example code is the output code??? Well Where exactly in sidebar.php do I put the code because I have been trying and trying but no matter where I put it nothing shows up.
Great plug-in. One question …
At least on my system, when I click the donate button and go to PayPal payment form, the email for the customer to donate via PayPal (sign in username and password) is filled in with MY email (the email filled in via options).
This happened even after I rebooted and cleared cookies. Is there something I’m missing? If this is “as designed” how can I leave it blank?
Sorry for the late replies. Been busy with other stuff.
Raymond: Please give me more details. What version of Wordpress are you running? Did you remember to activate it?
TotalBalance: This sounds like an “AutoFill” issue. Are you using Firefox or Internet Explorer?
This paypal file does not work. When you go to the options page and click on the paypal button…a page comes up ‘ERROR 404 FILE NOT FOUND”
Hi, I was wondering what exactly needs to be done to insert code into the sidebar.php. I don’t understand how to access this. I have the program installed and activated and my account changed, but the last step is really making me confused.
I’d appreciate any help. Thanks!
Hi, I was wondering what exactly needs to be done to insert code into the sidebar.php. I don’t understand how to access this. I have the program installed and activated and my account changed, but the last step is really making me confused.
I’d appreciate any help. Thanks!
I love the plugin but, how do you change the text that reads Tip Jar?
We recently installed your plugin wp-paypal-donate-v0.3, but we need certain changes we could not make due to our poor php knowledgement.
Ffirst we would like to add an radio button wher donors choose the currency the want to use, second to eliminate the website field, and third the amount to be donated should be entered by donors.
Hope to hear from you soon.
Best regards,
We recently installed your plugin wp-paypal-donate-v0.3, we use WP 2.3.2, but we need certain changes we could not make due to our poor php knowledgement.
Ffirst we would like to add an radio button wher donors choose the currency the want to use, second to eliminate the website field, and third the amount to be donated should be entered by donors.
Hope to hear from you soon.
Best regards,
Can you please let me know how the “return URL” function is supposed to work? I’ve filled in the desired return URL in the options page for this plug in, but do I need to make additional changes anywhere else? I tested making a donation but I did not return to the page I specified, instead it just went to a pay pal default page of sorts…
Thank for you help.
Mike
Can you please let me know how the “return URL” function is supposed to work? I’ve filled in the desired return URL in the options page for this plug in, but do I need to make additional changes anywhere else? I tested making a donation but I did not return to the page I specified, instead it just went to a pay pal default page of sorts…
Thank for you help.
Mike
Just want to say thanks!
You rule and I hope everyone donate to you.
Just want to say thanks!
You rule and I hope everyone donate to you.
Thanks for the plugin!
Cya!