This question may seem a bit silly because Clover's documentation clearly states that they support ZVT.
But the problem is that we have implemented the ZVT protocol and it works on some other devices, but it doesn't work on Clover.
Even responding to a simple request doesn't work, which makes me wonder if Clover actually supports ZVT.
const net = require('net'); // Clover terminal details const TERMINAL_IP = '192.168.1.11'; const TERMINAL_PORT = 25690; // Example ZVT command: Payment request for 10.00 EUR const paymentCommand = Buffer.from([ 0x06, // STX 0xD1, // Command: Payment 0x00, 0x10, // Amount: 10.00 EUR (BCD, big-endian) 0x03, // ETX 0xC4 // Checksum (update if needed based on calculation) ]); // Function to calculate checksum (XOR of all bytes between STX and ETX) function calculateChecksum(buffer) { let checksum = 0; for (let i = 1; i < buffer.length - 2; i++) { checksum ^= buffer[i]; } return checksum; } // Update the checksum in the command paymentCommand[paymentCommand.length - 1] = calculateChecksum(paymentCommand); // Create TCP client const client = new net.Socket(); client.connect(TERMINAL_PORT, TERMINAL_IP, () => { console.log(`Connected to Clover terminal at ${TERMINAL_IP}:${TERMINAL_PORT}`); // Send the payment command client.write(paymentCommand); console.log('Payment command sent:', paymentCommand.toString('hex')); }); // Handle incoming data client.on('data', (data) => { console.log('Response from terminal:', data.toString('hex')); client.destroy(); // Close the connection }); // Handle connection closure client.on('close', () => { console.log('Connection closed.'); }); // Handle errors client.on('error', (err) => { console.error('Error:', err.message); }