How to integrate a payment gateway into your WordPress website for donations without using woocommerce
Hey guys today I will explain how to integrate a payment gateway into your WordPress website for donation purposes. I was searching this for a long time but always end up with plugins which were using Paypal or stripe only. So the problem with them was that they mostly accept credit cards or their specific accounts but I wanted something generic with all the available payment options like credit card, debit card and net banking. And also I was looking something with Indian currency option preloaded but Paypal does not support this. And most of the available plugins with all these options were dependent on woocommerce so we can use them only if we have a woocommerce plugin preinstalled, but we might want to add a donation option to a normal WordPress website also which is not using woocommerce.
So finally I found a very beautiful and elegant plugin designed exclusively for this purpose only and which can be live instantly. So let's introduce you to Give . Give is designed exclusively for donations only. The most awesome thing with Give is that this can be integrated with a lot of gateways so you will have a lot of options to choose according to your requirement and budget and also Give offers some bundle option which you can also opt if you prefer to have more than one gateway option for payment.
Give also maintains a very nice documentation where you can find all the resources that you might need for integrating Give with any payment gateway. They also offer you a lot of control on the donation form that will be showing on your website after you create one using Give. They offer most of the popular form styles, for example, you can choose to have your donation form as a pop-up modal or reveal it on a click or always appended and some other custom styles.
One more awesome feature about Give is that after every payment donor will get a very nice Email with the payment receipt and a thank you note. You will also get an admin page with all the payment history so you can always have a track of all your payment from your website only without any need to log into your payment gateway account.
I recently integrated this with a WordPress website so you can try this yourself. The gateway being used here is payumoney and it took me just about an hour to make my first donation after I started integrating.
So let's have a look at all the steps that you need to follow to integrate this in your website.
1. Download and activate Give plugin in your WordPress website either by downloading the plugin and uploading this to your website or else by directly from the admin panel of your website.
2. After your plugin is active you can add your payment form in your website for testing.
3. Click on the Donations menu in the side bar and choose Add Form option.
4. Now enter the form title and choose the single level or multilevel depending on your requirement and then give the amounts and all the other texts that you want to show in your form.
5. In the form display, you can choose which form style you want and also you can give a custom text to the submit buttons and all.
6. In the Donation goal option you choose to have some goal like how much you want to collect, this will be very useful in some fundraising campaigning.
7. In the form content section you can choose to show some custom messages below or above the form in your page.
8. Finally, you can also opt to have a terms and condition clause in your form.
9. After you save your form you will get a short-code that you can paste on your page to display form.
So this was all about how you can add the form to your website page but the main thing is integrating this with a payment gateway so that actual payment can take place. There are a lot of payment gateways available but for donation purposes obviously you will be wishing for something with no activation charge and no annual fees so now here comes the payumoney as your saviour.
They only charge 2% of each transaction and minimum amount for a transaction to take place should be 10 rupees, so this is so awesome and best suited for donations.
Now in order to use this, you must create an account on payumoney which is very simple. After you have created your account on payumoney by filing all the necessary information you will get three things:
- Merchant Key
- Merchant Salt
Until now everything was free so now we will be spending for the first and last time in order to activate our gateway and make this fully functional.
We need to buy payumoney add-on form the Give website which is required for integrating Give with payumoney. You can buy it easily from here. They have few plans like for a single site, multiple sites so buy the one which suits you the most. After you are done with the payment you will get an email from Give with your license key and a link to download the payumoney add-on.
After downloading the payumoney plugin you need to follow these final steps in order to get this working:
1. Add the payumoney add-on that you have downloaded from the download link into the admin panel upload new plugin section.
2. Now from your admin panel side bar go to your Donations -> Settings and click on the license tab and add your license key that you got after buying the plugin.
3. Now go to Payment Gateways tab and click on payumoney option and then enter your merchant key and merchant salt that you got after creating the account on payumoney and then click save
4. Click on the Gateways in the same tab and select payumoney as Enabled Gateways and Default Gateway.
This is all which was required to be done, now you can go to your page to which you have added the form and fill all the details and press Donate now and you will be redirected to the payumoney payment page where you can choose to make payment using your credit card, debit card or net banking and after a successful payment you will again be redirected to your website with a payment success confirmation message.
I found this to be very simple to implement and as I told you this took me only about an hour to make this work. I hope this post will help you if you were looking for any such integration in your website and feel free to comment your queries in the comment box below.