PHPackages                             shikhar/laravel-payments - 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. shikhar/laravel-payments

ActiveLibrary[Payment Processing](/categories/payments)

shikhar/laravel-payments
========================

A Laravel payment gateway package supporting Khalti &amp; eSewa

v1.2.0(2mo ago)19MITPHPPHP &gt;=8.1

Since Nov 22Pushed 2mo agoCompare

[ Source](https://github.com/shikharbahikmagar/laravel-payment-gateway)[ Packagist](https://packagist.org/packages/shikhar/laravel-payments)[ RSS](/packages/shikhar-laravel-payments/feed)WikiDiscussions main Synced 1mo ago

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

Laravel-Payments
================

[](#laravel-payments)

Easily integrate eSewa &amp; Khalti payments in your Laravel app

---

🚀 Installation
--------------

[](#-installation)

```
composer require shikhar/laravel-payments
```

---

📁 Publish Config File
---------------------

[](#-publish-config-file)

```
php artisan vendor:publish --tag=payments-config
```

This will create:

```
config/payments.php

```

---

⚙️ Example `config/payments.php`
--------------------------------

[](#️-example-configpaymentsphp)

```
return [

  'default' => env('PAYMENT_DEFAULT', 'khalti'),

  'gateways' => [

    'khalti' => [
      'public_key' => env('KHALTI_PUBLIC_KEY', ''),
      'secret_key' => env('KHALTI_SECRET_KEY', ''),
    ],

    'esewa' => [
      'form_url' => 'https://rc-epay.esewa.com.np/api/epay/main/v2/form',
      'merchant_id' => env('ESEWA_MERCHANT_ID', 'EPAYTEST'),
      'secret_key' => env('ESEWA_SECRET_KEY', '8gBm/:&EnhH.1/q'),
    ],

  ],

];
```

---

🔐 Add Credentials to `.env`
---------------------------

[](#-add-credentials-to-env)

```
PAYMENT_DEFAULT=esewa

KHALTI_PUBLIC_KEY=your_public_key
KHALTI_SECRET_KEY=your_secret_key

ESEWA_MERCHANT_ID=EPAYTEST
ESEWA_SECRET_KEY=your_secret_key
```

---

🧩 Controller Example
--------------------

[](#-controller-example)

```
