PHPackages                             shengamo/tumeny-pay - 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. shengamo/tumeny-pay

ActiveLibrary[Payment Processing](/categories/payments)

shengamo/tumeny-pay
===================

This package would help integrate Laravel with Tumeny pay.

2.1.0(12mo ago)079MITPHPPHP ^8.2|^8.4

Since Dec 29Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/Shengamo/tumeny-pay)[ Packagist](https://packagist.org/packages/shengamo/tumeny-pay)[ Docs](https://github.com/shengamo/tumeny-pay)[ RSS](/packages/shengamo-tumeny-pay/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (18)Used By (0)

Tumeny Pay
==========

[](#tumeny-pay)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8544ec2e73d32cbd2947c68e5b79e658b6124218407a53924adcc2a19dde8724/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7368656e67616d6f2f74756d656e792d7061792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shengamo/tumeny-pay)[![Total Downloads](https://camo.githubusercontent.com/34ccd3579017ac5bec429339c1d911a2c88814934d8b6884125aa2f7edda12c8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7368656e67616d6f2f74756d656e792d7061792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shengamo/tumeny-pay)

A Laravel Package for integrating with Tumeny Pay.
==================================================

[](#a-laravel-package-for-integrating-with-tumeny-pay)

This Laravel package integrates Tumeny Pay as a payment gateway into your Laravel application.

Version Compatibility
---------------------

[](#version-compatibility)

Laravel VersionPackage VersionLaravel 11.x +2.xLaravel 10.x1.xLaravel 9.x1.x> **Important:** For Laravel 11 applications, you must use version 2.0 or above of this package due to changes in Laravel's caching implementation. For Laravel 10 and below, use version 1.x.

To install a specific version:

```
# For Laravel 11+
composer require shengamo/tumeny-pay:^2.0

# For Laravel 10 and below
composer require shengamo/tumeny-pay:^1.0
```

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

[](#installation)

1. Install the package via Composer:

    ```
    composer require shengamo/tumeny-pay
    ```
2. Publish the package migrations:

    ```
    php artisan vendor:publish --tag=Shengamo\TumenyPay\TumenyPayServiceProvider
    ```

    The package creates migrations for the shengamo\_orders, shengamo\_order\_statuses and also the team\_subscriptions (if it does not already exist). The statuses that are create are:

    - Pending - status 1
    - Success - status 2
    - Failed - status 3
3. Add the following environment variables to your `.env` file:

    ```
    TUMENY_KEY=your_tumeny_key
    TUMENY_SECRET=your_tumeny_secret
    TUMENY_BASE_URL=https://tumeny.herokuapp.com/api/
    ```

*You can find your key and secret from your tumeny account. You need an active account an access to the API Key in order to use this package.*

Usage
-----

[](#usage)

### Payment Request

[](#payment-request)

You can initiate a payment request using the `processPayment` method provided by the TumenyPay class.

```
use Shengamo\TumenyPay\TumenyPay;

$tumeny = new TumenyPay();
$tumeny->processPayment('amount', 'plan name or default', 'Zambian mobile number', 'quantity of items', 'description');

// e.g. request a payment of K100 from the mobile number 0961234567.
$tumeny->processPayment(100, 'default', '0961234567', 1, 'custom description');
```

### Setup the verification of payments

[](#setup-the-verification-of-payments)

To automatically verify pending order payments, add the following line to the schedule function in your App\\Console\\Kernel.php file:

```
use Shengamo\TumenyPay\Jobs\VerifyPendingOrderPayments;

$schedule->job(new VerifyPendingOrderPayments())->everyMinute();
```

The schedule will check the `shengamo_orders` table for all orders with a status of `pending (1)` and send a request to the Tumeny API every minute. If there are no pending transactions, no request will be sent to the Tumeny API.

### Events &amp; Listeners

[](#events--listeners)

Events are fired when ShengamoOrder is generated and also when the ShengamoOrder has been updated. You could register these events in the EventServiceProvider. If you would like to handle an action, for example, if you would like to add a subscription if the order is successful, you could create an event listener that listens to the ShengamoOrderCreated Event.

For example, after creating a AddSubscriptionListener Listener class, the code below would handle subscription if order is successful.

```
class AddSubscriptionListener
{
    public function __construct()
    {
        //
    }

    public function handle(ShengamoOrderUpdated $event): void
    {;
        //If the order status is successful or 2
        if($event->shengamoOrder->status === 2)
        {
         // Add the subscription here
        }
    }
}
```

Add the events and listener in your App\\Providers\\EventServiceProvider like the example below.

```
    protected $listen = [

        ShengamoOrderUpdated::class => [
            AddSubscriptionListener::class
        ],

    ];
```

### Manually firing the verification

[](#manually-firing-the-verification)

In order to manually verify all the pending transactions in your shengamo\_orders table, you can ran the artisan command.

```
php artisan tumeny:verify
```

### Testing

[](#testing)

```
./vendor/bin/phpunit
```

### 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)

- [Mo Malenga](https://github.com/shengamo)

License
-------

[](#license)

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

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance63

Regular maintenance activity

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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 ~36 days

Recently: every ~105 days

Total

15

Last Release

362d ago

Major Versions

1.3.1 → 2.0.02025-05-14

PHP version history (4 changes)1.0.0PHP ^8.0|^8.1

1.0.1PHP ^8.1

1.3.0PHP ^8.1|^8.3

2.0.0PHP ^8.2|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/b726ca7325d6afc945acee2e6c260721d8f1983f781b99020c643940bb814a2e?d=identicon)[momalenga](/maintainers/momalenga)

---

Top Contributors

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

---

Tags

shengamotumeny-pay

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shengamo-tumeny-pay/health.svg)

```
[![Health](https://phpackages.com/badges/shengamo-tumeny-pay/health.svg)](https://phpackages.com/packages/shengamo-tumeny-pay)
```

###  Alternatives

[laraveldaily/laravel-invoices

Missing invoices for Laravel

1.5k1.3M4](/packages/laraveldaily-laravel-invoices)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)

PHPackages © 2026

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