承接 lazervel/pgi 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lazervel/pgi

最新稳定版本:v1.0.0

Composer 安装命令:

composer require lazervel/pgi

包简介

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

README 文档

README

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

Total Downloads Latest Version Contributors Repository Size

Composer Installation

Installation is super-easy via Composer

composer require lazervel/pgi

OR:

Click to Browse package

Payment Integrations

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

use Lazervel\PGI\Razorpay;

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

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

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

Licensed Under MIT

Copyright (c) 2025 Indian Modassir

Contributing

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

Resources

Report issue and send Pull Request in the main Lazervel repository

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-19