PHPackages                             chamikasamaraweera/payhere-php-sdk - 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. chamikasamaraweera/payhere-php-sdk

ActiveLibrary[Payment Processing](/categories/payments)

chamikasamaraweera/payhere-php-sdk
==================================

PHP SDK for PayHere Payment Gateway

1.0.0(5mo ago)822MITPHPPHP &gt;=7.4CI passing

Since Feb 4Pushed 4mo agoCompare

[ Source](https://github.com/ChamikaSamaraweera/payhere-php-sdk)[ Packagist](https://packagist.org/packages/chamikasamaraweera/payhere-php-sdk)[ Fund](https://www.buymeacoffee.com/teaminfinity)[ GitHub Sponsors](https://github.com/ChamikaSamaraweera)[ RSS](/packages/chamikasamaraweera-payhere-php-sdk/feed)WikiDiscussions master Synced today

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

[![](https://camo.githubusercontent.com/9f88b4bcc27469589fdeb4796656f5801cfa871f4e1c0d4e7294c5795e460d81/68747470733a2f2f7061796865726573746f726167652e626c6f622e636f72652e77696e646f77732e6e65742f706179686572652d7265736f75726365732f7777772f696d616765732f506179486572652d4c6f676f2e706e67)](https://camo.githubusercontent.com/9f88b4bcc27469589fdeb4796656f5801cfa871f4e1c0d4e7294c5795e460d81/68747470733a2f2f7061796865726573746f726167652e626c6f622e636f72652e77696e646f77732e6e65742f706179686572652d7265736f75726365732f7777772f696d616765732f506179486572652d4c6f676f2e706e67)

PayHere PHP SDK
===============

[](#payhere-php-sdk)

[![Latest Version](https://camo.githubusercontent.com/374992ae38cb4bf52d6673a4de3a8c31d7daec01347e0a5ca0362d6a535bbbe5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6368616d696b6173616d61726177656572612f706179686572652d7068702d73646b)](https://packagist.org/packages/chamikasamaraweera/payhere-php-sdk)[![License](https://camo.githubusercontent.com/5485748666acbd65070e347e249719c63c8a8e12066f2cfa92dd4e01a2f5d8dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6368616d696b6173616d61726177656572612f706179686572652d7068702d73646b)](https://github.com/ChamikaSamaraweera/payhere-php-sdk/blob/master/LICENSE)[![PHP Version](https://camo.githubusercontent.com/79cd59afaab0ba5e061a82691e3f8b23a0f71f534aba854acea6ed0e1665ba48/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6368616d696b6173616d61726177656572612f706179686572652d7068702d73646b)](https://packagist.org/packages/chamikasamaraweera/payhere-php-sdk)[![PHP Composer](https://github.com/ChamikaSamaraweera/payhere-php-sdk/actions/workflows/php.yml/badge.svg)](https://github.com/ChamikaSamaraweera/payhere-php-sdk/actions/workflows/php.yml)

A comprehensive PHP SDK for integrating PayHere Payment Gateway into your PHP applications.

Features
--------

[](#features)

- ✅ Simple and intuitive API
- ✅ Secure hash generation and verification
- ✅ Support for both Sandbox and Live environments
- ✅ Payment notification handling
- ✅ PSR-4 autoloading
- ✅ Comprehensive error handling
- ✅ Well-documented code

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

[](#requirements)

- PHP 7.4 or higher
- Composer

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

[](#installation)

Install via Composer:

```
composer require ChamikaSamaraweera/payhere-php-sdk
```

Or manually add to your `composer.json`:

```
{
    "require": {
        "ChamikaSamaraweera/payhere-php-sdk": "^1.0"
    }
}
```

Quick Start
-----------

[](#quick-start)

### 1. Initialize the SDK

[](#1-initialize-the-sdk)

```
