lakshmaji/razorpay
Composer 安装命令:
composer require lakshmaji/razorpay
包简介
Razorpay payment integration for laravel
README 文档
README
Razorpay officail documentation Razorpay php library
What it is
- Razorpay is providing single vendor platform for all payment gateway integrations. This package is used to integrate the razorpay with Laravel framework
- This uses razorpy-php.
Version
1.0.5
Compatibility
| Laravel version | Razorpay version |
|---|---|
| 5.5 | 1.0.5 |
| 5.4 <= | 1.0.5 |
Note: This package is completely relays on razorpay-php library, refer here
Installation
- This package is available on packagist
composer require lakshmaji/razorpay
NOTE : This package service providers will be automatically registered with Laravel (uses package auto discovery feature 🎵)
-
For applications which uses below 5.5, it is required to add the service providers and aliases to configuration file.
- Add the Service Provider to providers array
Lakshmaji\Razorpay\RazorpayServiceProvider::class,
- Add the Facade to **aliases** array
'Razorpay' => Lakshmaji\Razorpay\Facade\Razorpay::class,
- Try updating the application with composer (dependencies but not mandatory :wink: )
composer update
Configurations
- Publish the configuration file , this will publish razorpay.php file to your application config directory.
php artisan vendor:publish
- Configure the required Razorpay configurations. You can configure them from laravel .env file, the sample configurations in .env file
#Razorpay configurations
RAZORPAY_KEY_ID=rzp_jhg54HVyt465fhj6FG
RAZORPAY_KEY_SECRET=hsjhgfYU76ghf56R^JH
Usage
- With Constructor instantiaon
<?php use Razorpay; protected $request; protected $razorpay; public function __construct( Request $request, Razorpay $razorpay ) { // Set the properties $this->request = $request; $this->razorpay = $razorpay; }
- Fetch payment details
$this->razorpay->getPaymentDetails($paymentId);
- Capture (verify) payment details
$this->razorpay->getPaymentDetails($paymentId, ['amount' => 500]);
LICENSE
lakshmaji/razorpay 适用场景与选型建议
lakshmaji/razorpay 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 212 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 12 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「composer」 「laravel」 「razorpay」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 lakshmaji/razorpay 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lakshmaji/razorpay 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 lakshmaji/razorpay 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Razorpay PHP Client Library
This composer plugin enables installation of GravityForms WordPress plugin and its addons.
Simple ASCII output of array data
Razorpay PHP Client Library
Razorpay Omnipay 3.0 plugin for accepting payments
统计信息
- 总下载量: 212
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-12-03