bibek-deula/laravel-nepal-payment
Composer 安装命令:
composer require bibek-deula/laravel-nepal-payment
包简介
Laravel package for Nepal payment gateways integration (eSewa, Khalti, Fonepay)
README 文档
README
A Laravel package for integrating Nepal's popular payment gateways: eSewa, Khalti, and Fonepay.
Features
- ✅ eSewa - Nepal's leading payment gateway
- ✅ Khalti - Digital wallet and payment gateway
- ✅ Fonepay - Unified payment gateway
- 🎨 Modern Bootstrap 5 UI
- 🔧 Easy configuration
- 📦 Ready-to-use payment page
- 🔒 Secure payment processing
Installation
1. Install via Composer
composer require bibek-deula/laravel-nepal-payment
2. Publish Package Files
Publish configuration, views, and assets:
php artisan vendor:publish --provider="BibekDeula\LaravelNepalPayment\NepalPaymentServiceProvider"
Or publish individually:
# Publish config only php artisan vendor:publish --tag=nepal-payment-config # Publish views only php artisan vendor:publish --tag=nepal-payment-views # Publish assets only php artisan vendor:publish --tag=nepal-payment-assets
3. Configure Environment Variables
Add the following to your .env file:
# eSewa Configuration ESEWA_MERCHANT_CODE=EPAYTEST ESEWA_ENVIRONMENT=test # Khalti Configuration KHALTI_SECRET_KEY=your_secret_key_here KHALTI_PUBLIC_KEY=your_public_key_here KHALTI_ENVIRONMENT=test # Fonepay Configuration FONEPAY_MERCHANT_CODE=your_merchant_code FONEPAY_SECRET_KEY=your_secret_key FONEPAY_ENVIRONMENT=test # Route Configuration (optional) NEPAL_PAYMENT_ROUTE_PREFIX=payment
4. Install Dependencies
npm install npm install bootstrap jquery npm run dev
Usage
Access Payment Page
Navigate to: http://your-domain/payment
Test Credentials
eSewa
- Merchant Code:
EPAYTEST
Khalti
- Test IDs: 9800000000, 9800000001, etc.
- MPIN: 1111
- OTP: 987654
Fonepay
- Bank: Global IME Bank
- Username: 98XXXXXXXX (any 10-digit)
- Password: 1212122
- OTP: 1212122
Configuration
After publishing, edit config/nepal-payment.php to customize:
- Payment gateway credentials
- URLs (test/live)
- Route prefix and middleware
- Success/failure redirect URLs
Routes
The package provides these routes (with payment prefix by default):
GET /payment - Payment page
GET /payment/fonepay/success - Fonepay success callback
GET /payment/fonepay/failure - Fonepay failure
ANY /payment/esewa/payment-success - eSewa success
GET /payment/esewa/failure - eSewa failure
POST /payment/khalti/initiate - Khalti payment initiation
GET /payment/khalti/success - Khalti success callback
GET /payment/khalti/failure - Khalti failure
Customization
Views
Views are published to resources/views/vendor/nepal-payment/. Customize as needed.
Assets
JS and CSS are published to:
resources/js/vendor/nepal-payment/resources/css/vendor/nepal-payment/
Make sure to include them in your Vite build or compile separately.
Future Additions
This package is designed to be extensible. Future versions will include:
- HBL Bank integration
- Nabil Bank integration
- ConnectIPS integration
- Other Nepalese payment gateways
License
MIT License
Author
Bibek Deula
- Email: bbkdeula@gmail.com
Support
For issues and feature requests, please create an issue on GitHub.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
bibek-deula/laravel-nepal-payment 适用场景与选型建议
bibek-deula/laravel-nepal-payment 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 8 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 12 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「payment」 「laravel」 「payment-gateway」 「esewa」 「khalti」 「nepal」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 bibek-deula/laravel-nepal-payment 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bibek-deula/laravel-nepal-payment 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 bibek-deula/laravel-nepal-payment 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Client SDK for CyberSource REST APIs
Alfabank REST API integration
First Atlantic Commerce (FAC) Payment Gateway Driver for Omnipay
Configuration-driven, multi-gateway payment orchestration for Laravel. Drivers expose primitives; flows compose them.
PHP client library for epayindo http://epayindo.com
This PHP class is for reading and generating EMV QR codes, which is the QR code for making payments via mobile payment platforms.
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 25
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-08