README.md in razorpay-3.2.1 vs README.md in razorpay-3.2.2

- old
+ new

@@ -25,21 +25,35 @@ Ruby 2.6.8 or later ## Usage Remember to `require 'razorpay'` before anything else. -Next, you need to setup your key and secret using the following: +Next, you need to setup your auth details. This setup can be done via two ways: +### Using Private Auth + +you need to setup your key and secret using the following: + ```rb Razorpay.setup('key_id', 'key_secret') ``` You can set customer headers for your requests using the following: ```rb Razorpay.headers = {"CUSTOM_APP_HEADER" => "CUSTOM_VALUE"} ``` +### Using Access Token +you need to setup your access token using the following +```rb +Razorpay.setup_with_oauth('access_token') +``` +You can set customer headers for your requests using the following: +```rb +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`. ## Supported Resources @@ -68,9 +82,10 @@ - [UPI](documents/upi.md) - [Register Emandate and Charge First Payment Together](documents/registerEmandate.md) - [Register NACH and Charge First Payment Together](documents/registerNach.md) - [Payment Verification](documents/paymentVerification.md) - [Webhook](documents/webhook.md) +- [OAuthToken](documents/oauth_token.md) ## Development - Everything is namespaced under the Razorpay module - We use rubocop for checking style guidelines