In a custom payement gateway, where the store redirects to third party website for payment. To request i have options to send either in POST/GET. I'm requesting with POST method. But the response they give is in get method.

The response url according to their documentation is http://yoursite.com/success?q=su&oid=XYZ1234&amt=100&refId=000AE01

And in my case i have captured response at http://yoursite.com/cgateway/payment/response with responseAction method of PaymentController.php controller.

The result i obtained is http://yoursite.com/cgateway/payment/response?q=su&oid=XYZ1234&amt=100&refId=000AE01

Now the problem is how should i get those data in responseAction in PaymentController ?

2 Answers 2


To get params in a controller you can use:




Magento's default routing algorithm uses three part URLs.


So when you call


The word path is your front name, action is your controller name, and id is your action method. After these three methods, you can use getParam to grab a key/value pair


//in a controller

You may also use the getParams method to grab an array of parameters


Hope this helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.