Skip to content

Instamojo/meteorJS-instamojo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Instamojo Payment Package

Use this package to use the Instamojo Payment Gateway to your applications

#INSTRUCTIONS

###To include the package

meteor add instamojo:instamojo

Add the following line to Meteor.startup in Server

mojo = Instamojo('API_KEY', 'AUTH_TOKEN');

Note:

If you're using this wrapper with our sandbox environment https://test.instamojo.com/ then you should pass 'https://test.instamojo.com/api/1.1/' as third argument to the Instamojo class while initializing it. API key and Auth token for the same can be obtained from https://test.instamojo.com/developers/ (Details: Test Or Sandbox Account).

mojo = Instamojo('API_KEY', 'AUTH_TOKEN', 'https://test.instamojo.com/api/1.1/');

##Methods These Methods will only work on server side

###Create Payment Request

mojo.createRequest(payload);

Example Payload:

var payload = {
  purpose: 'FIFA 16',
  amount: '2500',
  phone: '9999999999',
  buyer_name: 'John Doe',
  redirect_url: 'http://www.example.com/redirect/',
  send_email: true,
  webhook: 'http://www.example.com/webhook/',
  send_sms: true,
  email: 'foo@example.com',
  allow_repeated_payments: false}

###List Payment Request

mojo.listRequest();

###Request Details

mojo.getRequestDetails(id);

id is the payment ID for which the request is to be made.

###Payment Details

mojo.getPaymentDetails(payment_request_id, payment_id);

Example payload

payload = {
  payment_id: "MOJO5a06005J21512197",
  type: "QFL",
  body: "Customer isn't satisfied with the quality"
}

###Create refunds

mojo.createRefund(payload);

###List refunds

mojo.listRefund();

###Refund Details

mojo.getRefundDetails(id)

Id is the refunds ID.

For more details please refer to Instamojo API Doc

###License MIT License - Read Here

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%