PHPackages                             ajadipaul/laravel-payment-hub - 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. ajadipaul/laravel-payment-hub

ActiveLibrary[Payment Processing](/categories/payments)

ajadipaul/laravel-payment-hub
=============================

A comprehensive and versatile package designed to integrate multiple payment gateways into your Laravel application. This package supports a wide array of popular payment options. With Laravel Payment Hub, you can seamlessly handle payments, ensuring a smooth and unified experience for both developers and users. The package offers a standardized interface for all supported gateways, simplifying the process of switching between different payment providers without altering your codebase significantly. Enhance your Laravel application's payment capabilities with ease and flexibility using Laravel Payment Hub.

v1.0.0(1y ago)15GNU AGPLvPHPPHP ^7.4|^8.0

Since Aug 31Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ajadi473/laravel-payment-hub)[ Packagist](https://packagist.org/packages/ajadipaul/laravel-payment-hub)[ Docs](https://github.com/ajadi473/laravel-payment-hub)[ RSS](/packages/ajadipaul-laravel-payment-hub/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

Very short description of the package
=====================================

[](#very-short-description-of-the-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5ed360867d95e5d698da3978d20937dc28ac6c1b6ef8b3151ddab36b680b996b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616a6164697061756c2f6c61726176656c2d7061796d656e742d6875622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ajadipaul/laravel-payment-hub)[![Total Downloads](https://camo.githubusercontent.com/817e20b1b0bb2020ea08c76e58a933434c9046177873da0a0340b09bd3d9d662/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616a6164697061756c2f6c61726176656c2d7061796d656e742d6875622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ajadipaul/laravel-payment-hub)[![GitHub Actions](https://github.com/ajadipaul/laravel-payment-hub/actions/workflows/main.yml/badge.svg)](https://github.com/ajadipaul/laravel-payment-hub/actions/workflows/main.yml/badge.svg)

A comprehensive and versatile package designed to integrate multiple payment gateways into your Laravel application. This package supports a wide array of popular payment options. With Laravel Payment Hub, you can seamlessly handle payments, ensuring a smooth and unified experience for both developers and users. The package offers a standardized interface for all supported gateways, simplifying the process of switching between different payment providers without altering your codebase significantly. Enhance your Laravel application's payment capabilities with ease and flexibility using Laravel Payment Hub.

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

[](#installation)

You can install the package via composer:

```
composer require ajadipaul/laravel-payment-hub
```

Usage
-----

[](#usage)

```
//  API keys to the .env file

PAYSTACK_PUBLIC_KEY=your_paystack_public_key
PAYSTACK_SECRET_KEY=your_paystack_secret_key
FLUTTERWAVE_PUBLIC_KEY=your_flutterwave_public_key
FLUTTERWAVE_SECRET_KEY=your_flutterwave_secret_key

// Publish the configuration file to your application
php artisan vendor:publish --provider="Ajadipaul\LaravelPaymentHub\LaravelPaymentHubServiceProvider"

// Application Code Usage

class PaymentController extends Controller
{
    protected $paystack;
    protected $flutterwave;

    public function __construct()
    {
        $paystackConfig = config('paymenthub.paystack');
        $flutterwaveConfig = config('paymenthub.flutterwave');

        $this->paystack = new PaystackService();
        $this->paystack->initialize($paystackConfig);

        $this->flutterwave = new FlutterwaveService();
        $this->flutterwave->initialize($flutterwaveConfig);
    }

    public function chargeWithPaystack()
    {
        $data = [
            'amount' => 5000, // Amount in Naira
            'email' => 'user@example.com',
            'callback_url' => route('payment.callback'),
        ];

        $response = $this->paystack->charge($data);

        if ($response['status'] === 'success') {
            return redirect($response['authorization_url']);
        }

        return redirect()->back()->withErrors($response['message']);
    }

    public function chargeWithFlutterwave()
    {
        $data = [
            'amount' => 5000, // Amount in Naira
            'currency' => 'NGN',
            'email' => 'user@example.com',
            'callback_url' => route('payment.callback'),
        ];

        $response = $this->flutterwave->charge($data);

        if ($response['status'] === 'success') {
            return redirect($response['link']);
        }

        return redirect()->back()->withErrors($response['message']);
    }

    public function verifyTransaction($transactionId)
    {
        $response = $this->paystack->verify($transactionId);

        if ($response['status'] === 'success') {
            // Handle successful verification, e.g., updating order status
        } else {
            // Handle verification failure
        }
    }
}
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Ajadi Paul](https://github.com/ajadipaul)
- [All Contributors](../../contributors)

License
-------

[](#license)

The GNU AGPLv. Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

24

—

LowBetter than 30% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Unknown

Total

1

Last Release

717d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6432574?v=4)[Paul Ajadi](/maintainers/ajadi473)[@ajadi473](https://github.com/ajadi473)

---

Top Contributors

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

---

Tags

paystackflutterwavemonnifyajadipaullaravel-payment-hub

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ajadipaul-laravel-payment-hub/health.svg)

```
[![Health](https://phpackages.com/badges/ajadipaul-laravel-payment-hub/health.svg)](https://phpackages.com/packages/ajadipaul-laravel-payment-hub)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.7M3.4k](/packages/craftcms-cms)[illuminate/http

The Illuminate Http package.

11938.5M8.2k](/packages/illuminate-http)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5226.7k](/packages/simplestats-io-laravel-client)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1239.7k25](/packages/fleetbase-core-api)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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