电子商务交易-PHP
我没有使用过网络技术,所以这似乎是一个天真的问题。
我正在尝试解决我们网页上的问题之一,该页面负责创建电子商务交易并将其发送到 sagepay。问题是,它的所有字段都是通过 _GET 变量填充的;用户可以在实际进行交易之前轻松修改 URL。一种选择是通过 _POST,但仍然可以修改并避免实际费用。
因此,我正在寻找一种机制,可以帮助我安全地将这些变量传递到另一个页面,甚至可能是同一页面。我正在考虑使用数据库来临时存储这些值,但我想听听解决此类问题的最佳方法是什么。
I have not worked with web technologies , so this may seem like a naive question.
I am trying to fix one of the issues on our webpages, this page is responsible for creating and sending an e-commerce transaction to sagepay. The problem is , all the fields it has are filled via _GET variable; which a user can easily modify on the URL before a transaction is actually made. An option would be to go via _POST, but it is still possible to modify and avert actual charges.
Hence i am looking for a mechanism which can help me pass this variables securely across to another page or perhaps the same page even. I am considering using a database to temporarily store these values, but i would like to hear what is the optimal way of going about such a problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该将它们保存在数据库或 SESSION 变量中。
在电子商务中,小计、总计等通常与订单形式的其他所需信息(例如商品、数量)一起存储在数据库中。
您可以将它们保存在会话变量中,当客户说“付款”时,您可以将这些值按顺序存储在数据库中。
You should keep them either in the database or in the SESSION variable.
In e-commerce charges, sub total, grand total etc generally stored in the database with the other required info such as items, quantity in the form of an order.
You could keep them in session variable and when customer say Payment, You can store those values in database as order.