PHPackages                             wontonee/paystack - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. wontonee/paystack

ActiveLibrary[Payment Processing](/categories/payments)

wontonee/paystack
=================

Paystack Payment Gateway for Bagisto - Accept payments across Africa with Cards, Bank Transfer, Mobile Money &amp; USSD

1.0.1(7mo ago)1121proprietaryPHPPHP ^8.1|^8.2

Since Oct 8Pushed 7mo agoCompare

[ Source](https://github.com/wontonee/paystack-bagisto)[ Packagist](https://packagist.org/packages/wontonee/paystack)[ RSS](/packages/wontonee-paystack/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Paystack Payment Gateway for Bagisto
====================================

[](#paystack-payment-gateway-for-bagisto)

Accept payments from customers across Africa using **Paystack** - one of Africa's leading payment processors.

[![License](https://camo.githubusercontent.com/4fa94814ada8c31c176f87f0f55d493ba0fcb219425d11bf4c090a43224d7898/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d50524f50524945544152592d7265642e737667)](LICENSE)[![Bagisto](https://camo.githubusercontent.com/b1dad07162c45372f5af161db6e2e750964ef4ead32985e0ca5f21c18a309d88/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4261676973746f2d76322e782d6f72616e67652e737667)](https://bagisto.com)

🌍 Supported Countries &amp; Payment Methods
-------------------------------------------

[](#-supported-countries--payment-methods)

### Countries

[](#countries)

- 🇳🇬 **Nigeria**
- 🇬🇭 **Ghana**
- 🇿🇦 **South Africa**
- 🇰🇪 **Kenya**
- And more across Africa

### Payment Methods

[](#payment-methods)

- 💳 **Cards** (Visa, Mastercard, Verve)
- 🏦 **Bank Transfer**
- 📱 **Mobile Money**
- 📞 **USSD**
- 💰 **Bank Account**
- 🔄 **QR Code**

### Supported Currencies

[](#supported-currencies)

- NGN (Nigerian Naira)
- GHS (Ghanaian Cedi)
- ZAR (South African Rand)
- KES (Kenyan Shilling)
- USD (US Dollar)

---

📋 Requirements
--------------

[](#-requirements)

- Bagisto 2.x
- PHP 8.2 or higher
- Laravel 11.x
- Paystack Account ([Sign up here](https://dashboard.paystack.com/#/signup))
- SSL Certificate (Required for production)

---

Installation
------------

[](#installation)

### Step 1: Install via Composer

[](#step-1-install-via-composer)

```
composer require wontonee/paystack
```

### Step 2: Publish Assets

[](#step-2-publish-assets)

```
php artisan vendor:publish --tag=paystack-assets
```

### Step 3: Clear Cache

[](#step-3-clear-cache)

```
php artisan config:cache
php artisan route:cache
php artisan optimize:clear
```

---

⚙️ Configuration
----------------

[](#️-configuration)

### 1. Get Paystack Credentials

[](#1-get-paystack-credentials)

1. Login to [Paystack Dashboard](https://dashboard.paystack.com)
2. Navigate to **Settings → API Keys &amp; Webhooks**
3. Copy your **Public Key** and **Secret Key**

### 2. Configure in Bagisto Admin

[](#2-configure-in-bagisto-admin)

1. Go to **Admin Panel → Configuration → Sales → Payment Methods**
2. Find **Paystack** in the payment methods list
3. Configure the following fields:

FieldDescriptionRequired**Title**Display name for payment methodYes**Description**Description shown to customersNo**Payment Method Icon**Upload custom icon (100x50px recommended)No**Public Key**Your Paystack Public Key (pk\_test\_ or pk\_live\_)Yes**Secret Key**Your Paystack Secret Key (sk\_test\_ or sk\_live\_)Yes**Status**Enable/Disable payment methodYes4. Click **Save Configuration**

---

🔧 How It Works
--------------

[](#-how-it-works)

### Payment Flow

[](#payment-flow)

1. **Customer Checkout**: Customer selects Paystack and places order
2. **Transaction Initialization**: System initializes transaction via Paystack API
3. **Redirect to Paystack**: Customer redirected to Paystack payment page
4. **Payment Processing**: Customer completes payment on Paystack
5. **Callback**: Paystack redirects back with reference
6. **Verification**: System verifies transaction with Paystack API
7. **Order Creation**: Order created if payment successful

### API Endpoints

[](#api-endpoints)

**All Transactions:**

- Initialize: `https://api.paystack.co/transaction/initialize`
- Verify: `https://api.paystack.co/transaction/verify/:reference`

---

🧪 Testing
---------

[](#-testing)

### Test Mode

[](#test-mode)

1. Use API keys starting with `pk_test_` and `sk_test_`
2. Test with Paystack test cards
3. No real money charged

### Test Cards

[](#test-cards)

**Success:**

```
Card Number: 4084 0840 8408 4081
CVV: 408
Expiry: Any future date (e.g., 12/25)
PIN: 0000
OTP: 123456

```

**Insufficient Funds:**

```
Card Number: 5061 0200 0000 0000 094

```

**Declined:**

```
Card Number: 5061 0203 4000 0000 07

```

More test cards:

---

📝 Important Notes
-----------------

[](#-important-notes)

### Amount Handling

[](#amount-handling)

- Paystack requires amounts in **kobo/cents** (₦10 = 1,000 kobo)
- System automatically converts amounts to kobo
- Supports NGN, GHS, ZAR, KES, USD

### Payment Status

[](#payment-status)

- `success`: Payment completed successfully
- `failed`: Payment failed
- `abandoned`: Payment not completed

### Security

[](#security)

- Always verify transactions on server-side
- Never expose secret key on frontend
- Use HTTPS for production

---

� Troubleshooting
-----------------

[](#-troubleshooting)

### Common Issues

[](#common-issues)

**1. "Payment initialization failed"**

- Solution: Check Public Key and Secret Key in admin configuration

**2. "Payment verification failed"**

- Solution: Verify API keys are correct and match environment (test/live)

**3. "Callback not working"**

- Solution: Ensure SSL certificate is valid (production) and callback URL is accessible

**4. Route not found errors**

- Solution: Run `php artisan route:cache` and `php artisan config:cache`

**5. Image not showing**

- Solution: Run `php artisan vendor:publish --tag=paystack-assets --force`

### Debug Logs

[](#debug-logs)

Check logs in `storage/logs/laravel.log` for detailed error information.

---

🆘 Support
---------

[](#-support)

For support, contact:

- **Email**:
- **Website**:
- **Whatsapp**: +91-9711381236, +91-9811381218

---

📄 License
---------

[](#-license)

This package is proprietary software. All rights reserved by Wontonee.

**PROPRIETARY LICENSE** - Unauthorized copying, distribution, modification, or use of this software is strictly prohibited.

---

🔮 Upcoming Features
-------------------

[](#-upcoming-features)

- ✅ Webhook integration for real-time updates
- ✅ Refund functionality from admin panel
- ✅ Recurring payments support
- ✅ Split payments

---

📚 Additional Resources
----------------------

[](#-additional-resources)

- [Paystack Developer Documentation](https://paystack.com/docs)
- [Paystack Dashboard](https://dashboard.paystack.com)
- [Bagisto Documentation](https://bagisto.com/en/documentation/)

---

**Developed with ❤️ by Wontonee**

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance64

Regular maintenance activity

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

222d ago

PHP version history (2 changes)1.0PHP ^8.1

1.0.1PHP ^8.1|^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/990964f490e33904da3bcc7f878293090d96ce9f244b4251f3b0b84cf8fc2860?d=identicon)[wontone18](/maintainers/wontone18)

---

Top Contributors

[![wontone18](https://avatars.githubusercontent.com/u/10259774?v=4)](https://github.com/wontone18 "wontone18 (7 commits)")

### Embed Badge

![Health badge](/badges/wontonee-paystack/health.svg)

```
[![Health](https://phpackages.com/badges/wontonee-paystack/health.svg)](https://phpackages.com/packages/wontonee-paystack)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
