Zend Framework:如何在不使用表单的情况下将数据发布到某个外部页面(例如外部支付门)? [英] Zend Framework: How to POST data to some external page (e.g. external payment gate) without using form?

查看:58
本文介绍了Zend Framework:如何在不使用表单的情况下将数据发布到某个外部页面(例如外部支付门)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让用户重定向到外部信用卡门.当然,我必须向那个门发布一些用户信息,但我不知道我到底该怎么做.

I would like to have a user redirected to an external credit card gate. Of course I have to POST some user info to that gate, but I don't know how exactly can I do this.

我知道我可以通过生成一个带有隐藏或只读字段的 html 表单并让用户单击提交"按钮来做到这一点.但是这个解决方案并不完美,因为所有表单数据都可以使用例如轻松更改萤火虫.我认为你不能使用 $this->_redirect(...) 来做到这一点.但也许还有其他解决方案?

I know that I could do this by generating a html form with hidden or read-only fields and have a user click "Submit" button. But this solution is not perfect, because all the form data could be easily changed using e.g. Firebug. I think you cannot do this using $this->_redirect(...). But maybe there is some other solution?

非常感谢您的任何提示或建议.

Many thanks for any tips or suggestions.

推荐答案

我想让用户重定向到外部信用卡门.当然,我必须向那个门发布一些用户信息,但我不知道我到底该怎么做.

I would like to have a user redirected to an external credit card gate. Of course I have to POST some user info to that gate, but I don't know how exactly can I do this.

使用表单是唯一可用的方法.RFC 声明用户应明确同意发送 POST(即点击提交按钮).

Using a form is the only method available. The RFC states that the user should explicitly agree to sending a POST (i.e. click on a submit button).

我知道我可以通过生成一个带有隐藏或只读字段的 html 表单并让用户单击提交"按钮来做到这一点.但是这个解决方案并不完美,因为所有的表单数据都可以很容易地使用例如

I know that I could do this by generating a html form with hidden or read-only fields and have a user click "Submit" button. But this solution is not perfect, because all the form data could be easily changed using e.g.

使用重定向作为标头数据可以在没有太多问题的情况下进行修改,这并不安全.甚至还有 Firefox 插件可以做到这一点.

It is no more secure that using a redirect as the header data can be modified without too much of a problem. There are even Firefox plugins to do it.

这篇关于Zend Framework:如何在不使用表单的情况下将数据发布到某个外部页面(例如外部支付门)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆