2.0.1 • Published 6 years ago

payumoney-node v2.0.1

Weekly downloads
111
License
ISC
Repository
github
Last release
6 years ago

PayUMoney NodeJs Wrapper

The PayUMoney Node library provides convenient access to the PayUMoney API from applications written in server-side JavaScript.

Documentation

See the PayUMoney API docs.

The package needs to be configured with your account's Merchant Key, Mecrhant Salt and Authorization Key, which are available in your PayUMoney Dashboard. ###Installation Install the package with:

npm install payumoney-node --save

Include and set keys

var payumoney = require('payumoney-node');
payumoney.setKeys(MERCHANT_KEY, MERCHANT_SALT, AUTHORIZATION_HEADER);

Set Mode

payumoney.isProdMode(true); // production = true, test = false

APIs Available

Create new payment request

var paymentData = {
    productinfo: "",
    txnid: "",
    amount: "",
    email: "",
    phone: "",
    lastname: "",
    firstname: "",
    surl: "", //"http://localhost:3000/payu/success"
    furl: "", //"http://localhost:3000/payu/fail"
};

payumoney.makePayment(paymentData, function(error, response) {
  if (error) {
    // Some error
  } else {
    // Payment redirection link
    console.log(response);
  }
});

Get Payment Status

payumoney.paymentResponse("txnid", function(error, response) {
  if (error) {
    // Some error
  } else {
    console.log(response);
  }

Initiate refund

payumoney.refundPayment("paymentId", "amount", function(error, response) {
  if (error) {
    // Some error
  } else {
    console.log(response);
  }
});

Get refund status

payumoney.refundStatus("paymentId", function(error, response) {
  if (error) {
    // Some error
  } else {
    console.log(response);
  }
});

Submit issues

You can raise an issue in this repo or mail me at pwnkumar016@gmail.com

2.0.1

6 years ago

2.0.0

6 years ago

1.1.9

7 years ago

1.1.8

7 years ago

1.1.7

7 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago