PHPackages                             tumainimosha/laravel-tigopesa-push - 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. [API Development](/categories/api)
4. /
5. tumainimosha/laravel-tigopesa-push

ActiveLibrary[API Development](/categories/api)

tumainimosha/laravel-tigopesa-push
==================================

Laravel package for Tigopesa (TZ) USSD Push integration

0.5.0(3y ago)131.3k↓75%4MITPHPPHP &gt;=7.1.3CI failing

Since Jun 23Pushed 2y ago3 watchersCompare

[ Source](https://github.com/tumainimosha/laravel-tigopesa-push)[ Packagist](https://packagist.org/packages/tumainimosha/laravel-tigopesa-push)[ RSS](/packages/tumainimosha-laravel-tigopesa-push/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (8)Versions (6)Used By (0)

Tigopesa (Tz) Push API - Laravel Package
========================================

[](#tigopesa-tz-push-api---laravel-package)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)![Travis](https://camo.githubusercontent.com/208c3747f3acd70b203731c7ac69c6b3e6faa5e5f8a4682294fb07964a000d1e/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f74756d61696e696d6f7368612f6c61726176656c2d7469676f706573612d707573682e7376673f7374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/66824113b731dc7029651b1a24d8cc770eb4cf2e727af0a7561077ec6930bfd2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74756d61696e696d6f7368612f6c61726176656c2d7469676f706573612d707573682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tumainimosha/laravel-tigopesa-push)

Install
-------

[](#install)

`composer require tumainimosha/laravel-tigopesa-push`

### Publish Configuration File

[](#publish-configuration-file)

Publish config file to customize the default package config.

```
php artisan vendor:publish --provider="Tumainimosha\TigopesaPush\TigopesaPushServiceProvider" --tag="config"
```

### Run migration

[](#run-migration)

```
php artisan migrate
```

Configuration
-------------

[](#configuration)

### Authentication

[](#authentication)

Configure your api parameters in `.env` file as follows. Substitute example values below with those provided to you at time of integration.

```
TZ_TIGOPESA_PUSH_USERNAME=
TZ_TIGOPESA_PUSH_PASSWORD=
TZ_TIGOPESA_PUSH_BILLER_MSISDN= # Should start with country code 255 followed by 9 digits. eg: 25565000111
TZ_TIGOPESA_PUSH_GET_TOKEN_URL=
TZ_TIGOPESA_PUSH_BILL_PAY_URL=
```

Other configuration can be found in the config file published by this package. The options are well commented :)

Usage
-----

[](#usage)

### Quick start

[](#quick-start)

```
use Tumainimosha\TigopesaPush\TigopesaPush;

$customerMsisdn = '255652111222';
$amount = 1000;
$txnId = uniqid();

$tigopesaPushService = TigopesaPush::instance();
$response = $tigopesaPushService->postRequest($customerMsisdn, $amount, $txnId);

/** @var bool $success */
$success = $response['ResponseStatus'];
```

### Handling callback

[](#handling-callback)

Out of the box, this package stores transactions in table `tigopesa_push_transactions`, and updates their status on receiving callback.

However, you may need to do further actions on your app after receiving callback, by listening to event `TigopesaCallbackReceivedHandler::class` fired at callback.

You need to implement your own event listener to listen for this event and do any additional steps after receiving callback.

The event has public attribute `$transaction` which contains the transaction parameters including status

```
// EventServiceProvider.php

protected $listen = [
    ...
    \Tumainimosha\TigopesaPush\Events\TigopesaCallbackReceived::class => [
        \App\Listeners\TigopesaCallbackReceivedHandler::class,
    ],
];

// TigopesaCallbackReceivedHandler.php

public function handle(TigopesaCallbackReceived $event)
{
    $transaction = $event->transaction;

    // do your custom logic here
}
```

### Customize config values at runtime

[](#customize-config-values-at-runtime)

The service offers fluent setters to change config values at runtime if your use case requires.

Such a use case could be when you have multiple accounts on the same project, and you fetch your config values from DB.

```
$tigopesaPushService = TigopesaPush::instance();

$tigopesaPushService->setUsername($account->username)
    ->setPassword($account->password)
    ->setBillerMsisdn($account->business_number)
    ->setTokenUrl(config('tigopesa-push.token_url'))
    ->setBillPayUrl(config('tigopesa-push.bill_pay_url'));
```

Testing
-------

[](#testing)

Run the tests with:

```
vendor/bin/phpunit
```

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

[](#contributing)

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

\*\* Help needed with improving documentation and unit testing. Pull Requests are welcome.

Security
--------

[](#security)

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

License
-------

[](#license)

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

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.8% 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 ~311 days

Total

5

Last Release

1270d ago

PHP version history (2 changes)0.0.1PHP ^7.1.3

0.4.0PHP &gt;=7.1.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/2bbce5f012137c58d5dfeeba9820bf091177baf88a0c3366258a0838315d3621?d=identicon)[tumainimosha](/maintainers/tumainimosha)

---

Top Contributors

[![tumainimosha](https://avatars.githubusercontent.com/u/7481490?v=4)](https://github.com/tumainimosha "tumainimosha (15 commits)")[![kea137](https://avatars.githubusercontent.com/u/32958933?v=4)](https://github.com/kea137 "kea137 (1 commits)")

---

Tags

laravel-packagemobile-paymentstigopesatigopesa-tzussd-push

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/tumainimosha-laravel-tigopesa-push/health.svg)

```
[![Health](https://phpackages.com/badges/tumainimosha-laravel-tigopesa-push/health.svg)](https://phpackages.com/packages/tumainimosha-laravel-tigopesa-push)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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