Accepting donations online is typically something required by non-profit organisations, but another group of people that could benefit from it is plugin and theme developers for instance, accepting donations for the hours of free work they’ve put into their open-source products.
I was recently building a website for a church and they wanted to create an online donations page, where people could either make a single donation, or create a recurring donation as part of their tithe.
Install Gravity Forms
The first order of business is to purchase and install Gravity Forms. If you don’t yet have a license, you’ll soon to come to realise how useful it is and how quickly it pays for itself. It’s an immensely powerful plugin that beats any other form-building solution (this being a prime example) and it’s what I’ll be using in this demonstration. Once you’ve installed it, be sure to also install the PayPal add-on (you can do this by going to Forms > Add-ons).
First of all, you need to configure PayPal so that it sends its Instant Payment Notifications back to your WordPress installation to confirm payment. Go to Forms > Settings and click on the PayPal tab at the top of the page. It will give you specific instructions for how to do it for your site (each site will have its own unique address to configure).
Build the Form
Now you need to build your form. Create a new form and enter an appropriate title and description. Then, under the Pricing Fields, add a Product field and set the field type to User Defined Price. You can instead use Radio Buttons to allow the user to select from pre-determined donation amounts. This is the same process whether you’re creating a form for a one-time donation, or a recurring donation.
If you want to collect the name, email and/or address from the donor, add those fields as well – Gravity Forms is clever enough to pass that information on to PayPal too.
Once you’ve built the form, save it.
Connect it to PayPal
Now navigate to Forms > PayPal and click on Create a New Feed. This will allow form submissions to be “fed” to PayPal.
Enter the email address of the PayPal account and set the mode to Production (unless you want to do some testing). The Transaction Type will depend on whether this is a one-time donation, or a recurring donation. If it’s for one-time donations, then select Donations. Otherwise, choose subscriptions for recurring donations.
If it is a recurring donation, you’ll be prompted to enter the terms of the donation, such as the frequency, whether there is a “free trial period” (not usually applicable for donations) and the form field that contains the donation amount.
Select the form from the drop-down that contains your donation form and if applicable, enter the fields which contain the name, email and address of the donor. Then complete the rest of your options and save the Feed. Note that you can create a PayPal condition, which means that only under certain conditions will the form be sent to PayPal. If it’s disabled (default), all entries will be sent to PayPal.
You can also use this to create a donation widget, since you can add Gravity Forms to your sidebars in widgets. Just another reason I love Gravity Forms.
Now go to your form and perform a test. When you hit submit, you should be sent to PayPal to complete the donation. What kind of sites have you used this on?