No release in over a year
Razorpay Integration with Rails for Payment Gateway
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.17
~> 10.0
~> 3.0

Runtime

>= 0.21.0, ~> 0.21
 Project Readme

RazorpayIntegration

RazorpayIntegration is a Ruby gem for integrating with the Razorpay API.

Installation

Add this line to your application's Gemfile:

gem 'razorpay_integration'

And then execute:

$ bundle

Or install it yourself as:

$ gem install razorpay_integration

Configuration

You can configure the gem with your Razorpay API key and secret like this:

RazorpayIntegration.configure do |config|
  config.api_key = 'your_api_key'
  config.api_secret = 'your_api_secret'
end

Usage

Here's how you can create a new customer:

Create a new customer

customer = RazorpayIntegration::Customer.new
response = customer.create('Customer Name', 'Customer Contact', 'customer@email.com')

Edit an existing customer

response = customer.edit('customer_id', 'New Customer Name', 'New Customer Contact', 'new_customer@email.com')

List customers

response = customer.list(10, 0)

Get a customer by ID

response = customer.get('customer_id')

Directory Structure

  • lib/: Contains the main codebase for the gem.

    • razorpay_integration.rb: Main module file.

    • razorpay_integration/: Contains the classes that form the core functionality of the gem.

      • version.rb: Contains the version number of the gem.
      • configuration.rb: Contains the Configuration class for configuring the gem.
      • base.rb: Contains the Base class for making HTTP requests.
      • customer.rb: Contains the Customer class for creating customers.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/nonuabi/razorpay_integration. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Gem Published URL

Find the published gem on RubyGems.org.

License

The gem is available as open source under the terms of the MIT License.