This is the base ruby gem for interacting with the Razorpay API. This is primarily meant for users who wish to perform interactions with the Razorpay API programatically.
Add this line to your application's Gemfile:
gem 'razorpay'
And then execute:
$ bundle
Or install it yourself as:
$ gem install razorpay
Ruby 2.6.8 or later
Remember to require 'razorpay'
before anything else.
Next, you need to setup your auth details. This setup can be done via two ways:
you need to setup your key and secret using the following:
Razorpay.setup('key_id', 'key_secret')
You can set customer headers for your requests using the following:
Razorpay.headers = {"CUSTOM_APP_HEADER" => "CUSTOM_VALUE"}
you need to setup your access token using the following
Razorpay.setup_with_oauth('access_token')
You can set customer headers for your requests using the following:
Razorpay.headers = {"CUSTOM_APP_HEADER" => "CUSTOM_VALUE"}
You can find your API keys at https://dashboard.razorpay.com/#/app/keys.
If you are using rails, the right place to do this might be config/initializers/razorpay.rb
.
git checkout -b my-new-feature
)rake
and rubocop
after making your changes to make sure you didn't break anythinggit commit -am 'Add some feature'
)git push origin my-new-feature
)Steps to follow for a release:
lib/razorpay/constants.rb
CHANGELOG
CHANGELOG
gem build razorpay-ruby.gemspec
gem push razorpay-{version}.gem
gem push
will ask you for credentials, if you are not logged in already.