1. Go to this page and download the library: Download zerkxubas/esewa-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/ */
zerkxubas / esewa-laravel example snippets
// use the namespace
use Zerkxubas\EsewaLaravel\Facades\Esewa;
// Directly use like this inside the controller function code.
return Esewa::checkout($paymentID,$totalAmount,$taxAmount,$serviceCharge,$deliveryCharge);
// use the namespace
use Zerkxubas\EsewaLaravel\Facades\Esewa;
// Taking the get request return parameters.
$paymentID = $_GET['oid'];
$transactionAmount = $_GET['amt'];
$refrenceID = $_GET['refId'] ;
// Verifying the Esewa Payment, [ returns, Either true or false ]
$paymentStatus = Esewa::verifyPayment($refrenceID,$paymentID,$transactionAmount);
if ($paymentStatus) {
// Success payment.
}
php artisan vendor:publish --tag=esewa
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.