Reputation: 1
in my case, I want to send price information to my credit card reader to receive payment.
I want to enter the price information in the program I wrote and send the price information to my POS device via the USB comport connection. I created a code using node.js for this, but while it shows that it is working in the terminal, payment information does not come to the POS device. ingenico move3500
const SerialPort = require('serialport').SerialPort;
const COM_PORT = 'COM4';
const BAUD_RATE = 115200;
const sendPriceToPos = (price) => {
const port = new SerialPort({path:COM_PORT, baudRate: BAUD_RATE }, (err) => {
if (err) {
return console.error('Connection Error:', err.message);
}
console.log(`POS connected: ${COM_PORT}`);
const command = `PRICE`;
port.write(command, (err) => {
if (err) {
return console.error('ERROR:', err.message);
}
console.log(`Amound İnfo Sended: ${price}`);
port.close((err) => {
if (err) {
return console.error('Connection Shut Down Error:', err.message);
}
console.log('Connection shut down sucssesfuly.');
});
});
});
};
sendPriceToPos( 500);
Upvotes: 0
Views: 293
Reputation: 31
Ugur, I am not able to give you any help with that specific device, but I can tell you a little bit about how we do this. I work for a company named USIO and we are a payment processor. We have smart terminals that connect directly to the internet via Wifi, Ethernet, or 4G rather than a USB cable. To activate them you just make an API call to our webservice with the amount you want to charge and the terminal lights up to take that amount. They can do swipe, chip, and contactless including Apple Pay and Google Pay. They are Android based terminals and are very inexpensive. If you would like to know more I would be happy to introduce you to our head of development who can demo it for you.
Upvotes: 1