发送大量资金到读卡器

问题描述 投票:0回答:1

就我而言, 我想将价格信息发送到我的信用卡读卡器以接收付款。

我想在我编写的程序中输入价格信息,并通过 USB 端口连接将价格信息发送到我的 POS 设备。我为此使用 node.js 创建了一个代码,但虽然它显示它正在终端中运行,但支付信息不会到达 POS 设备。 因吉尼科 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); 
node.js payment com-port cardreader
1个回答
0
投票

Ugur,我无法为您提供有关该特定设备的任何帮助,但我可以告诉您一些关于我们如何做到这一点的信息。 我在一家名为 USIO 的公司工作,我们是一家支付处理商。 我们的智能终端可以通过 Wifi、以太网或 4G 而不是 USB 电缆直接连接到互联网。 要激活它们,您只需使用您想要充电的金额对我们的网络服务进行 API 调用,终端就会亮起以收取该金额。 他们可以进行刷卡、芯片和非接触式支付,包括 Apple Pay 和 Google Pay。 它们是基于 Android 的终端,而且非常便宜。 如果您想了解更多信息,我很乐意向您介绍我们的开发主管,他可以为您演示。

© www.soinside.com 2019 - 2024. All rights reserved.