Skip to content

Application is a initial setup of the payumoney integration using PayUMoney-Pay npm Library .It is use to integrate payumoney interface into the application currently package support GetReposnse,CheckReposnse,MakePayment,SendSMSInvoice are availble.

Notifications You must be signed in to change notification settings

umeshshende/PayUMoneyPay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Version

The PayUMoney Pay 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

1. Create a payment request

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

2. Get Payment Status

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

3. Check Payment Response

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

4. Send SMS Invoice

     {
	    "customerName":"Umesh",
	    "customerMobileNumber":*****78**,
	    "description":"Test",
	    "amount":8000
    }
payumoney.sendSMSInvoice(data, function(error, response) {
  if (error) {
    // Some error
  } else {
    console.log(response);
  }

Submit issues

You can raise an issue Raise.

About

Application is a initial setup of the payumoney integration using PayUMoney-Pay npm Library .It is use to integrate payumoney interface into the application currently package support GetReposnse,CheckReposnse,MakePayment,SendSMSInvoice are availble.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published