PHPackages                             djunehor/laravel-vtu - 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. djunehor/laravel-vtu

ActiveLibrary[Payment Processing](/categories/payments)

djunehor/laravel-vtu
====================

Purchase airtime, data plan and pay utility bills

17212PHPCI failing

Since Jan 13Pushed 6y ago1 watchersCompare

[ Source](https://github.com/djunehor/laravel-vtu)[ Packagist](https://packagist.org/packages/djunehor/laravel-vtu)[ RSS](/packages/djunehor-laravel-vtu/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel SMS
===========

[](#laravel-sms)

[![CircleCI](https://camo.githubusercontent.com/2eaa5817418af98b51a402aeae841544b06b8538fa717c592255c0b59824a941/68747470733a2f2f636972636c6563692e636f6d2f67682f646a756e65686f722f6c61726176656c2d7674752e7376673f7374796c653d737667)](https://circleci.com/gh/djunehor/laravel-vtu)[![Latest Stable Version](https://camo.githubusercontent.com/4f8cc5a4630b1b1eb4904a1e5ce611236268d5e55968916c99fb54c07db75e49/68747470733a2f2f706f7365722e707567782e6f72672f646a756e65686f722f6c61726176656c2d7674752f762f737461626c65)](https://packagist.org/packages/djunehor/laravel-vtu)[![Total Downloads](https://camo.githubusercontent.com/14bebec6f19801dbaca44044b179812e872e414168d51d93d7f754ca0d411ec7/68747470733a2f2f706f7365722e707567782e6f72672f646a756e65686f722f6c61726176656c2d7674752f646f776e6c6f616473)](https://packagist.org/packages/djunehor/laravel-vtu)[![License](https://camo.githubusercontent.com/87c5d954462c8ccdc5e39175a15dab8999c41245cbc25f0df2b50a57d154b0ef/68747470733a2f2f706f7365722e707567782e6f72672f646a756e65686f722f6c61726176656c2d7674752f6c6963656e7365)](https://packagist.org/packages/djunehor/laravel-vtu)[![Build Status](https://camo.githubusercontent.com/7f42b2f26e71656d049743e019406537cdb74259c3fffc10b34358dbd98d477e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f646a756e65686f722f6c61726176656c2d7674752f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/djunehor/laravel-vtu/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/038e625570ab0f7d90b2a07406d24e2374061a6eeeda6c0acec81f9eb983c4f4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f646a756e65686f722f6c61726176656c2d7674752f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/djunehor/laravel-vtu/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/e67ca05abfd3ddc37d72993779912bf5bf6927b351fb5483fd0b7200abeb4f4c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f646a756e65686f722f6c61726176656c2d7674752f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/djunehor/laravel-vtu/?branch=master)

Laravel VTU allows you to buy airtime and data plan, as well as pay for utility bill from your Laravel application using one of over 3 vtu providers, or your own vtu provider.

- [Laravel VTU](#laravel-vtu)
    - [Installation](#installation)
        - [Laravel 5.5 and above](#laravel-55-and-above)
        - [Laravel 5.4 and older](#laravel-54-and-older)
        - [Lumen](#lumen)
        - [Env Keys](#env-keys)
    - [Usage](#usage)
        - [All parts of speech](#using-helper-function)
    - [Available VTU Providers](#available-vtu-providers)
    - [Creating custom VTU Provider](#creating-custom-vtu-provider)
    - [Contributing](#contributing)

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

[](#installation)

### Step 1

[](#step-1)

You can install the package via composer:

```
composer require djunehor/laravel-vtu
```

#### Laravel 5.5 and above

[](#laravel-55-and-above)

The package will automatically register itself, so you can start using it immediately.

#### Laravel 5.4 and older

[](#laravel-54-and-older)

In Laravel version 5.4 and older, you have to add the service provider in `config/app.php` file manually:

```
'providers' => [
    // ...
    Djunehor\Vtu\VtuServiceProvider::class,
];
```

#### Lumen

[](#lumen)

After installing the package, you will have to register it in `bootstrap/app.php` file manually:

```
// Register Service Providers
    // ...
    $app->register(Djunehor\Vtu\VtuServiceProvider::class);
];
```

#### Env Keys

[](#env-keys)

```
VOICE_AND_TEXT_TOKEN
VOICE_AND_TEXT_CALLBACK

COWRIESYS_CLIENT_ID
COWRIESYS_CLIENT_KEY

VTPASS_USERNAME
VTPASS_PASSWORD

FPEVTU_USERNAME
FPEVTU_PASSWORD

UNIK_MOBILE_USERNAME
UNIK_MOBILE_PASSWORD

MOBILE_AIRTIME_USERNAME
MOBILE_AIRTIME_PASSWORD

```

### Step 2 - Publishing files

[](#step-2---publishing-files)

Run: `php artisan vendor:publish --tag=laravel-vtu`This will move the migration file, seeder file and config file to your app. You can set your sms details in the config file or via env

### Step 3 - Adding SMS credentials

[](#step-3---adding-sms-credentials)

- Add the env keys to your `.env` file
- Or edit the config/laravel-vtu.php file

Usage
-----

[](#usage)

```
//using VoiceAndText
use Djunehor\Vtu\Concrete\VoiceAndText;

$vtu = new VoiceAndText();
$amount = 100;
$mobileNumber = '08149659347';
$mobileNetwork = '01';
$callBackUrl = 'http://www.your-website.com';
$send = $vtu->buyAirtime($amount, $mobileNumber, $mobileNetwork, $callBackUrl);
```

### Using Helper function

[](#using-helper-function)

```
//VoiceAndtext
$send = buy_airtime($amount, $mobileNumber, $mobileNetwork, $callBackUrl, $token = 121231112, \Djunehor\Vtu\Concrete\VoiceAndText::class);
```

The default VTU provider is VoiceAndText. You can set the default SMS provider in `config/laravel-vtu.php` e.g ` 'default' => \Djunehor\Vtu\Concrete\VoiceAndText::class,`, so you can use the helper function like this:

```
$send = buy_airtime($amount, $mobileNumber, $mobileNetwork);
//$token, $callbackUrl and $class are optional and better set in the config
```

### Available VTU Providers

[](#available-vtu-providers)

ProviderURLTestedVoiceAndTextYesCowrieSysNoFpeVtuNoMobileAirtimeNigNoUnikMobileNigNoVTPassNo### Creating custom SMS Provider

[](#creating-custom-sms-provider)

- Create a class that extends `Djunehor\Vtu\Concrete\Vtu` class
- Implement the required methods (buyAirtime, buyData, PayUtility) which makes the request and return bool
- (Optional) You can add the provider keys to the config/laravel-vtu.php

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

[](#contributing)

- Fork this project
- Clone your forked repo
- Run `composer install`
- Make your changes and run tests `composer test`
- Push and create Pull request

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/djunehor-laravel-vtu/health.svg)

```
[![Health](https://phpackages.com/badges/djunehor-laravel-vtu/health.svg)](https://phpackages.com/packages/djunehor-laravel-vtu)
```

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