PHP code example of solomon-ochepa / nuban

1. Go to this page and download the library: Download solomon-ochepa/nuban 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/ */

    

solomon-ochepa / nuban example snippets




return [
    // The Host of the API.
    'host' => env('NUB_API_HOST', 'https://nubapi.com/api'),

    /**
     * Your API Token from (https://nubapi.com/user/api-tokens)
     *
     */
    'api_token' => env('NUB_API_TOKEN', ''),

     'options' => [
            // Validate number on your server without making an APi request.
            'validate_number_locally' => true,

             //This timeout applies to client connections and determine when
             //The whole response must be read before it exceeded
             'request_timeout' => 5,
        ]
];

use SolomonOchepa\Nuban\Nuban;

$nuban = new Nuban;
$response = $nuban->account('1234567890', '0123');

print_r($response);
cmd
php artisan vendor:publish --provider="SolomonOchepa\Nuban\NubanServiceProvider" --tag="config"