Coder Social home page Coder Social logo

razorpay-php's Introduction

razorpay-php

Build Status Stable License

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.zip file. After that, include Razorpay.php in 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);

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

Development

See the doc.md file for getting started with development.

Release

Steps to follow for a release:

  1. Merge the branch with the new code to master.
  2. Bump the Version in src/Api.php.
  3. Rename Unreleased to the new tag in CHANGELOG.md
  4. Add a new empty "Unreleased" section at the top of CHANGELOG.md
  5. Fix links at bottom in CHANGELOG.md
  6. Commit
  7. Tag the release and push to GitHub
  8. 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.

razorpay-php's People

Contributors

ankitdas13 avatar ccrims0n avatar neera11 avatar shashankkumar avatar jitendra-1217 avatar albingeorge avatar captn3m0 avatar harman28 avatar sonyy-m avatar harshilmathur avatar ramth05 avatar amitmahbubani avatar 73sl4 avatar chetangn avatar swati31196 avatar mayur-wadpalliwar avatar msonowal avatar hancilsequeira avatar root-lib avatar mayankamencherla avatar amitmerchant1990 avatar rpshah avatar rkamath3 avatar smarchint avatar saurav1991 avatar shashankmehta avatar sunnyagg avatar deadmantfa avatar dependabot-preview[bot] avatar phpindia avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.