Do we need to validate something in order to create a Test account
Solved!Posted in General by Sumit Thu Nov 17 2016 07:47:06 GMT+0000 (Coordinated Universal Time)·3·Viewed 2,889 times
Hi,
I created a test account (sandbox account) and am trying to use your API in my RoR application. Upon hitting RAP api, am getting "Invalid Auth Token.". Though am setting right auth token. Do I need to do somethng related to verification before I can use your sandbox apis
below is code snippet which I borrowed from your github post https://github.com/Instamojo/Instamojo-rb
api = Instamojo::API.new(AppConfig::INSTAMOJO_API_KEY, AppConfig::INSTAMOJO_API_TOKEN)
client = api.client
payment_request = client.payment_request({amount: 100, purpose: 'api', send_email: true, email: '[email protected]', redirect_url: 'http://dummyname.com'})
Quoting from the docs:
Hence, passing
'https://test.instamojo.com/api/1.1/'
as third argument toInstamojo::API.new
will fix the issue.marked this as solved