PHP code example of mdmasudsikdar71 / chapa-payment-gateway-laravel
1. Go to this page and download the library: Download mdmasudsikdar71/chapa-payment-gateway-laravel 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/ */
mdmasudsikdar71 / chapa-payment-gateway-laravel example snippets
use MDMasudSikdar\Chapa\ChapaClient;
$chapaClient = new ChapaClient();
// Prepare the request body
$requestBody = [
'amount' => 1000,
'currency' => 'USD',
'email' => '[email protected]',
// ... other
use MDMasudSikdar\Chapa\ChapaClient;
$chapaClient = new ChapaClient();
// Transaction reference to verify
$txRef = 'your_transaction_reference';
// Verify the transaction
$response = $chapaClient->transactionVerify($txRef);
// Handle the response
// $response contains the decoded response data
bash
php artisan vendor:publish --tag="chapa-config"