Skip to content
Devlom Karol Orzeł
← Blog blog 3 min read

Simple Donations — a free WordPress donation plugin with PayPal, PayU and Przelewy24

Simple Donations is a free WordPress plugin for charity fundraising: goals with a progress bar and donations via PayPal, PayU, Przelewy24 or bank transfer. Open source.

Simple Donations — a free WordPress donation plugin with PayPal, PayU and Przelewy24

4

gateways: PayPal, PayU, Przelewy24, bank transfer

since 2018

in production at a charity

$0

GPL licence, code on GitHub

Simple Donations is a free WordPress plugin for charity fundraising. A charity sets a goal and a deadline, and donors see a progress bar and give through PayPal, PayU, Przelewy24 or a regular bank transfer. It's a modernised version of the WPMU DEV Fundraising plugin, which the Dom w Łodzi Foundation has used for its fundraisers since 2018. The code is released under the GPL.

A fundraiser with a progress bar and four payment options

The screenshots come from a demo install with a fictional charity, fundraisers and donors.

Where it comes from

WPMU DEV's Fundraising was a solid plugin: fundraisers as their own post type, goals, backer rewards, widgets and shortcodes. Over time it aged. PayPal ran through legacy IPN, and Adaptive Payments support broke when PayPal shut it down in 2022. The code still had PHP 4 constructors, and there were no Polish payment gateways at all.

The foundation raises money with it every day, so switching to another plugin would have meant migrating years of fundraisers and donation history. Because the plugin is GPL-licensed, I took it over and modernised it instead.

What I changed

  • Przelewy24 and PayU. The two most popular payment gateways in Poland, both on their current REST APIs, with sandbox mode and signed notification checks.
  • PayPal, rebuilt. Instead of a redirect and IPN, it now uses the Orders v2 API and PayPal's in-page popup, so donors never leave the fundraiser.
  • One-step checkout. Donors enter their details once, in the fundraiser panel, and pick a gateway with its own button. They used to fill in two forms.
  • PHP 8.3. Compatibility fixes that removed fatal errors on modern servers.
  • Design. One responsive style built on CSS variables replaces five old themes and is easy to match to a site's colours.
  • Polish translation of the interface.

The fundraiser panel: progress, donor details and gateway buttons

Keeping the money safe

On a plugin that handles donations, most of the work doesn't show up in screenshots:

  • Duplicate donations. PayU and Przelewy24 can send the same payment notification several times. Without a guard, one donation could be recorded twice and the progress bar would show more money than actually came in. Each notification is now processed exactly once.
  • Security holes. I fixed, among other things, an SQL injection in donation ID generation, missing CSRF protection in the settings and unsanitised data in the bank transfer gateway.
  • Validation. The form checks name, email, amount and privacy consent before the donor reaches the gateway. If no gateway is active, the admin panel shows a warning.

PayU and Przelewy24 settings with sandbox mode

Setup

Gateways are switched on with a single click in the settings. PayU and Przelewy24 only need the credentials from the operator's dashboard, and the plugin shows the notification URL ready to copy. Every gateway can be tested in sandbox mode first.

Payment settings: currency, fundraiser types and active gateways

Download

Simple Donations is free and available on GitHub. It needs WordPress 5.0+ and PHP 8.3+. I'm also preparing it for submission to the WordPress.org plugin directory.

Running a charity or non-profit and want to take donations on your own site, without the fees of fundraising platforms? I can set up the plugin, connect the payment gateways and match it to your site's design. See how I work on website development and WordPress maintenance.

My role
Modernisation, new payment gateways, security, maintenance
Stack
WordPress, PHP 8.3, PayU REST API, Przelewy24 REST API, PayPal Orders v2

You might also be interested in

Related pages

blog

Wordpress 5.0 released ! What's new ?

After months of hard work, testing, beta and release candidate versions, Wordpress 5.0 is out ! Interested in new features it can offer ? Take a quick tour belo…

Ready to start?

Contact me and let's discuss your project

Write to me