PHPackages                             zerkxubas/esewa-laravel - 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. zerkxubas/esewa-laravel

ActiveLibrary[Payment Processing](/categories/payments)

zerkxubas/esewa-laravel
=======================

This package makes the integration of Esewa payment gateway easier.

v1.1.0(2y ago)1149MITPHPPHP &gt;=8.0

Since Feb 17Pushed 2y ago1 watchersCompare

[ Source](https://github.com/zerkxubas/esewa-laravel)[ Packagist](https://packagist.org/packages/zerkxubas/esewa-laravel)[ RSS](/packages/zerkxubas-esewa-laravel/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Esewa package for Laravel
=========================

[](#esewa-package-for-laravel)

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
------------

[](#installation)

**Install this Package** – Using **Composer**.

**Composer Installation**

```
composer require zerkxubas/esewa-laravel

```

**Sail Installation**

```
sail composer require zerkxubas/esewa-laravel

```

Publishing The Configurations
-----------------------------

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

[](#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** &amp; 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
--------------

[](#quick-examples)

### Easily Create an eSewa Portal Payment Checkout

[](#easily-create-an-esewa-portal-payment-checkout)

In this method i have made it super simpler &amp; easier to implement &amp; 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 &amp; Failure Route**

**Parameters**

1. `pid` =&gt; `paymentID`
2. `amt` =&gt; `totalAmount`
3. `txAmt` =&gt; `taxAmount`
4. `psc` =&gt; `serviceCharge`
5. `pdc` =&gt; `deliveryCharge`

### Testing Credentials

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

[](#verify-payment)

To verify our payments status this is super simpler &amp; 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
-------

[](#license)

This package is open-sourced &amp; free to use licensed under the [MIT license](https://opensource.org/licenses/MIT).

Additional
----------

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

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

869d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/58468435?v=4)[Subash Sharma](/maintainers/zerkxubas)[@zerkxubas](https://github.com/zerkxubas)

---

Top Contributors

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

---

Tags

phplaravelpaymentesewanepal

###  Code Quality

TestsPHPUnit

Static AnalysisRector

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/zerkxubas-esewa-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/zerkxubas-esewa-laravel/health.svg)](https://phpackages.com/packages/zerkxubas-esewa-laravel)
```

###  Alternatives

[baklysystems/laravel-paymob

Laravel PayMob online payment gateway package

292.4k](/packages/baklysystems-laravel-paymob)

PHPackages © 2026

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