Either you are doing any online business, selling products, providing some kind of services or seeking donations, you will need a reliable online money transaction system. WordPress makes it very simple to do online transaction for any users by allowing PayPal payment option to its websites. In this article, you can learn how to Integrate PayPal Donate Button in WordPress.
There are two ways you can add PayPal to your WordPress.
– Add a Shopping Cart
– Add a PayPal “Buy Now” or “Donate” button
1. Shopping Carts
If you are planning to make e-commerce site where your customers will be buying multiple items at the same time, then what you need is a Shopping Cart in your WordPress site. The good thing is most shopping carts already have PayPal integrated in them, it is very easy to enable PayPal from a shopping cart. Shopping cart can be open source or commercial and comes in a wide range of choices from a simple cart to ones with many advanced features.
2. PayPal “Buy Now” or “Donate” Buttons
If you want a donation button in your site or you want to sell limited number products, then using a PayPal “Buy Now” or Donate button is a great idea. In this article we will see how to integrate a PayPal ‘Buy Now’ or ‘Donate’ buttons in WordPress websites.
How to Integrate PayPal Donate Button in WordPress
If you are using WordPress.org sites, the easiest way to add PayPal donate button is by using some reliable plugins. Sadly for WordPress.com sites you have to add code manually. First of all you will need to create a PayPal account. If you already have a PayPal account simply login to it.
Adding a PayPal Button in WordPress using a plugin
There are tons of plugins that will help you to incorporate PayPal in WordPress. Here is a list of them.
- Quick PayPal Payments
- PayPal Responder
- PayPal Donations
- PayPal Payment Shortcode
- WordPress Simple PayPal Shopping Cart
- PayPal for Woo-Commerce
Among these plugins we will be featuring PayPal Donations plugin since it is popular with 40000+ active installs and high rating of 4.9 out of 5. PayPal Donations is a easy plugin with simple setup. It has a donate now plugin and is easy to integrate .
Installing the PayPal Donations
1. Log in to your admin dashboard . Navigate to add new plugin page by going to Plugins > Add New.
2. Find the plugin search field in the top right section of page and search for PayPal Donations.
3. Among the list of plugin install and then activate the plugin with the icon given in the image below:
You can also manually download the plugin from the plugins official page of Plugin and move the downloaded plugin to your plugins theme folder.
4. Once the plugin is activated you can go to the plugin’s setting page from Settings > PayPal Donations to configure the plugin
Setting Up the plugin
The Plugin’s Setting page comes with two tabs with general and advance settings.
Here is a short description of each option available in the general tab:
- PayPal Account: Here you should enter your PayPal Email or Merchant Account ID. The donation will go directly to this PayPal account.
- Currency: The currency that you want to use for the donation can be selected here.
- Page Style (Optional): If you have designed your own custom page style for the PayPal payment Page, you can mention the name of it here. You can design your Page style from your PayPal account website.
- Return page (Optional): It is something like the Thank You page where Donators are directed after making a successful donation. You can insert the name of your Return page here.
- Amount (Optional): You can set the default amount for the donation. Insert numbers like 10 or 20.24 without any currency symbol.
- Purpose(optional): Here you can define the default purpose for the donation.
- Reference (optional): Here you can enter a default reference for the donation.
- Select Button: Here you can select between PayPal’s three default buttons. If you wish to your own button all you have to do is enter the URL to the customized custom button.
- Country and Language: This is the last option in the general tab. Here you have to select your intended country for using the button with credit card symbols. The buttons will be adjusted to the ones appropriate for the selected country.
On the advanced tab you have some extra settings you can configure.
- Disable PayPal Statistics hides the image that PayPal uses for statistics. A good practice is to load the statistics image. Generally this image is disabled for speed purposes.
- Theme CSS Override: Center Button If the theme you are using do not center form buttons, but you want the Donate button centered, enable this options to center it.
Once you have configured the plugin with your correct information, click the ‘Save Changes’ button to save the settings permanently. You can display the PayPal donate button in two ways.You can insert a shortcode in any post or pages and you can also add the donation widget to the sidebar.
The Donations Sidebar Widget
One more important feature of the plugin is to allow its blog owners to add PayPal Donate button to the sidebar. To add a donation widget to a sidebar go to Appearance -> Widgets. Add the PayPal Donations to the widget area. There are a few optional settings for the widget that you can set.
- Title: Here you can give a title to appear on the widget.
- Text: In this text area you can give a descriptive text to appear above the buttons
- Purpose: Purpose to override the default purpose.
Reference: Reference to override the default reference.
The Donations Widget Shortcode
To add donation widget to any post or page you can use shortcode. The simplest shortcode with all the default settings is
Insert this short code to the desired section of page or post to display PayPal Donate button. Now to use the donations widgets in your themes template file use the following PHP code :
<?php echo do_shortcode('[paypal-donation]'); ?>
Method 2: Manually Adding a PayPal Button in WordPress
If you are using WordPress.com which do not support plugins or if you don’t want to use plugins at all then you can use this manual method to add PayPal button. Start by logging in to your PayPal account and then visiting the PayPal button creation page.
Choose a type from the ‘Choose a button type’ drop-down menu. In our case we are selecting the donation option. And then enter the name of your organization. The field Donation ID is optional which you can leave blank.
After all these settings, click create Button. This will generate some code that you need to copy and paste to your WordPress editor in the desired location where you want the buttons to appear. You can either copy the HTML code in Website tab.
If you are using HTML code from Website tab you can directly copy and paste the code in your desired location of the page or post. Save and publish the page. This will give you a nice looking PayPal button. If you decide to use the email URL then you have to integrate the obtained URL inside a link anchor tag inside href attribute. Here is the code to do this in the right way.
<a href="Your Email URL that you got from PayPal" target="_blank" rel="nofollow"> <img src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" alt="" /> </a>
Replace ‘Your Email URL that you got from PayPal’ inside href attribute with the Email URL you copied earlier. Now copy this entire code and place it in the text editor of desired page or post. You can also paste the code inside a WordPress text widget to add it on your sidebar. This should give you a fully functional donation button.
Also don’t forget to test the button to make sure it links to a your PayPal payment Page. We hope the information in the article was helpful for adding a PayPal donate button in WordPress.
Latest posts by Kantiman Bajracharya (see all)
- What are Different WordPress Theme Licensing Terms? - December 21, 2017
- 4 Tips to Optimize Your WordPress for Social Media Share - November 30, 2017
- What is WordPress? Is WordPress Free? Why is WordPress so popular? - November 22, 2017