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

ActiveProject[Payment Processing](/categories/payments)

nujan/esewa
===========

Package to seamlessly integrate eSewa payment gateway to laravel project.

v1.0.0(2y ago)2481MITPHP

Since May 4Pushed 2y ago1 watchersCompare

[ Source](https://github.com/NujanSitaula/nujan-esewa)[ Packagist](https://packagist.org/packages/nujan/esewa)[ RSS](/packages/nujan-esewa/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

eSewa ePay v.2 Payment Gateway Integration for Laravel
======================================================

[](#esewa-epay-v2-payment-gateway-integration-for-laravel)

This package provides a seamless integration of the eSewa payment gateway into a Laravel project.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require nujan/esewa:@dev
```

After installing the package, publish the configuration file:

```
php artisan vendor:publish --provider="Nujan\Esewa\EsewaServiceProvider"
```

This will create a `esewa.php` config file in your `config` directory.

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

[](#configuration)

The environment variables `ESEWA_MERCHANT_CODE`, `ESEWA_SECRET`, and `ESEWA_API_ENDPOINT` should be set in your `.env` file:

```
ESEWA_MERCHANT_CODE=your_merchant_code
ESEWA_SECRET=your_secret_key
ESEWA_API_ENDPOINT=your_api_endpoint
```

Usage
-----

[](#usage)

Here's a basic usage example:

```
use Nujan\Esewa\Esewa;

$esewa = new Esewa();

$data = [
    'amount' => 100,
    'tax_amount' => 10,
    'total_amount' => 110,
    'transaction_uuid' => uniqid(mt_rand(), true),
    'product_code' => 'EPAYTEST',
    'product_service_charge' => 0,
    'product_delivery_charge' => 0,
    'success_url' => 'http://review.test/esewa/success',
    'failure_url' => 'https://google.com',
    'signed_field_names' => 'total_amount,transaction_uuid,product_code',
];

$response = $esewa->sendPaymentRequest($data);

// Handle the response as needed
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

```

Please replace `your_merchant_code`, `your_secret_key`, and `your_api_endpoint` with your actual eSewa merchant code, secret key, and API endpoint.

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity40

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

744d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/68de117dc5136f4b8db3165955e01473c804123763403882d26ab92701f1a1b4?d=identicon)[NujanSitaula](/maintainers/NujanSitaula)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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