Skip to content
View Ongabi55's full-sized avatar

Block or report Ongabi55

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
Ongabi55/README.md

Donation Payment App

A clean, production-ready donation system integrated with Paystack payment gateway.

Features

  • One-page donation form with quick-select amount buttons
  • Paystack payment popup / redirect flow
  • Server-side payment verification
  • Webhook support for reliable payment confirmation
  • Recent donors feed (auto-refreshes every 30s)
  • Mobile-responsive design

Tech Stack

Layer Technology
Backend Node.js + Express
Payment Paystack
Frontend Vanilla HTML / CSS / JS

Quick Start

1. Clone & install

npm install

2. Configure environment

cp .env.example .env

Edit .env and fill in your Paystack keys:

PAYSTACK_SECRET_KEY=sk_test_xxxxx
PAYSTACK_PUBLIC_KEY=pk_test_xxxxx
BASE_URL=http://localhost:3000

Get your keys from the Paystack Dashboard.

3. Run

# Development (auto-reload)
npm run dev

# Production
npm start

Open http://localhost:3000 in your browser.

API Endpoints

Method Endpoint Description
POST /api/donate/initialize Start a Paystack transaction
GET /api/donate/verify Verify payment after redirect
POST /api/webhook/paystack Paystack server-to-server webhook
GET /api/donations List recent completed donations (public)

POST /api/donate/initialize

{
  "name": "Jane Doe",
  "email": "jane@example.com",
  "amount": 1000,
  "message": "Keep up the good work!"
}

Returns { authorization_url, reference } — redirect the user to authorization_url.

Webhook Setup

  1. Go to Paystack Dashboard → Settings → API Keys & Webhooks
  2. Set webhook URL to: https://yourdomain.com/api/webhook/paystack
  3. Paystack will send charge.success events for confirmed payments.

Production Notes

  • Replace the in-memory donations array with a real database (PostgreSQL, MongoDB, etc.)
  • Always keep PAYSTACK_SECRET_KEY server-side — never expose it to the browser
  • Use HTTPS in production
  • Set BASE_URL to your actual domain for correct callback redirects

Popular repositories Loading

  1. Ongabi55 Ongabi55 Public

    Config files for my GitHub profile.

    JavaScript

  2. Ongabimark Ongabimark Public

  3. Yessir-DO-IT- Yessir-DO-IT- Public

    Practicing Github Flow

  4. android-daraja-sdk android-daraja-sdk Public

    Forked from safaricom/android-daraja-sdk

    Android MPESA SDK Library - Dubbed Daraja

    Kotlin

  5. CarwashX CarwashX Public

    A modern and user-friendly carwash website designed to showcase services, pricing, and booking options. Built with a sleek layout to help customers easily schedule washes, explore packages, and con…

  6. Demo-repo Demo-repo Public