PayHero Donations WordPress Plugin

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.js v3.1.
  • Real-time Feedback: Listens for payment success/failure events and updates the UI without page reloads.

Installation

  1. Download/Zip:
  2. Upload the zip file under Plugins, Upload plugin
  3. 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]

      Demo