I Created a Custom Payment Method Module and its work perfectly but in the redirect to success page i use this code below: Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/success', array('_secure' => true, '_query'=> $parameters));

in this code i created an array named _query with all parameters from external gateway $parameters so my question how i can read there parameters in success page in checkout success.phtml


I reckon you should be able to retrieve this array of parameters by doing:

| improve this answer | |
  • i use your code but the response is null (nothing retrieved) any help plz ? – mahmoudismail May 17 '16 at 11:51
  • @mahmoudismail what does Mage::app()->getRequest()->getParams() give you ? – Raphael at Digital Pianism May 17 '16 at 11:54
  • In Success Page my code is <div class="page-title"> <?php echo Mage::app()->getRequest()->getParam('_query'); ?> <h1><?php echo $this->__('Your order has been received..') ?></h1> </div> but print an empty array – mahmoudismail May 17 '16 at 11:57
  • @mahmoudismail try to see what you're getting when you use Mage::app()->getRequest()->getParams() ? – Raphael at Digital Pianism May 17 '16 at 11:59
  • i get an empty array array(0) { } – mahmoudismail May 17 '16 at 12:10

You can access request variables by using these methods:

Mage::app()->getRequest()->getParams('_query'); // Gets everything, $_GET and $_POST


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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