PHPackages                             leadingedge/payhere-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. leadingedge/payhere-laravel

ActiveLibrary[Payment Processing](/categories/payments)

leadingedge/payhere-laravel
===========================

Laravel package for PayHere payment gateway - Sri Lanka

00PHP

Since May 13Pushed 3w agoCompare

[ Source](https://github.com/gosdrkht/payhere-laravel)[ Packagist](https://packagist.org/packages/leadingedge/payhere-laravel)[ RSS](/packages/leadingedge-payhere-laravel/feed)WikiDiscussions main Synced 1w ago

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

PayHere Laravel 🇱🇰
==================

[](#payhere-laravel-)

A clean, simple Laravel package for integrating **PayHere** payment gateway — built for Sri Lankan developers.

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

[](#installation)

composer require leadingedge/payhere-laravel

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

[](#configuration)

Publish the config file:

php artisan vendor:publish --tag=payhere-config

Add to your `.env` file:

PAYHERE\_MERCHANT\_ID=your\_merchant\_id PAYHERE\_MERCHANT\_SECRET=your\_merchant\_secret PAYHERE\_SANDBOX=true PAYHERE\_CURRENCY=LKR

Usage
-----

[](#usage)

### Generate Checkout Form

[](#generate-checkout-form)

use LeadingEdge\\PayHere\\Facades\\PayHere;

$checkoutData = PayHere::buildCheckout(\[ 'order\_id' =&gt; 'ORDER-001', 'items' =&gt; 'Premium Plan', 'amount' =&gt; 2500.00, 'first\_name' =&gt; 'Kamal', 'last\_name' =&gt; 'Perera', 'email' =&gt; '', 'phone' =&gt; '0771234567', 'return\_url' =&gt; route('payment.success'), 'cancel\_url' =&gt; route('payment.cancel'), 'notify\_url' =&gt; route('payment.notify'), \]);

### Verify Webhook Notification

[](#verify-webhook-notification)

if (PayHere::verifyNotification($request-&gt;all())) { // Payment confirmed ✅ }

Requirements
------------

[](#requirements)

- PHP 8.0+
- Laravel 9, 10, or 11

License
-------

[](#license)

MIT — Free to use

Author
------

[](#author)

**Trishan** — [Leading Edge Solutions](https://leadingedgesolutions.lk) 🇱🇰

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance62

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravellaravel-packagepayherepayment-gatewayphpsri-lanka

### Embed Badge

![Health badge](/badges/leadingedge-payhere-laravel/health.svg)

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

###  Alternatives

[omnipay/coinbase

Coinbase driver for the Omnipay payment processing library

18570.2k1](/packages/omnipay-coinbase)[yenepay/php-sdk

YenePay SDK for PHP

112.7k](/packages/yenepay-php-sdk)

PHPackages © 2026

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