[Plugin] Paystack payment plugin for African journals using OJS 3.5+

Hi everyone,

I wanted to share a plugin that may be useful to journals, publishers, and institutions using OJS in Africa or in any region where Paystack is a preferred payment gateway.

For a while, I have been using this Paystack payment plugin for client journals and institutions that we manage. After seeing how often African journals need a practical payment option for OJS, I decided to open-source it for the wider PKP/OJS community.

The plugin is called PaystackOJS.

It provides a Paystack payment gateway for OJS 3.5+, allowing journals to accept payments through Paystack’s hosted checkout flow. It can be used for:

  • Article purchases
  • Issue purchases
  • Subscriptions
  • Publication / APC fees

The goal is to make it easier for OJS journals, especially African journals, to accept online payments without modifying OJS core files or building a payment flow from scratch.

GitHub repository:

Latest release: v1.1.1.0

Some of the key features include:

  • Paystack hosted checkout, so card details do not touch the journal server
  • Server-side verification of payments before fulfilment
  • Verification of amount, currency, and payment reference
  • HMAC-SHA512 webhook signature validation
  • Optional webhook IP allowlist
  • Idempotent fulfilment to reduce the risk of duplicate processing between callback and webhook events
  • User-facing receipt and payment history pages
  • Manager transaction list with refund support
  • OJS-native payment email templates
  • File-based logging with configurable log level
  • No OJS core file modifications

There is also an optional companion addon that improves the payment workflow experience by making payment email templates editable in the OJS interface, adding a payment history link, and adding a Payment tab in the editorial workflow. I am keeping that as a sponsor-supported addon to help with ongoing maintenance and future PKP compatibility updates, but the main Paystack gateway plugin itself is open source.

A few screenshots are available in the repository, including:

  • Plugin settings
  • Payment request email
  • Reader-facing payment page
  • Paystack checkout
  • Payment receipt
  • Confirmation email
  • Workflow payment tab
  • Editable email templates through the companion addon

Current requirements / notes:

  • Requires OJS 3.5+
  • Requires PHP 8.1+
  • Paystack currency support depends on the journal’s Paystack account eligibility
  • Split payments / subaccount support is planned, but not yet released
  • The companion addon is only needed for the enhanced workflow tab and editable payment email templates; payments still work through the main plugin without it

The plugin is stable enough that we have been using it with managed client journals, but I would really appreciate feedback, testing, suggestions, and improvement ideas from the PKP community.

In particular, I would welcome feedback on:

  • OJS compatibility and best practices
  • Payment workflow improvements
  • Security hardening
  • Better integration with OJS editorial/payment processes
  • Documentation improvements
  • Any issues that may come up in different hosting environments

Pull requests and GitHub issues are welcome. Questions and suggestions here in the forum are also very welcome.

I hope this helps other journals, especially African journals that have been looking for a Paystack payment option for OJS.

Hi @thatHman,

Please consider submitting this plugin to the Plugin Gallery so OJS users can more easily discover it! See https://docs.pkp.sfu.ca/dev/plugin-guide/en/release for more information.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

I submitted this issue [OJS] APC queued payment is assigned to editor instead of notified author · Issue #12885 · pkp/pkp-lib · GitHub if you can look into it please. Without a fix, I don’t think the plugin is fully ready to be submitted.

There is an ownership mismatch in OJS’s core APC workflow. When an editor accepts a submission and clicks Request payment, OJS creates a queued APC payment. The problem is that it records the editor’s user ID as the owner of that payment.

Payment plugins are supposed to performs strict ownership validation before allowing somebody to view or initiate payment. Right now, PaystackOJS currently includes a narrowly scoped compatibility workaround. For publication-fee payments only, it verifies that the current user is an assigned author for the relevant submission and, where available, that the user’s email matches the primary author’s email. Once the author has been verified, the plugin corrects the queued payment owner before continuing. The same verification is performed again when payment is initiated. But I personally don’t think this is right and sufficient.