I have a multi-currency website (MYR & USD) while MYR is the primary currency, When a user try to purchase i want to pass the value in MYR to the payment gateway since it supports on MYR, below my code in redirect.phtml, Is there any way i can fix this. TIA

// Retrieve order

$order = $this->getOrder();
$_helper = Mage::helper('managepay');
$phone = substr(str_replace(' ', '', $order->getBillingAddress()->getTelephone()), 0, 20);
<div><span>You will be redirected to the Manage Pay website in a few seconds.</span></div>
<form name="managepay_form" method="post" action="<?php echo $_helper->getGatewayUrl() ?>">
    <button type="submit" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Submit')) ?>" class="button"><span><span><?php echo $this->__('Click here if you are not redirected within 10 seconds...') ?></span></span></button>
    <input type="hidden" name="secureHash" value="<?php echo $_helper->secureHash() ?>"><br>
    <input type="hidden" name="mid" value="<?php echo $_helper->getMerchantId() ?>"><br>
    <input type="hidden" name="invno" value="<?php echo $_helper->getInvoiceNo() ?>"><br>
    <input type="hidden" name="amt" value="<?php echo $_helper->getAmount() ?>"><br>
    <input type="hidden" name="desc" value="<?php echo $this->getProductDesc() ?>"><br>
    <input type="hidden" name="postURL" value="<?php echo $this->getResponseUrl()  ?>"><br>
    <input type="hidden" name="phone" value="<?php echo $phone ?>"><br>
    <input type="hidden" name="email" value="<?php echo $order->getCustomerEmail(); ?>"><br>
<!--    <input type="hidden" name="param" value="47630|P123"><br>-->
<script type="text/javascript">

1 Answer 1


This is been fix my declaring getAmount() value to be set as BaseGrandTotal inside /app/code/local/Magebuzz/paymentgateway/Helper/Data.php

   public function getAmount()
        $orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
        $order = Mage::getSingleton('sales/order')->loadByIncrementId($orderId);
        return $order->getBaseGrandTotal() * 100;

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.