PHPackages                             bibek-deula/laravel-nepal-payment - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. bibek-deula/laravel-nepal-payment

ActiveLibrary[Payment Processing](/categories/payments)

bibek-deula/laravel-nepal-payment
=================================

Laravel package for Nepal payment gateways integration (eSewa, Khalti, Fonepay)

v1.0.3(5mo ago)07MITPHPPHP ^8.0|^8.1|^8.2

Since Dec 8Pushed 5mo agoCompare

[ Source](https://github.com/bibekdeula/laravel-nepal-payment)[ Packagist](https://packagist.org/packages/bibek-deula/laravel-nepal-payment)[ RSS](/packages/bibek-deula-laravel-nepal-payment/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

Laravel Nepal Payment Gateway
=============================

[](#laravel-nepal-payment-gateway)

A Laravel package for integrating Nepal's popular payment gateways: **eSewa**, **Khalti**, and **Fonepay**.

Features
--------

[](#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
------------

[](#installation)

### 1. Install via Composer

[](#1-install-via-composer)

```
composer require bibek-deula/laravel-nepal-payment
```

### 2. Publish Package Files

[](#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

[](#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

[](#4-install-dependencies)

```
npm install
npm install bootstrap jquery
npm run dev
```

Usage
-----

[](#usage)

### Access Payment Page

[](#access-payment-page)

Navigate to: `http://your-domain/payment`

### Test Credentials

[](#test-credentials)

#### eSewa

[](#esewa)

- Merchant Code: `EPAYTEST`

#### Khalti

[](#khalti)

- Test IDs: 9800000000, 9800000001, etc.
- MPIN: 1111
- OTP: 987654

#### Fonepay

[](#fonepay)

- Bank: Global IME Bank
- Username: 98XXXXXXXX (any 10-digit)
- Password: 1212122
- OTP: 1212122

Configuration
-------------

[](#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
------

[](#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
-------------

[](#customization)

### Views

[](#views)

Views are published to `resources/views/vendor/nepal-payment/`. Customize as needed.

### Assets

[](#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
----------------

[](#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
-------

[](#license)

MIT License

Author
------

[](#author)

**Bibek Deula**

- Email:

Support
-------

[](#support)

For issues and feature requests, please create an issue on GitHub.

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance72

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

156d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/adb0ad9a66212a60b1cec6083be52e99e58bafdd66b847e98521b8b3872a74a9?d=identicon)[bibekdeula](/maintainers/bibekdeula)

---

Top Contributors

[![bibekdeula](https://avatars.githubusercontent.com/u/246212665?v=4)](https://github.com/bibekdeula "bibekdeula (4 commits)")

---

Tags

laravelpaymentpayment gatewaykhaltiesewanepalfonepay

### Embed Badge

![Health badge](/badges/bibek-deula-laravel-nepal-payment/health.svg)

```
[![Health](https://phpackages.com/badges/bibek-deula-laravel-nepal-payment/health.svg)](https://phpackages.com/packages/bibek-deula-laravel-nepal-payment)
```

###  Alternatives

[victorybiz/laravel-crypto-payment-gateway

GoUrl.io Crypto Payment Gateway for Laravel

642.5k](/packages/victorybiz-laravel-crypto-payment-gateway)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
