zend framework2 - receiving post variables from an external source in zendframework 2 -


I am working on a zendframework 2 project and want to get the post variable from external source.

The source from which the price will come is a payment site (i.e. world pay and paypal). That is, the payment has been made by affirming the return value of the payment.

On the external site, I have just given the URL of the web page that wants to return information to me:

  http://example-site.com/payments/ Payment-made  

Then I did the following in the action function on the Controller page;

  Public function payments MadeAction () {$ contents = file_get_contents ('php: // input'); // read request content $ data = explosion ('& amp;', $ content); If ($ content) {foreach ($ data as & amp; $ entry) {$ entry = explode ('=', $ entry); $ Entry [1] = urldecode ($ entry [1]); } Unset ($ entry); } Print_r ($ data); }  

Nothing happens, though. I mean, I have tested it but the values ​​are not being received when I went to the external source to find out whether my site has received the information, it has been confirmed that the information is successfully

Is a special process that needs to be obtained from the external source in the Zen

Update:

Post Variables below Is a sample It should be returned to the site; Its just a http object

  post / fail? Installation = XXXXXX and msgType = authResult HTTP / 1.0 content-type: application / x-www-form-urlencoded; Charset = UTF-8 Host: Www.worldpay.com Content-Length: 973 User-Agent: WJHRO / 1.0 (World Pie Java HTTP Request Object) Area = New + Format + Area & amp; AuthAmountString =% 26% 23163% 3B10.00 and _SP.charEnc = UTF8 & amp; = & Amp; Tele = & amp; Address 1 = new + format + address 1)  

You are completely wrong The correct way to get the term (or query or route) variable in ZF2 verb:

  $ this-> params () -> From post (); Or $ this- & gt; Request-> GetPost () - & gt; ToArray ();  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -