zerkxubas/esewa-laravel
Composer 安装命令:
composer require zerkxubas/esewa-laravel
包简介
This package makes the integration of Esewa payment gateway easier.
README 文档
README
This package is for Laravel Framework making super easy for developers to integrate the eSewa payments into Laravel Application and use instantly. For more details read Official eSewa Documentation.
Installation
Install this Package – Using Composer.
Composer Installation
composer require zerkxubas/esewa-laravel
Sail Installation
sail composer require zerkxubas/esewa-laravel
Publishing The Configurations
php artisan vendor:publish --tag=esewa
This will publish esewa.php inside the config directory of your laravel project.
.env Settings [ Development Mode ]
inside the .env file use these below config values for quick setup. For, Production Mode ensuure you set ESEWA_DEBUG_MODE=false & use The Production ESEWA_API_URL and also the ESEWA_MERCHAND_CODE in .env file
ESEWA_API_URL=https://uat.esewa.com.np
ESEWA_DEBUG_MODE=true
ESEWA_MERCHANT_CODE=EPAYTEST
ESEWA_SUCCESS_URL="http://localhost/order/success"
ESEWA_FAILURE_URL="http://localhost/payment/failure"
NOTE: i prefer to use the Sail environment for development so the url seems to be without any port here in my .env but you can specify any url which works for you.
Quick Examples
Easily Create an eSewa Portal Payment Checkout
In this method i have made it super simpler & easier to implement & use instantly in laravel projects. Use like the below example code inside your controller and this will take the user to the esewa payment portal.
// 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);
Dont Forget To Create The Success & Failure Route
Parameters
pid=>paymentIDamt=>totalAmounttxAmt=>taxAmountpsc=>serviceChargepdc=>deliveryCharge
Testing Credentials
Default credentials provided by esewa for testing or development purpose.
eSewa ID: 9806800001/2/3/4/5
Password: Nepal@123
Token: 123456
Verify Payment
To verify our payments status this is super simpler & easier just use like this and you are good to go.
// 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. }
License
This package is open-sourced & free to use licensed under the MIT license.
Additional
Reading esewa official documentation is highly recommended as there might be new changes in future so its crucial for a developer to be updated with the latest changes.
zerkxubas/esewa-laravel 适用场景与选型建议
zerkxubas/esewa-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 149 次下载、GitHub Stars 达 1, 最近一次更新时间为 2024 年 02 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「payment」 「laravel」 「esewa」 「nepal」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 zerkxubas/esewa-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 zerkxubas/esewa-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 zerkxubas/esewa-laravel 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Alfabank REST API integration
Zero-dependency raw PHP DNS resolver, domain-ownership verification, and intoDNS/MxToolbox-style diagnostics. Queries authoritative nameservers directly over sockets — never trusts the recursive cache for ownership checks.
Laravel package for Accurate Online API integration.
A lightweight plain-PHP framework for database-backed CRUD APIs.
bughq error tracking - PHP SDK
TrinkPOS Sanal POS (Virtual POS) API client for PHP
统计信息
- 总下载量: 149
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-02-17