PHPackages                             prabin/laravelesewa - 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. prabin/laravelesewa

ActiveLibrary[Payment Processing](/categories/payments)

prabin/laravelesewa
===================

v1.0.0(2y ago)04MITPHP

Since Feb 17Pushed 2y ago1 watchersCompare

[ Source](https://github.com/prabin-katuwal/laravelesewa)[ Packagist](https://packagist.org/packages/prabin/laravelesewa)[ RSS](/packages/prabin-laravelesewa/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

Laravel eSewa Integration
=========================

[](#laravel-esewa-integration)

[![License](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](https://opensource.org/licenses/MIT)

This repository contains the source code and resources for integrating the eSewa payment gateway into a Laravel application.

\#Lets start from form When you copy form from esewa please make sure to include

```

```

Environment Variables
---------------------

[](#environment-variables)

ESEWA\_DEV="" ESEWA\_LIVE="" ESEWA\_DEV\_MERCHANT="EPAYTEST" ESEWA\_LIVE\_MERCHANT="" PAYMENT\_VERIFICATION=""

Installation and Setup
----------------------

[](#installation-and-setup)

1. Install the eSewa package via Composer:

    ```
    composer require prabin/esewa
    ```
2. Publish the vendor files:

    ```
    php artisan vendor:publish
    ```
3. Add the following code to your `config/app.php` file in the providers section:

    ```
    Prabin\Esewa\EsewaServiceProvider::class,
    ```

Usage
-----

[](#usage)

1. **Define Routes**:

    ```
    Route::get('/payment-success', [EsewaController::class, 'success'])->name('payment.success');
    Route::get('/payment-failure', [EsewaController::class, 'failure'])->name('payment.failure');
    ```
2. **Create Controller Methods**:

    ```
    namespace App\Http\Controllers;

    use Prabin\Esewa\EsewaPayment;
    use Illuminate\Http\Request;

    class EsewaController extends Controller
    {
         public function success(Request $request)
    {
     $payment=new EsewaPayment();
     // please make sure this totalAmount is come through your database
     // eg:$product=Product::find('id',$request->pid)->first();
     // totalAmount=$product->totalamout;
     // in my case i am passing 100;
     $actualAmount=100;
     $response=$payment->paymentVerify($request->oid,$request->amt,$request->refId,$actualAmount);
     if(strpos($response,'Success')!==false){
         // if you have orders and payment database then update your  database
         return 'Payment Completed Successfully';//return where you want eg:return redirect('/')
     }
     else{
         return 'failed';
         //return redirect('/')->with('failure','something went Wrong');
     }
    }

    public function failure()
    {
        // Add logic to handle failed payments here
    }
    }
    ```

License
-------

[](#license)

This project is licensed under the [MIT License](LICENSE).

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

867d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8b2576ad40b027aa1307bd74305365c4de119255758ef8d509daf42e21f1335a?d=identicon)[prabin-katuwal](/maintainers/prabin-katuwal)

---

Top Contributors

[![prabin-katuwal](https://avatars.githubusercontent.com/u/57260380?v=4)](https://github.com/prabin-katuwal "prabin-katuwal (2 commits)")

### Embed Badge

![Health badge](/badges/prabin-laravelesewa/health.svg)

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

###  Alternatives

[msilabs/bkash

bKash Payment Gateway API for Laravel Framework.

181.2k](/packages/msilabs-bkash)

PHPackages © 2026

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