Code Monkey home page Code Monkey logo

meteorjs-instamojo's Introduction

Please use this package now: https://github.com/Instamojo/meteorJS-instamojo/ which is now the official release from Instamojo

meteor add instamojo:instamojo

#Instamojo Payment Package

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

#INSTRUCTIONS

###To include the package

meteor add ankitv89:instamojo

Add the following line to Meteor.startup in Server

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

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: '[email protected]',
  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

meteorjs-instamojo's People

Contributors

ankitv89 avatar ashwch avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.