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 应用程序?


- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- 失败的 Canvas 360 jquery 插件 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01
- Fetch API 如何获取响应体? 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- addEventListener 在 IE 11 中不起作用 2022-01-01
- 400或500级别的HTTP响应 2022-01-01