Skip to content

SetSplin/qr-receipt-info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qr-receipt-info

Get Russian receipt info using string from qr code

NPM Version

Install

Via npm

npm i -S qr-receipt-info

Via yarn

yarn add qr-receipt-info

Usage

To get info you need to register in mobile app.

import ReceiptInfoGetter from 'qr-receipt-info';


const qr_string =
  't=<number>&s=<number>&fn=<number>&i=<number>&fp=<number>&n=<number>'; // string from qr code

const receiptInfo = new ReceiptInfoGetter({
  username: '+79999999999', // phone that you used to register
  password: '000000', // password that you received in sms
  delay: 500, // delay between queries (to get info getter makes two queries)
  // is necessary so as not to get an error from the server
})

receiptInfo.get(qr_string).then(
  info => {
    if (info) { // null if not found
      info.items.forEach(el => console.log(el));
    }
  }
);

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published