Connect a credit card reader to web application?(将信用卡读卡器连接到 Web 应用程序?)
问题描述
有没有办法将读卡器连接到我的网络应用程序 (javascript),这样用户就不必手动输入信用卡信息?
Is there a way to connect a card reader to my web application (javascript) so that the user don't have to manually type in the credit card information?
此网络应用程序用于在商店购买产品.用户点击要购买的商品,然后在阅读器中刷信用卡,他会得到一张收据.
This web app is for buying products on a store. The user clicks on what items he want to purchase and then he swipes the credit card in the reader and he will get a receipt.
推荐答案
其实是有可能的,因为简单的 USB 读卡器作为键盘输入设备.由于它充当键盘输入,一旦输入框成为焦点,您就可以刷卡,使用一些漂亮的 jQuery 等将其推送到隐藏字段,然后从那里处理它.
Actually, it is possible due to the fact that simple USB card readers act as keyboard input devices. Since it acts as a keyboard input, once an inputbox is in focus you could swipe the card, push it to a hidden field using some nifty jQuery etc and then process it from there.
请查看我对 Maris 链接到的那个问题的回答.
2016 年 2 月
我用一个非常简单的 jQuery 实现创建了一个 GitHub Gist.
I created a GitHub Gist with a very simple jQuery implementation.
这篇关于将信用卡读卡器连接到 Web 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:将信用卡读卡器连接到 Web 应用程序?
基础教程推荐
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
- 每次设置弹出窗口的焦点 2022-01-01
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
