使用 PHP 将用户信用卡号发送到打印机

发布于 2024-09-14 22:11:07 字数 166 浏览 5 评论 0原文

我对此感到好奇有一段时间了,但始终找不到任何好的信息。我曾经在一家网上订购的披萨店工作。用户将提交他们的卡信息,我们将在商店运行它。我想知道是否有人可以告诉我这笔交易是如何发生的。如果它符合 PCI 标准,以及如何将其发送到打印机。我可以想到几种方法,但似乎没有一个是真正正确的方法。我想用 PHP 来做这件事。谢谢。

I've been curious about this for awhile and could never find any good information. I used to work at a pizza place that did online ordering. The user would submit their card information and we would run it at the store. I was wondering if someone could give me an idea as to how this transaction took place. If it was PCI compliant, and how it would be sent to the printer. I could think of a couple ways but none of them really seem to be the correct way. I'm looking to do this in PHP. Thanks.

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

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

发布评论

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

评论(2

抚你发端 2024-09-21 22:11:07

如果我在哪里设计这个系统,它会是这样的:

  1. 客户使用网络表单通过安全链接发布订单和抄送信息到服务器(使用 php 生成页面并取回信息)。
  2. 服务器将使用 支付网关 并在服务器上对卡进行计费(服务器端 PHP 脚本)。
  3. 成功计费后,它将联系餐厅盒子上运行的应用程序,并在订单票上打印内容(仅将 CC 信息的最后 4 位发送到餐厅)

根据 Chris 的建议进行了更新

If I where to design this system it would be like this:

  1. The customer posts the order and CC information using a webform over a secure link to the server (using php to generate the page and take the info back in).
  2. The server would use a payment gateway and bill the card on the server (server side PHP script).
  3. On a successful billing it would contact a application running on a box at the restaurant with what to print on the order ticket (only the last 4 digits of the CC info is sent to the restaurant)

Updated with Chris's suggestion

趴在窗边数星星i 2024-09-21 22:11:07

另一种选择是使用 PGP 使用公钥对服务器上的信用卡进行编码。当CC发送到商店时,可以使用私钥对其进行解码并查看以对其进行充电。但是,当您像这样传递信用卡信息时,您总是面临出现严重错误的风险。最好使用网关并立即向卡收费或授权交易,然后返回并通过运行授权号收取资金。

Another option is to use PGP to encode the credit card on the server with the public key. When the CC is sent to the store, it can the be decoded with the Private Key and viewed in order to charge it. But when you are passing credit card information around like that, you always run the risk of something going terribly wrong. It's always better to use a gateway and charge the card immediately or authorize the transaction and then go back and collect the funds by running the authorization number.

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