且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

与串行端口"Verifone VX520"进行通信

更新时间:2022-06-16 23:34:13

大多数Verifone终端使用特殊的消息格式在PC和内部软件之间传输信息.您的付款字符串有误.来自终端的答复是正确的. 21十进制是15h NAK,表示消息错误或crc错误. 您的字符串必须看起来像这样"\ 02PUR.10.99._000000000004.634._4761739001010010FFFFF.0808.123456. .\ 03,但我真的怀疑这些点是真正的点,而不是用不同字符(1Ch)编码的场分隔符.该消息还会丢失ETX之后的CRC字符. 首先与终端进行通信的***方法是从设备制造商或供应商那里获取要使用的POS通信协议的手册.如果您详细说明要使用POS设备实现的目标,那么它也有帮助...下载软件,使用ECR功能等.

Most Verifone terminals use a special message formatting to transfer information between a PC and the software inside. Your payment string is wrong. The reply from the terminal is correct. 21 decimal is 15h NAK meaning message is wrong or crc wrong. Your string has to look like this "\02PUR.10.99._000000000004.634._4761739001010010FFFFF.0808.123456. .\03" but i really doubt that the dots are really dots and not Field Separators that code with a different character (1Ch). the message also misses the CRC character after ETX. The best way of communicating with the terminal first is obtaining the manual for the POS communication protocol you are trying to use from the device manufacturer or from the vendor. It also helps if you detail what you are trying to achieve with the POS device...Download software, use the ECR functionality,etc.