payumoney-pay

2.1.1 • Public • Published

Version

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 i payumoney-pay --save

Include and set auth data

var payumoney = require('payumoney-pay');
payumoney.setAuthData(MODE,MERCHANT_KEY, MERCHANT_SALT, AUTHORIZATION_HEADER,SURL,FURL);

Set auth data parameters

MODE

PROD=true TEST=false

MERCHANT_KEY,MERCHANT_SALT,AUTHORIZATION_HEADER

that key,which are available in your PayUMoney Dashboard

SURL,FURL

set success url and failure url

APIs Available

Create new payment request

body parameter listed

{
     "amount":"xxx",
     "firstname":"xxxx",
     "email":"xxxx@gmail.com",
     "phone":"xxxxxxxx",
     "txnid":"xxxxxxxxxxxxxxx"
     "productinfo":"xxxx"
     "udf1":"xxxx"
}
 
payumoney.makePayment(body, function(error, response) {
  if (error) {
    // Some error
  } else {
    // Payment redirection link
    console.log(response);
  }
});
 

Get Payment Status

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

Submit issues

You can raise an issue in this mail me at umesh.shende19@gmail.com

Package Sidebar

Install

npm i payumoney-pay

Weekly Downloads

0

Version

2.1.1

License

ISC

Unpacked Size

8.19 kB

Total Files

4

Last publish

Collaborators

  • umesh1962