1. Go to this page and download the library: Download musie/laravel-chapa 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/ */
musie / laravel-chapa example snippets
use Illuminate\Support\Facades\Route;
use Musie\LaravelChapa\Controllers\ChapaController;
Route::get('/', function () {
return view('musie.form');
});
Route::post('chapa/payment', [ChapaController::class, 'initializePayment'])->name('chapa.payment');
Route::get('chapa/callback', [ChapaController::class, 'handleCallback'])->name('chapa.callback');
Route::get('chapa/verify/{tx_ref}', [ChapaController::class, 'verifyPayment'])->name('chapa.verify');
sh
php artisan chapa:install
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.