payumoney-pay
v2.1.1
Published
Easy payumoney money integration with node
Downloads
9
Maintainers
Readme
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":"[email protected]",
"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 [email protected]