Sha256: ac5169430c341c90d1c5b34ef27e661d129d98fe93930d061dc3f9d1e8fa89f2
Contents?: true
Size: 1.26 KB
Versions: 3
Compression:
Stored size: 1.26 KB
Contents
For communicating with the Payg API, use this basic Ruby gem. This is primarily intended for those who want to connect with the Payg API programatically. ## Installation Add this line to your application's Gemfile: ```rb gem 'payg' ``` And then execute: $ bundle Or install it yourself as: $ gem install payg ## Requirements Ruby 2.6.8 or later ## Usage Remember to `require 'payg'` before anything else. Next, you need to initialize your AuthenticationKey, AuthenticationToken and MerchantKeyID using the following: ```rb Payg.init('AuthenticationKey', 'AuthenticationToken', 'MerchantKeyId') ``` You can find your API keys at <https://payg.in/merchant/login>. If you are using rails, the right place to do this might be `config/initializers/payg.rb`. ## Usage ### Create order ```rb payload = { Merchantkeyid: "8792", UniqueRequestId: "035bbf02a1f", RequestDateTime: "06232021", RedirectUrl: "https://payg.in", OrderAmount: "100", OrderAmountData: { AmountTypeDesc: "3", Amount: "2"}, CustomerData: { MobileNo: "8619083450", Email: "demo@gmail.com"} } Payg::Order.create(payload.to_json) ``` ### Order detail ```rb payload = { OrderKeyId: "76719231011M8792Uf3f5b5ee3fe", MerchantKeyId: '8792', PaymentType: '' } Payg::Order.detail(payload.to_json) ```
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
payg-0.1.2 | README.md |
payg-0.1.1 | README.md |
payg-0.1 | README.md |