gashey / botman-ussd-driver
Botman USSD Driver for Laravel Projects
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/gashey/botman-ussd-driver
Requires
- php: >=7.1.3
Requires (Dev)
- fzaninotto/faker: ~1.4
- phpunit/phpunit: ~5.0
This package is auto-updated.
Last update: 2025-10-21 23:49:55 UTC
README
About
BotMan driver to connect the Mobiverse USSD API with BotMan
Installation
Install Botman for Laravel before installing this driver. See the Botman documentation.
Require the gashey/botman-ussd-driver package in your composer.json and update your dependencies:
$ composer require gashey/botman-ussd-driver
Add the Gashey\BotmanUssdDriver\UssdServiceProvider to your providers array:
Gashey\BotmanUssdDriver\UssdServiceProvider::class,
Add the following listener to your botman routes file:
$botman->hears(config('ussd.cancel_text', 'CANCEL'), function ($bot) { $bot->reply('stopped'); })->stopsConversation();
Usage
You can use the Mobiverse USSD Simulator to test your application. Supply your application url as: http://your-application.com/botman
Configuration
The defaults are set in config/botman/ussd.php. Publish the config using this command:
$ php artisan vendor:publish --provider="Gashey\BotmanUssdDriver\UssdServiceProvider"
return [ "cancel_text" => "CANCEL", "network_mapping" => array('01' => 'MTN', '02' => 'VODAFONE', '03' => 'AIRTEL-TIGO', '04' => 'AIRTEL-TIGO', '05' => 'GLO'), ];
License
Released under the MIT License, see LICENSE.