npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

pardano

v1.0.0

Published

Pardano.ir Node.js Module

Readme

Pardano Node.js Module

N|Solid

نسخه فارسی مستندات این پکیج

Pardano is an Iranian website that provides online billing services and this module, helps you to use Pardano.ir Soap webservice easily and quickly in Node.js.

Installation

You can install this package just like the others with NPM:

$ npm install pardano --save

Usage

First of all, you should require pardano module and create an object of it:

const Pardano = require('pardano');
const payment = new Pardan('YOUR API KEY');

Now you can access methods by payment constant.

Methods

This package contains two methods. First, sendRequest which builds payment URL so you can create a hyperlink with payment URL action to redirect user to the bank payment page. Second, verifyRequest that can check transaction status and verify it.

sendRequest:

As you've read before, this method builds payment url:

app.get('/pardano', function (req, res) {
    payment.sendRequest(100, 'http://website.ir/pardano/verify', 1500, 'Description', function(err, link){
        if(err)
          res.end(err);
        else
          res.end("<html><body><a href='"+link+"'>Click to redirect</a></body></html>");
    });

});

First parameter is the amount of transaction that should be in Toman format.

Second is your callback URL, where you'll validate and verify transaction. When transaction successs or fails, user will redirect to this URL.

Third is order id or invoice number. It should be a number.

Fourth is the description which can be include product or transaction detail.

Fifth and the last one, is your callback function. This function has two input:

err: If there is any problem in URL building proccess, this one will be filled with error message. otherwise it will be null.

link: If everything goes on without problem, it will contains a bank payment link, otherwise will be null.

verifyRequest:

To check transaction status, you can use this method:

app.get('/pardano/verify', function(req, res){
    payment.verifyRequest(req, 100, function(success, message){
        if(success)
          res.end("Successfull");
        else
          res.end(message);
    });
});

First parameter is your web framework request object. This module uses this object to check the authority key.

Second one should be the same as you passed to sendRequest method to create payment URL.

Third is your callback function which has two input parameters:

success: A boolean input which indicates the status of the payment.

message: If success parameter is false, this parameter will contains an error message.

Sample

If you need a sample code, you can take a look at sample.js file.

License

This package is under Apache 2.0 license.