PHP code example of gashey / botman-ussd-driver

1. Go to this page and download the library: Download gashey/botman-ussd-driver library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

gashey / botman-ussd-driver example snippets


Gashey\BotmanUssdDriver\UssdServiceProvider::class,

$botman->hears(config('ussd.cancel_text', 'CANCEL'), function ($bot) {
    $bot->reply('stopped');
})->stopsConversation();

return [

    "cancel_text" => "CANCEL",

    "network_mapping" => array('01' => 'MTN', '02' => 'VODAFONE', '03' => 'AIRTEL-TIGO', '04' => 'AIRTEL-TIGO', '05' => 'GLO'),
];