如何使用 vb winforms 应用程序收集刷卡信息?

发布于 2024-10-31 10:51:50 字数 92 浏览 1 评论 0原文

我开发了计费项目。我将实现刷卡器。我对 VB + winforms 的刷卡器应用程序一无所知,

有人可以帮助我吗?

提供示例和教程等...

I developed the billing project. I going to implement the card swipe reader. I have no idea about the card swipe reader application with VB + winforms

Can some one help me !!

Give samples and tutorials etc...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

默嘫て 2024-11-07 10:51:50

这很大程度上取决于您的读卡器。

一般来说有两种读卡器,一种是模拟 HID 的,另一种是通过 COM 接口进行通信的。有些人同时做这两件事,但不是同时做。

如果您的读卡器具有键盘模拟功能,则无需执行任何特殊操作 - 读卡器会自动将数据输出到具有焦点的文本框。

如果您的读卡器使用 HID(人机接口设备),那么您将需要考虑使用串行通信,并且需要参考读卡器的制造商以获取要使用的命令。看看这个(http://msdn.microsoft.com/en-us /library/7x7cdt5c.aspx)了解有关串行端口使用的一些基础知识。

我还注意到您的问题上标记了“信用卡”。我不太了解如何编写旨在捕获和使用该数据的应用程序 - 但请阅读有关使用和存储该数据的法律。一个好的起点是 https://www.pcisecuritystandards.org/security_standards/

A lot of this really depends on your card reader.

There are generally speaking two kinds of card readers, ones that emulate HID and ones that communicate via a COM interface. There are some that do both, though not at the same time.

If your card reader has keyboard emulation, then nothing special needs to be done - the card reader will automatically output the data to the textbox that has the focus.

If your card reader uses HID (Human Interface Device), then you will need to look into using serial communications and need to reference the Mfg. of your card reader for the commands to use. Take a look at this (http://msdn.microsoft.com/en-us/library/7x7cdt5c.aspx) for some basics on serial port usage.

I also noticed "credit-card" was tagged on your question. I don't know much about writing an app designed to capture and use that data - but read up on the laws regarding using and storing this data. A good place to start is https://www.pcisecuritystandards.org/security_standards/.

扭转时空 2024-11-07 10:51:50

首先拿到设备和几张卡。

步骤 A. 确定读卡器类型

如果有 USB 线)。将其连接到电脑

  • 启动记事本。
  • 刷卡。
  • 如果收到数据,则转至步骤 B

如果上述步骤未收到数据。

  • 拔掉设备插头。
  • 启动设备管理器。
  • 展开端口节点。
  • 记下端口号。
  • 插头装置。
  • 将添加一个comport。
  • 打开 开始-accessories-communications-hyperterminal
  • 在超级终端中打开此端口。
  • 刷卡。如果没有收到数据或收到乱码数据,请更改波特率并重试。
  • 如果收到清晰的数据,请转至步骤 B

步骤 B

尝试将收到的数据与刷卡卡号进行匹配。

如果匹配,则完成。

否则尝试研究该模式。它可能是一个十六进制字符串。

步骤 C.

如果数据是在记事本(HID 设备)中接收的,那么它很简单,只需在表单上添加一个文本框并将焦点设置到它即可。刷卡时,数据编号将显示在文本框中。

如果超级终端(Comm/Serail 读卡器)接收到数据。然后你必须添加一个串口读取器并相应地读取和解析数据。

***请提供上述步骤中收到的样本卡号和字符串,我们将尝试解析它。

Just get the device and few cards in hand first.

Step A. Identify the reader type

If it has usb cord. Connect it to pc

  • Start notepad.
  • Swipe the card.
  • If data received goto step B

If data is not received by above step.

  • Unplug the device.
  • Start device manager.
  • Expand the Ports node.
  • Note the port numbers.
  • Plug device.
  • A comport would get added.
  • Open Start-accessories-communications-hyperterminal
  • Open this port in hyper terminal.
  • Swipe card. If no data or garble data is received, change the baud rate and try again.
  • If legible data is received goto step B

Step B.

Try to match the data received with the swipe card number.

If it matches, you are through.

Else try to study the pattern. It might be an hex string.

Step C.

If the data is received in notepad (HID Device) then its simple, just add the add a texbox on form and set focus to it. When card is swiped the data number will be shown in textbox.

If data is received in Hyper terminal(Comm/Serail reader). Then you have to add a serial port reader and read and parse data accordingly.

***Pls provide the sample card number and string received in above step we will try to parse it.

蓝眼泪 2024-11-07 10:51:50

关于这个主题的信息似乎确实不多。查看 MSDN 上的此线程论坛,它和里面提供的链接可能对您有用。我在浏览一些帖子时发现的一个常见主题,以及在您的应用程序中使用第三方硬件时通常都是正确的,就是联系刷卡阅读器的制造商并从他们那里获取文档,因为他们很可能拥有所有该信息已存档。祝你好运!

There really doesn't seem to be a lot of information out there about this topic. Check out this thread on the MSDN forums, it and the link provided inside might be useful to you. One common theme I found while browsing through some posts, and something that's just generally true when using third-party hardware with your app, is to contact the manufacturer of the swipe reader and get documentation from them, as they'll most likely have all that information on file. Good luck!

三五鸿雁 2024-11-07 10:51:50

回想一下,在处理信用卡读卡器时,没有什么……它基本上是一个键盘楔形设备……我有类似的设备,用于使用连接到 USB 端口的手持扫描仪读取条形码。

要进行测试,只需打开一个文档,例如在记事本中。连接设备(例如 USB 连接的扫描仪),然后刷卡...如果文本只是像键盘扫描一样被推过,则只需让数据输入字段捕获文本的完整长度(例如 100 个字符)然后解析它。

Going WAYYY back for me, when dealing with credit card readers, there was nothing to it... it was basically a keyboard wedge device... I have similar device for reading barcodes with a hand scanner connected to USB port.

To test, just open up a document, such as in notepad. Connect the device (such as USB connected scanner), and swipe the card... if the text is just shoved through as if a keyboard scan, just have a data entry field capture the text to its full length (such as 100 characters) then parse it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文