Pay Hero Donations WordPress Plugin
Overview
Pay Hero Donations is a lightweight WordPress plugin that integrates the Pay Hero Button SDK (v3.1). It allows site owners to accept donations or payments via mobile money (M-Pesa) by embedding a customizable form and payment button using a simple shortcode.

Features
- Admin Configuration: easy management of Payment URLs, Channel IDs, and button styling.
- Frontend Shortcode:
[payhero_donate]renders a donor input form. - Dynamic Reference: Generates a unique transaction reference for every payment attempt.
- SDK Integration: Fully integrated with
button_sdk.jsv3.1. - Real-time Feedback: Listens for payment success/failure events and updates the UI without page reloads.
Installation
- Download/Zip:
- Upload the zip file under Plugins, Upload plugin
- Activate plugin
Settings
Configure: Navigate to Settings > PayHero Donations.
-
Lipwa Link: Enter your PayHero Lipwa Link (e.g.,
https://app.payhero.co.ke/lipwa/5). -
Channel ID: Your specific PayHero Channel ID (e.g.,
100). -
Styles: Set your preferred button text and color.
Usage
To display the donation widget, place the following shortcode on any Page, Post, or Text Widget:
Code snippet[payhero_donate]
-