Socket
Book a DemoInstallSign in
Socket

razorpay_integration

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

razorpay_integration

bundlerRubygems
Version
0.1.2
Version published
Maintainers
1
Created
Source

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.

License

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

FAQs

Package last updated on 17 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts