PHP code example of starnerz / laravel-daraja

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

    

starnerz / laravel-daraja example snippets


Starnerz\LaravelDaraja\LaravelDarajaServiceProvider::class,

Starnerz\LaravelDaraja\Facades\MpesaApi::class,
bash
php artisan vendor:publish --provider="Starnerz\LaravelDaraja\LaravelDarajaServiceProvider" --tag="config"
 php
$STK = new STK();
$STK->push('254727123456','10000','New Purchase','R3F3R3NC3');
 bash
# php artisan daraja:register-urls