rob
robokassa
npm i robokassa
rob

robokassa

Robokassa merchant for node

by Petr Ystyugov

0.0.4 (see all)TypeScript:Not Found
npm i robokassa
Readme

Node - Robokassa

This is node package for work with robokassa.ru API

Installation

$ npm install robokassa

Usage:

var Robokassa = require('robokassa');
var  r = new Robokassa({login: "login", password: "pa$$w0rd"});
/*
* generate merchat link
* return https://auth.robokassa.ru/Merchant/Index.aspx?MrchLogin=.... .... .....
*/
r.merchantUrl({ id: "invoice number", summ: 500, description: "description of invoice"});
/*
* check payment 
* return true if success else return false
*/
r.checkPayment(req.params);

Example for express:

var Robokassa = require('robokassa');
var  r = new Robokassa({login: "login", password: "pa$$w0rd"});

express.get('/', function (req, res){
    link = r.merchantUrl({ id: "invoice number", summ: 500, description: "description"});
    res.render('index', { paymentLink: link});
});


express.get('/payment/result', function (req, res){
    if(r.checkPayment(req.params)){
        console.log("PAYMENT SUCCESS!");
    }else{
        console.log("PAYMENT NOT SUCCESS!");
    }
});

express.get('/payment/true', function (req, res){
    res.render('payment_true');
});

express.get('/payment/false', function (req, res){
    res.render('payment_false');
});
  • node.js - evented I/O for the backend
  • Express - fast node.js network app framework [@tjholowaychuk]
  • robokassa.ru - Robokassa API

Downloads/wk

6

GitHub Stars

10

LAST COMMIT

7yrs ago

MAINTAINERS

1

CONTRIBUTORS

4

OPEN ISSUES

1

OPEN PRs

0
VersionTagPublished
0.0.4
latest
6yrs ago
No alternatives found
No tutorials found
Add a tutorial

Rate & Review

100
No reviews found
Be the first to rate