1.2.0 • Published 2 years ago

node_paylink v1.2.0

Weekly downloads
13
License
ISC
Repository
-
Last release
2 years ago

node_paylink

Version

See package.json for version

About

node_paylink is a node library that has integration with PayLink system agregator for Self Service Betting Terminal equipment. It handles communication with Paylink Driver and communicate with bill, coin acceptors and switches as well as lightning. Escrow bill accepting is also supported if hardware has an option. (Escrow is an option where bill acceptor takes the money halfway and then you can return or accept).

Technologies used

Writen in C++, C, Javascript

Hardware prerequisites

PayLink or PayLink Lite

Prerequisites and dependecies

All paylink drivers must be installed for this library to be built and to function, please test that everything is working using their GUI tool after that you can use this library.

Installing

Enter the project directory and install all the dependecies with:

npm install --save node_paylink

Running

const paylink = require( 'node_paylink' );

//mandatory init that turns the equipment on
paylink.init({
    escrow: true, //true to turn on escrow
    serialNumber: '1234567', //optional, if you are connecting to certain paylink hardware
    disableCoinOnEscrow: true //optional to disable coin acceptors if note is in escrow
});

//if you want to enable escrow manually, not through the init method
paylink.enableEscrow(); 

//if there is money in escrow accept it
paylink.acceptEscrow();
//if there is money in escrow return it
paylink.returnEscrow();
//enable money interface (called through init)
paylink.enableMoneyInterface();
//disable money interface
paylink.disableMoneyInterface();

//turn led with ID 1 on 
paylink.ledOn(1);
//turn led with ID 1 off
paylink.ledOff(1);
//returns the number of total openings for switch ID 1
paylink.switchOpened(1);
//returns the number of total closings for switch ID 1
paylink.switchClosed(1);

//when money is inserted this event will fire, beware if escrow is on, it will fire once the escrow money is inserted and once it is accepted
paylink.on('money', (money) =>
{
    console.log('Received: '+JSON.stringify(money));
    //Received: {"insertedEscrowMoney":500,"insertedMoney":0,"totalEscrowMoney":3000,"totalMoney":31045,"changed":true,"isEscrow":true}
    //Received: {"insertedEscrowMoney":0,"insertedMoney":500,"totalEscrowMoney":3000,"totalMoney":31545,"changed":true,"isEscrow":false}

    if(money.isEscrow)
    {
        paylink.acceptEscrow();
    }
});

// if escrow money is returned either by issuing the return command or paylink returned itself money in escrow will not be deducted, escrow money is counting all money that was in escrow

//when some switch is turned on or off this event will fire
paylink.on('switch', (index, status) =>
{
    console.log('Switch with index: '+index+' is: '+status);
});

Whenever you enable money interface, escrow should be enabled too:
  paylink.enableMoneyInterface();
  paylink.enableEscrow();

Built With

Node.js - Language used C++ - Language used

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

Dario Filkovic

License

This project is licensed under the Trade Secret License Keywords none

1.2.0

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago