Socket
Socket
Sign inDemoInstall

payumoney_nodejs

Package Overview
Dependencies
48
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    payumoney_nodejs

The paymoney_nodejs library written for NodeJs helps you to pay through payUMoney payment gateway integration.


Version published
Weekly downloads
62
increased by24%
Maintainers
1
Install size
3.93 MB
Created
Weekly downloads
 

Readme

Source

#Quick start for PayUMoney Gateway Integration :

Steps for Installation : -

Install the package with :

  npm install payumoney_nodejs --save
  

Set Merchent Key and Salt Key

  var payUMoney = require('payumoney_nodejs');
  payumoney.setProdKeys(MERCHANT_KEY, MERCHANT_SALT, PAYUMONEY_AUTHORIZATION_HEADER);
  payumoney.setSandboxKeys(MERCHANT_KEY, MERCHANT_SALT, PAYUMONEY_AUTHORIZATION_HEADER);

Set Production / SandBox Mode :

  payUMoney.isProdMode(true); //set false for use of sandbox mode

Introduction

How to make PayUMoney request

  var requestBody = {
      "firstname" : "",
      "lastname" : "",
      "email" : "",
      "phone" : 9911223344,
      "amount" : 100,
      "productinfo" : "",
      "txnid" : "", //generate unqiue transaction Id at client/server side
      "surl" : "http:localhost:8080/payment/success",
      "furl" : "http:localhost:8080/payment/failure"
    };
  
  payUMoney.pay(requestBody, function(error, response) {
      if (error) {
        // Some error console.log(response);
      } else {
        // You will get a link in response to redirect to payUMoney
       callback(null, { 'payulink' : response });
      }
    });

This API will return you PayUMoney link. You need to redirect to that link in front-end.

Parameters surl and furl must be backend API's, after paymnet success or failure, payUMoney will send POST request to these URLs with details regarding your payment.

Please refer this article for detailed integration :

https://medium.com/@swapnilnakhate/payumoney-payment-gateway-integration-with-nodejs-f715e5fc25a

You can handle db related operations (like update payment status in your database) on these API's.

Submit Issues

Email me regarding any issue me at swapnil.nakhate1010@gmail.com

Keywords

FAQs

Last updated on 16 Apr 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc