razorpay/razorpay-php
关于
Razorpay PHP Library
开发工具实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文razorpay-php
Official PHP library for Razorpay API.
Read up here for getting started and understanding the payment flow with Razorpay: https://docs.razorpay.com/docs/getting-started
Prerequisites
- A minimum of PHP 7.3 upto 8.1
Installation
- If your project using composer, run the below command
composer require razorpay/razorpay:2.*
- If you are not using composer, download the latest release from the releases section.
You should download the
razorpay-php.zipfile. After that, includeRazorpay.phpin your application and you can use the API as usual.
##Note: This PHP library follows the following practices:
- Namespaced under
Razorpay\Api - API throws exceptions instead of returning errors
- Options are passed as an array instead of multiple arguments wherever possible
- All requests and responses are communicated over JSON
Documentation
Documentation of Razorpay's API and their usage is available at https://docs.razorpay.com
Basic Usage
Instantiate the razorpay php instance with key_id & key_secret. You can obtain the keys from the dashboard app (https://dashboard.razorpay.com/#/app/keys)
use Razorpay\Api\Api;
$api = new Api($api_key, $api_secret);
Using Access Token
Instantiate the razorpay instance with access_token. The access_token can be obtained only in case if you are a platform partner. For more information, refer page - https://razorpay.com/docs/partners/platform/.
use Razorpay\Api\Api;
$api = new Api(null, null, "<ACCESS_TOKEN>");
The resources can be accessed via the $api object. All the methods invocations follows the following pattern
// $api->class->function() to access the API
//Example
$api->payment->fetch($paymentId);
Supported Resources
- Account
- Customer
- Dispute
- Document
- Token
- Order
- Payments
- Settlements
- Refunds
- Fund
- Invoice
- Iin
- Plan
- Item
- Subscriptions
- Add-on
- Payment Links
- Product Configuration
- Smart Collect
- Stakeholder
- Transfer
- QR Code
- Emandate
- Cards
- Paper NACH
- UPI
- Register Emandate and Charge First Payment Together
- Register NACH and Charge First Payment Together
- Payment Verification
- Webhook
- OAuthTokenClient
Development
See the doc.md file for getting started with development.
Release
Steps to follow for a release:
- Merge the branch with the new code to master.
- Bump the Version in
src/Api.php. - Rename Unreleased to the new tag in
CHANGELOG.md - Add a new empty "Unreleased" section at the top of
CHANGELOG.md - Fix links at bottom in
CHANGELOG.md - Commit
- Tag the release and push to GitHub
- A release should automatically be created once the travis build passes. Edit the release to add some description.
License
The Razorpay PHP SDK is released under the MIT License. See LICENSE file for more details.
探索相关项目
加载中…