Файловый менеджер - Редактировать - /home/d46091/udyogaadhaar.net/blog-post/images/698279/razorpay-php.zip
Назад
PK �b�ZR-��� � README.mdnu �[��� # razorpay-php [](https://travis-ci.org/razorpay/razorpay-php) [](https://packagist.org/packages/razorpay/razorpay) [](https://packagist.org/packages/razorpay/razorpay) Razorpay client PHP Api. The api follows the following practices: - namespaced under Razorpay\Api - call $api->class->function() to access the api - api throws exceptions instead of returning errors - options are passed as an array instead of multiple arguments wherever possible - All request and responses are communicated over JSON - A minimum of PHP 5.3 is required # Installation - If your project uses composer, add following to composer.json ```json { "require": { "razorpay/razorpay": "1.*" } } ``` Then, run `composer update`. If you are not using composer, download the latest release from [the releases section](https://github.com/razorpay/razorpay-php/releases). **You should download the `razorpay-php.zip` file**. After that include `Razorpay.php` in your application and you can use the API as usual. # Usage ```php use Razorpay\Api\Api; $api = new Api($api_key, $api_secret); $api->payment->all($options); // Returns array of payment objects $payment = $api->payment->fetch($id); // Returns a particular payment $api->payment->fetch($id)->capture(array('amount'=>$amount)); // Captures a payment $api->payment->fetch($id)->refund(); // Refunds a payment $api->payment->fetch($id)->refund(array('amount'=>$refundAmount)); // Partially refunds a payment // To get the payment details echo $payment->amount; echo $payment->currency; // And so on for other attributes ``` For further help, see our documentation on <https://docs.razorpay.com>. [composer-install]: https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx ## Developing See the [doc.md](doc.md) file for getting started with development. ## License The Razorpay PHP SDK is released under the MIT License. ## Release Steps to follow for a release: 0. Merge the branch with the new code to master. 1. Bump the Version in `src/Api.php`. 2. Rename Unreleased to the new tag in `CHANGELOG` 3. Fix links at bottom in `CHANGELOG` 4. Commit 5. Tag the release and push to GitHub 6. Create a release on GitHub using the website with more details about the release PK �b�Z��M�� � Razorpay.phpnu �[��� <?php // Include Requests require_once __DIR__.'/libs/Requests-1.6.1/library/Requests.php'; // Register requests autoloader Requests::register_autoloader(); spl_autoload_register(function ($class) { // project-specific namespace prefix $prefix = 'Razorpay\Api'; // base directory for the namespace prefix $base_dir = __DIR__ . '/src/'; // does the class use the namespace prefix? $len = strlen($prefix); if (strncmp($prefix, $class, $len) !== 0) { // no, move to the next registered autoloader return; } // get the relative class name $relative_class = substr($class, $len); // // replace the namespace prefix with the base directory, // replace namespace separators with directory separators // in the relative class name, append with .php // $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php'; // if the file exists, require it if (file_exists($file)) { require $file; } });PK �b�Z�ꮟ version.txtnu �[��� 1.2.8 PK �b�ZHv�� � doc.mdnu �[��� This document talks about the implementation of the code for the Api. Everything comes under namespace Razorpay\Api\. Namespaces put a requirement of PHP 5.3 minimum ```php namespace Razorpay\ class Api { // Contains a __get function that returns the appropriate // class object when one tries to access them. } namespace Razorpay\ class Client { // Handles request and response // Uses Composer:Requests internally } class Payment { public function get($id) { } public function fetch($options) { } public function capture($id) { } public function refund($id) { } } ```PK �b�ZA[�H8 8 composer.jsonnu �[��� { "name": "razorpay/razorpay", "description": "Razorpay PHP Client Library", "keywords": [ "razorpay", "api", "php", "client" ], "authors": [ { "name": "Abhay Rana", "email": "nemo@razorpay.com", "homepage": "https://captnemo.in", "role": "Developer" }, { "name": "Shashank Kumar", "email": "shashank@razorpay.com", "role": "Developer" } ], "support": { "email": "contact@razorpay.com", "issues": "https://github.com/Razorpay/razorpay-php/issues", "source": "https://github.com/Razorpay/razorpay-php" }, "homepage": "https://docs.razorpay.com", "license": "MIT", "require": { "php": ">=5.3.2", "rmccue/requests": "v1.6.1", "ext-json": "*" }, "require-dev": { "raveren/kint": "1.*" }, "autoload": { "psr-4": { "Razorpay\\Api\\": "src/", "Razorpay\\Tests\\": "tests/" } } } PK �b�Z���{* * "