PHPackages                             ovac/laravel-hubtel-payment - 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. ovac/laravel-hubtel-payment

ActiveLibrary[Payment Processing](/categories/payments)

ovac/laravel-hubtel-payment
===========================

A Laravel package for consuming the Hubtel Payment Api

v1.0.2(7y ago)126487MITPHPPHP &gt;=5.6.4

Since Sep 29Pushed 7y ago4 watchersCompare

[ Source](https://github.com/ovac/laravel-hubtel-payment)[ Packagist](https://packagist.org/packages/ovac/laravel-hubtel-payment)[ RSS](/packages/ovac-laravel-hubtel-payment/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (9)Versions (12)Used By (0)

[![](https://camo.githubusercontent.com/e6dc524d21a2743a7a6099bc74ba7db06c4b6383f5e2b918b5351da1b793dbee/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f6f7661632f696d6167652f75706c6f61642f685f3230302f76313530363832343534342f34615f557737725f6c6a796271332e6a7067)](https://developers.hubtel.com/documentations/merchant-account-api)[![](https://camo.githubusercontent.com/da33047295fb89dc08896c2adb79be8cc4f659185a0e8f6e2733c3fbe56b35e2/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f6f7661632f696d6167652f75706c6f61642f685f3132302f76313530363832383738362f6c6f676f2d636f6d706f7365722d7472616e73706172656e745f7a6a67616c302e706e67)](#)[![](https://camo.githubusercontent.com/e4e2eeabba5b4730c7c70f50be778fb3ca4f96475e658fe0719d85a9adc6b365/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f6f7661632f696d6167652f75706c6f61642f685f3230302f76313530363833323939322f6c61726176656c2d6c6f676f5f61746c7666772e706e67)](#)
[![](https://camo.githubusercontent.com/43ceafafb4e948a508bed1f1918b4c727b55f508d6ca6fc2353946c5ad12e97c/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f6f7661632f696d6167652f75706c6f61642f76313530363832383338302f6c6f676f5f73697a655f696e766572745f6a656c6837342e6a7067)](https://www.ovac4u.com/hubtel-payment)

---

Laravel Hubtel Payment
======================

[](#laravel-hubtel-payment)

A Laravel 5.5 integration for the [OVAC Hubtel Payment](https://www.ovac4u.com/hubtel-payment) package.

[![Build Status](https://camo.githubusercontent.com/e42fd1509eed4de5f5fc2b39d77749a1cfee97e1c5e505335d46aa10054ff13d/68747470733a2f2f7472617669732d63692e6f72672f6f7661632f6c61726176656c2d68756274656c2d7061796d656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ovac/laravel-hubtel-payment)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6bd9885670856d128a6d1b02099c361e2d3d2b0efde00e17f2990351c990d95a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f7661632f6c61726176656c2d68756274656c2d7061796d656e742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ovac/laravel-hubtel-payment/badges/quality-score.png?b=master)[![Coverage Status](https://camo.githubusercontent.com/a8d52c399a5c921592f4fed9b71b4d9ef0f011d7b6275d3063436e88966b39d7/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6f7661632f6c61726176656c2d68756274656c2d7061796d656e742f62616467652e7376673f6272616e63683d7265766572742d312d616e616c797369732d586b79505961)](https://coveralls.io/github/ovac/laravel-hubtel-payment?branch=revert-1-analysis-XkyPYa)[![Latest Stable Version](https://camo.githubusercontent.com/d02a2470d0668b7ca578bf743ecb1eef5f87798f9cd16c6315e2637059d29b02/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6f7661632f6c61726176656c2d68756274656c2d7061796d656e742e737667)](https://packagist.org/packages/ovac/laravel-hubtel-payment)[![Packagist](https://camo.githubusercontent.com/69e6dac52455d2adc1c165b598a6e84403552b2c44b0abcac0204eeb667a838f/68747470733a2f2f706f7365722e707567782e6f72672f6f7661632f6c61726176656c2d68756274656c2d7061796d656e742f642f746f74616c2e737667)](https://packagist.org/packages/ovac/laravel-hubtel-payment)[![Packagist](https://camo.githubusercontent.com/ac292c2b22c5eb4bf8988845d1cafbe5452b5b3312ee32f41727c60bbc3bea95/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6f7661632f6c61726176656c2d68756274656c2d7061796d656e742e737667)](https://packagist.org/packages/ovac/laravel-hubtel-payment)[![Dependency Status](https://camo.githubusercontent.com/d1619ee17be834277a2ddbdb0b9bb8332f4d5e3140649ee087307dfe97bc2468/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3539636461343531333638623038333230666665373139302f62616467652e737667)](https://www.versioneye.com/user/projects/59cda451368b08320ffe7190)

[![SensioLabsInsight](https://camo.githubusercontent.com/f8e056ddf6e5ea4ef18ef1fcc2d994a56291f3417f0d58d167659d6cbc39d1f8/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f35333232353235622d396139612d343031392d383263342d6232646463336465303466652f6269672e706e67)](https://insight.sensiolabs.com/projects/5322525b-9a9a-4019-82c4-b2ddc3de04fe)

```
 Follow me anywhere @ovac4u                         | GitHub
 _________                          _________       | Twitter
|   ___   |.-----.--.--.---.-.----.|  |  |.--.--.   | Facboook
|  |  _   ||  _  |  |  |  _  |  __||__    |  |  |   | Instagram
|  |______||_____|\___/|___._|____|   |__||_____|   | Github + @ovac
|_________|                        www.ovac4u.com   | Facebook + @ovacposts
```

Introduction.
-------------

[](#introduction)

Laravel Hubtel Payment is a Laravel 5.5 seamless integration of the [OVAC Hubtel Payment](https://www.ovac4u.com/hubtel-payment) php client for consuming the Hubtel Payment API and processing mobile-money transactions in a Laravel application.

With this package, it is easy to process mobile money transactions and automate Mobile Money payment from and to any mobile money subscriber in Ghana from any laravel controller.

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

[](#installation)

This packages utilize [Composer](https://getcomposer.org/), for more information on how to install Composer please read the [Composer Documentation](https://getcomposer.org/doc/00-intro.md).

Install via composer

```
composer require ovac/laravel-hubtel-payment
```

### Register Service Provider

[](#register-service-provider)

**Note! This and next step are optional if you use laravel&gt;=5.5 with package auto discovery feature.**

Add service provider to `config/app.php` in `providers` section

```
OVAC\LaravelHubtelPayment\ServiceProvider::class,
```

### Register Facade

[](#register-facade)

Register package facade in `config/app.php` in `aliases` section

```
'HubtelPayment' => OVAC\LaravelHubtelPayment\Facades\LaravelHubtelPayment::class,
```

### Publish Configuration File

[](#publish-configuration-file)

```
php artisan vendor:publish --provider="OVAC\LaravelHubtelPayment\ServiceProvider" --tag="config"
```

### Edit .env

[](#edit-env)

Add these lines in the application .env and use your Hubtel Merchant Account Number, ClentID, ClientSecret and callback as shown below.

Don't know what this is? [checkout this documentation](https://www.ovac4u.com/hubtel-payment/config.html)

```
HUBTEL_ACCOUNT_NUMBER=HM00000 #Your Hubtel Merchant Account Number
HUBTEL_CLIENT_ID=XXXXXXXX     #Your Hubtel Merchant Client ID
HUBTEL_CLIENT_SECRET=XXXXXXXX #Your Hubtel Merchant Client Secret.
HUBTEL_CALLBACK_URL=https://example.com/payment_success #Default Callback URL
HUBTEL_SECONDARY_CALLBACK_URL=https://example.com/error
```

Basic Usage
-----------

[](#basic-usage)

This library exposes a handfull of facade that seamlessly interfaces with the hubtel-payment php client main classes for basic usage in order to make local configuration optional.

### Note: For advance usage, please refer to the OVAC Hubtel Payment documentation, located [here](https://www.ovac4u.com/hubtel-payment).

[](#note-for-advance-usage-please-refer-to-the-ovac-hubtel-payment-documentation-located-here)

Just use the Laravel facade alias `HubtelPayment::` instead of the native calls.

**Enjoy :)**

#### The ReceiveMoney facade may be used to send a prompt to the customer's phone to receive money like a mobile-money agent as follows:

[](#the-receivemoney-facade-may-be-used-to-send-a-prompt-to-the-customers-phone-to-receive-money-like-a-mobile-money-agent-as-follows)

```
