{"_id":"@adamfrostt/bill-acceptor","_rev":"1-cad4f3216c61bd5aa40bb7642ee560cb","name":"@adamfrostt/bill-acceptor","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@adamfrostt/bill-acceptor","version":"0.1.0","description":"Bill Acceptor","main":"cli.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://lab.orionlab.org/lab/cms/bill-acceptor.git"},"bin":{"bill-acceptor":"./cli.js"},"license":"UNLICENSED","dependencies":{"body-parser":"^1.19.0","encrypted-smiley-secure-protocol":"^0.0.6","express":"^4.17.1","hashmap":"^2.4.0","moment":"^2.24.0","request":"^2.88.0","serialport":"^7.1.5","winston":"^3.2.1","winston-daily-rotate-file":"^4.4.1"},"devDependencies":{},"author":"","gitHead":"6eeda77631933b3ccedb94754fe0041fd301fb1d","_id":"@adamfrostt/bill-acceptor@0.1.0","_nodeVersion":"12.13.1","_npmVersion":"6.12.1","dist":{"integrity":"sha512-23HXBV8Mto10izBmUByNL8n1/kJg94i/vaOOrO+AwAu5eJeBTisPw+aUqa8XlKRglC5nsODtBnpr3Kko/M+YRg==","shasum":"8e7382816a00d6cb8dc5d7b56708495cb7a3d62c","tarball":"https://registry.npmjs.org/@adamfrostt/bill-acceptor/-/bill-acceptor-0.1.0.tgz","fileCount":4,"unpackedSize":21951,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMa63CRA9TVsSAnZWagAAeFYP/RnZQZ0L8It7GUFq90gi\npRegzwlJs0Pcn7TOLh4X0SXltdr9AXVu7U/uYbMIaAtEDW7BHeH1eMY0zSnc\nQjkYefFKWjjnd4AMjkvxOLdlHAji8MT4T7p6DKxSWluth+lt80xbvMhUHevL\nG1RsV0pbqbT2oorm4Mp5IixJGom7dzKxSwkM0LR79xQ/ARE5wSrhEmvHvOmr\nwbipwumMCyCNaqjlpU/MaiWAc8mOHtrAqMwi7zhhtY4cOcQLPw9gqRr7Wzna\nrUGB00HJxjH+SaHqU7kjopAmwCrQNsvTC4pmJ7xMv65hoelclTq643Wc6PBp\n3Fv2R17HK9nvZJxfJ+4+g2Ul5eZbLDog8/hupGaluM0jkuUgQOU2P1Mmevfi\nLZvcOEK9G1wZcnnJh++h/+6StwpRJVh0LAidnYCeKKvCzoVEnT9KIx0sziLO\nvljRJMZtLCwfWvYF0tsKvWcvuZEJ7BIaU+Awp040rzIVZAOKRAMQfA7GyOYb\nVjOp535584O1v7N29DX/HSX2mWgjZDve4giwkCv0ijGZwzKLKZZGJU88iQig\nvqUIws3Ato284EuEwsFN4p3i4sR5YAkK9lMP0HKiziTn4kbYM4TtyJLE416h\nJVfF12ZWXwZ7+/rYdSZCbCJ1Rgvubu8lL//ORDZGieHi770fKb2gXZdXf0M5\n5fP/\r\n=Lt+j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHnjdXqXrnFF9XkP9DvsQnl3/Ese3ca7e+BU1vTIfAoYAiBB3H8DWLEVXfWDcgIqLY1/ewRhNBXWldGHHprEcYpgew=="}]},"maintainers":[{"name":"adamfrostt","email":"adamfrost839@gmail.com"}],"_npmUser":{"name":"adamfrostt","email":"adamfrost839@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bill-acceptor_0.1.0_1580314294666_0.6144272219861837"},"_hasShrinkwrap":false}},"time":{"created":"2020-01-29T16:11:34.625Z","0.1.0":"2020-01-29T16:11:34.802Z","modified":"2022-04-04T11:25:14.143Z"},"maintainers":[{"name":"adamfrostt","email":"adamfrost839@gmail.com"}],"description":"Bill Acceptor","repository":{"type":"git","url":"git+https://lab.orionlab.org/lab/cms/bill-acceptor.git"},"license":"UNLICENSED","readme":"# Bill Acceptor\n\n## Setup and running\n\nInstall node **v12.13.x** (MUST be v12.13.x otherwise serial library will cause an error)\n[https://scotch.io/@vishalbiradar/how-to-install-specific-version-of-nodejs]\n\nAlso serial library must be installed with sudo and globally.\nUse `sudo npm install -g serialport --unsafe-perm` in order to circumvent the errors that\ncan (and will) appear.\n\nInstall all npm dependencies with\n`sudo npm install`\n\nRun witn `sudo node srv-proto.js`\n\nMust be used with `sudo` because of serial/USB device access\n\nSession is started by POST `/api/init` on `localhost:8081` (port can be changed in `config.js`)\nThe POST json is the same that the init service on the backend returns \n(i.e. After it is executed on backend, it should automatically call node's `/api/init`, \nbut for testing we trigger it via postman manually)\n\nThen the 60 sec session is started and within that period the money can be inserted\nIt will automatically call `callbackCashPayIn` and `callbackCashPaymentConfirm` on the backend (as defined in init call) \nevery time the money is inserted successfully \n(if it is not rejected by the acceptor, in which case we may log the error \nbut the session continues to count down where it left off)\n\nThe session is reset to default (60 sec) every time a new bill is inserted\n\nTo get the amount use\n`/api/get/current/amount` which also returns the remaining session time\nIn case of an error 'expired session' a call to finish session should be made from the site\n\nThe inserted bills are all stored in the session\n\nThe session is returned when called `/api/finish/session` together with all inserted banknotes' data and the amount\n\nLogs are being placed in the apps directory in form bill-acceptor.YYYY-MM-DD.log\nOld logs are zipped. Logs older than 30 days (can be changed in `config.js` are automatically deleted).\n\n## Running The Compiled Version\n\nThe compiled version is provided in executable form for linux (`bin/app`).\n`config.js` **MUST** be placed in the same directory where the executable is, otherwise it won't work.\nThen just run with `sudo ./app` from the app's folder.\n\nIn case of the changes a new compiled version can be made by installing `pkg` package (`sudo npm i -g pkg`) on a system\nwhere the code can run (all npm dependencies present etc), and then compiling with\n`sudo pkg --targets=linux app.js` from the app folder. It will complain about the path for \n`config.js` but that can be ignored as it will be placed in the same folder.\n\n## List of Required npm Libraries:\n\n* encrypted-smiley-secure-protocol\n* express\n* body-parser\n* moment\n* hashmap\n* request\n* winston\n* winston-daily-rotate-file\n","readmeFilename":"README.md"}