PHPackages                             lazervel/pgi - 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. lazervel/pgi

ActiveLibrary[Payment Processing](/categories/payments)

lazervel/pgi
============

PGI is a PHP library that provides ready-to-use integrations for multiple payment gateways.

v1.0.0(6mo ago)211MITPHPPHP ^7.2 || ^8.0CI passing

Since Oct 24Pushed 6mo agoCompare

[ Source](https://github.com/lazervel/pgi)[ Packagist](https://packagist.org/packages/lazervel/pgi)[ Docs](https://github.com/lazervel)[ Fund](https://github.com/sponsors/indianmodassir)[ RSS](/packages/lazervel-pgi/feed)WikiDiscussions main Synced 1mo ago

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

PGI - Payment Getway Integration
================================

[](#pgi---payment-getway-integration)

PGI is a PHP library that provides ready-to-use integrations for multiple payment gateways.

[![](https://camo.githubusercontent.com/3bcb5befe15f9660c4048b2e4dca2f231149e1600bef4a1f75f7ff8ba7610fb0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f417574686f722d4d6f6461737369722d253233343463633131)](https://github.com/indianmodassir)[![](https://camo.githubusercontent.com/8983cc4febaba34fa4bba7081d1953ab320c32cb79e43035e3ac6a09b669f254/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c617a657276656c2f706769)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/5de995589e8da4bb544f36eb2b58cc0986303b37c98196e2ff6f0703e4007f1f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c617a657276656c2f7067692e737667)](https://packagist.org/packages/lazervel/pgi)[![](https://camo.githubusercontent.com/930bff33f180cb89ce3540c078c563c524cfb7df9d3b4c3ebaa1a778d2e1eda2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6c617a657276656c2f706769)](https://github.com/lazervel/pgi/stargazers)[![Latest Version](https://camo.githubusercontent.com/04846616d3e194aa1153236f226b98cddd723da40a576bab4dacf036534e5bf5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6c617a657276656c2f7067692e737667)](https://github.com/lazervel/pgi/releases)[![Contributors](https://camo.githubusercontent.com/39df2acb9fe813fe62125907724268ecc00108b408c8e919068891a1cd2ef1f5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f6c617a657276656c2f706769)](https://github.com/lazervel/pgi/graphs/contributors)[![Repository Size](https://camo.githubusercontent.com/56f4cdcfbb498c4fe57fbfe5fd6bf18f97cf8f578bdd2bec825b44b491b9be96/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f6c617a657276656c2f706769)](/)

### Composer Installation

[](#composer-installation)

Installation is super-easy via [Composer](https://getcomposer.org/)

```
composer require lazervel/pgi
```

OR:

Click to [Browse package](https://packagist.org/packages/lazervel/pgi)

Payment Integrations
--------------------

[](#payment-integrations)

- [Razorpay Integration](#razorpay-integration)

Razorpay Integration
--------------------

[](#razorpay-integration)

Start accepting domestic and international payments from customers on your website using the Razorpay Payment Gateway. Razorpay has developed the Standard Checkout method and manages it. You can configure payment methods, orders, company logo and also select custom colour based on your convenience. Razorpay supports these payment methods and international currencies.

### Configuration

[](#configuration)

```
use Lazervel\PGI\Razorpay;

require 'vendor/autoload.php';
$rzp = new Razorpay;
```

### Create an Order in Server

[](#create-an-order-in-server)

In the sample app, the index.php file contains the code for order creation using Orders API.

```
use Lazervel\PGI\Razorpay;

$rzp = new Razorpay;
$rzp->order(
  50,    // Amount In Rupees        [required]
  'INR', // Currency => default INR [optional]
  ['name' => 'Payment Getaway'] // Notes => default empty [] [optional]
);
```

**Promises:**

```
use Lazervel\PGI\Promises\Razorpay;

$rzp = new Razorpay;
$rzp->order(
  50,    // Amount In Rupees        [required]
  'INR', // Currency => default INR [optional]
  ['name' => 'Payment Getaway'] // Notes => default empty [] [optional]
)->then(function($data) {
  print_r($data);
})->catch(function($err) {
  print_r($err);
})->finally(function() {
  echo 'always run';
});
```

### Verify Payment Signature

[](#verify-payment-signature)

This is a mandatory step that allows you to confirm the authenticity of the details returned to the checkout for successful payments.

```
use Lazervel\PGI\Razorpay;

$rzp = new Razorpay;

$orderId   = $_SESSION['razorpay_order_id'];   // Where you stored
$paymentId = $_SESSION['razorpay_payment_id']; // Where you stored
$signature = $_SESSION['razorpay_signature'];  // Where you stored

// All parameter is required
$rzp->verifySignature($orderId, $paymentId, $signature);
```

**Promises:**

```
use Lazervel\PGI\Promises\Razorpay;

$rzp = new Razorpay;

$orderId   = $_SESSION['razorpay_order_id'];   // Where you stored
$paymentId = $_SESSION['razorpay_payment_id']; // Where you stored
$signature = $_SESSION['razorpay_signature'];  // Where you stored

// All parameter is required
$rzp->verifySignature($orderId, $paymentId, $signature)->then(function($data) {
  print_r($data);
})->catch(function($err) {
  print_r($err);
})->finally(function() {
  echo 'always run';
});;
```

License
-------

[](#license)

Licensed Under [MIT](LICENSE)

Copyright (c) 2025 [Indian Modassir](https://github.com/indianmodassir)

Contributing
------------

[](#contributing)

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.

Resources
---------

[](#resources)

[Report issue](https://github.com/lazervel/path/issues) and [send Pull Request](https://github.com/lazervel/path/pulls) in the [main Lazervel repository](https://github.com/lazervel/path)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance66

Regular maintenance activity

Popularity8

Limited adoption so far

Community6

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

206d ago

### Community

Maintainers

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

---

Top Contributors

[![indianmodassir](https://avatars.githubusercontent.com/u/152081666?v=4)](https://github.com/indianmodassir "indianmodassir (9 commits)")

---

Tags

pgirazorpayrazorpay-integrationphpintegrationrazorpaypayment getway

### Embed Badge

![Health badge](/badges/lazervel-pgi/health.svg)

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

###  Alternatives

[cartalyst/stripe-laravel

Laravel 11 integration for the Cartalyst Stripe package.

3382.6M9](/packages/cartalyst-stripe-laravel)[yandex-money/yandex-money-sdk-php

Yandex.Money API SDK for PHP

105167.4k2](/packages/yandex-money-yandex-money-sdk-php)[razorpay/magento

Razorpay Magento 2.0 plugin for accepting payments.

3076.5k1](/packages/razorpay-magento)[msonowal/laravel-razor-pay-cashier

Laravel Cashier provides an expressive, fluent interface to Razorpay's subscription billing services.

2625.3k](/packages/msonowal-laravel-razor-pay-cashier)[cryptonator/merchant-php-sdk

Cryptonator.com Merchant API SDK for PHP

2713.7k](/packages/cryptonator-merchant-php-sdk)

PHPackages © 2026

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