Download the PHP package payguard/bagisto-payguard without Composer
On this page you can find all versions of the php package payguard/bagisto-payguard. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download payguard/bagisto-payguard
More information about payguard/bagisto-payguard
Files in payguard/bagisto-payguard
Package bagisto-payguard
Short Description PayGuard payment gateway for Bagisto — adds bKash and Nagad checkout for Bangladesh merchants
License MIT
Homepage https://github.com/abefimrs/bagisto-payguard
Informations about the package bagisto-payguard
PayGuard for Bagisto
Accept bKash and Nagad payments in your Bagisto store, powered by PayGuard — the payment gateway built for Bangladesh merchants.
Features
- ✅ bKash and Nagad as separate checkout payment options
- ✅ Full redirect flow: order → PayGuard → bKash/Nagad → return
- ✅ HMAC-SHA256 signed webhook — reliable server-to-server confirmation
- ✅ Auto invoice creation on
payment.successwebhook - ✅ Transaction ID stored and displayed in the admin order view
- ✅ Per-method PayGuard connection IDs
- ✅ Zero code changes needed after install — fully admin-configurable
Requirements
| Requirement | Version |
|---|---|
| PHP | ^8.1 |
| Bagisto | ^2.0 |
| PayGuard account | app.sourcemonkey.online |
Installation
Laravel auto-discovery registers the service provider automatically — no manual bootstrap/providers.php edits needed.
Configuration
Step 1 — PayGuard Dashboard
Log into app.sourcemonkey.online and collect:
| Item | Where to find it |
|---|---|
| API Key | API & Webhooks → Generate Key |
| Webhook Secret | Connections → Edit → Webhook Secret |
| bKash Connection ID | Connections → bKash row → ID column |
| Nagad Connection ID | Connections → Nagad row → ID column |
Set your store's webhook URL in PayGuard to:
Step 2 — Bagisto Admin Panel
Go to Admin → Configuration → Sales → PayGuard Settings:
| Field | Value |
|---|---|
| API Key | From PayGuard dashboard |
| API Base URL | https://app.sourcemonkey.online/api/v1 |
| Webhook Secret | From PayGuard dashboard |
Then configure each method under PayGuard - bKash and PayGuard - Nagad:
| Field | Value |
|---|---|
| Status | Yes |
| Title | bKash (or Nagad) — shown to customers at checkout |
| Connection ID | Your bKash (or Nagad) connection ID from PayGuard |
How It Works
The webhook is the source of truth. Invoice creation happens here regardless of whether the customer's browser makes it back to your site.
Admin Order View
After a successful payment, the PayGuard Transaction ID is displayed in the Admin → Sales → Orders → view page under the payment method section:
Routes
The plugin registers three public routes:
| Method | URL | Purpose |
|---|---|---|
| GET | /payguard/redirect/{provider} |
Entry point from checkout — creates order and redirects to PayGuard |
| GET | /payguard/callback/{provider} |
Browser return from PayGuard after payment |
| POST | /api/payguard/webhook |
Signed server-to-server IPN from PayGuard |
{provider} is bkash or nagad.
The webhook route is CSRF-exempt (server-to-server call) but every request is verified with HMAC-SHA256 before any action is taken.
Local Development (Webhook Testing)
PayGuard can't reach localhost. Use ngrok to expose your local server:
Copy the https://...ngrok-free.app URL and temporarily set it as APP_URL in your .env:
Then run php artisan config:clear and test a full checkout. Switch APP_URL back to http://localhost:8000 when done.
Package Structure
Changelog
1.0.0 — 2026-07-30
- Initial release
- bKash + Nagad checkout via PayGuard redirect flow
- HMAC-SHA256 webhook signature verification
- Transaction ID saved and displayed in admin order view
- Auto invoice creation on payment confirmation
Support
- PayGuard docs: app.sourcemonkey.online/docs
- Issues: github.com/abefimrs/bagisto-payguard/issues
- PayGuard dashboard: app.sourcemonkey.online
License
MIT — see LICENSE.