PHP code example of zfhassaan / jazzcash

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

    

zfhassaan / jazzcash example snippets

 
    /*
    * Package Service Providers...
    */

    \zfhassaan\jazzcash\provider\ServiceProvider as JazzcashServiceProvider;
 
  'aliases' => Facade::defaultAliases()->merge([
        'Jazzcash' => \Zfhassaan\Jazzcash\Facade\JazzcashFacade::class,
    ])->toArray(),

        $jazzcash = new JazzCash();
        $jazzcash->setAmount($request->amount);
        $jazzcash->setBillReference($request->billref);
        $jazzcash->setProductDescription($request->productDescription);
        return $jazzcash->sendRequest();
bash
php artisan vendor:publish