Zend Framework: how to POST data to any external page (for example, an external payment gateway) without using a form?

I would like the user to be redirected to an external credit card gateway. Of course, I have to CALL some information about the user through this gate, but I don’t know how exactly I can do this.

I know that I can do this by creating an html form with hidden or read-only fields and clicking the submit button. But this solution is not perfect, since all form data can be easily modified using, for example, Firebug. I think you cannot do this using $ this → _ redirect (...). But maybe there is another solution?

Thanks so much for any advice or suggestions.

+3
source share
2 answers

I would like the user to be redirected to an external credit card gateway. Of course, I have to CALL some information about the user through this gate, but I don’t know how exactly I can do this.

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

I know that I can do this by creating an html form with hidden or read-only fields and clicking the submit button. But this solution is not ideal, because all form data can be easily changed, for example,

Redirecting is not safer, since the header data can be changed without any problems. There are even Firefox plugins for this.

+2
source

Source: https://habr.com/ru/post/1732550/


All Articles