/** * Instantiate state and set it to state object * * @param string $paymentAction * @param Varien_Object */ public function initialize($paymentAction, $stateObject) { $payment = $this->getInfoInstance(); $order = $payment->getOrder(); parent::order($payment, $order->getBaseTotalDue()); }
/** * Instantiate state and set it to state object * * @param string $paymentAction * @param Varien_Object */ public function initialize($paymentAction, $stateObject) { $standard = Mage::getModel('mundipagg/standard'); switch ($standard->getConfigData('payment_action')) { case 'order': $this->setCreditCardOperationEnum('AuthAndCapture'); $paymentAction = $orderAction = 'order'; break; case 'authorize': $this->setCreditCardOperationEnum('AuthOnly'); $paymentAction = $orderAction = 'authorize'; break; case 'authorize_capture': $this->setCreditCardOperationEnum('AuthAndCaptureWithDelay'); $paymentAction = $orderAction = 'authorize_capture'; break; } $payment = $this->getInfoInstance(); $order = $payment->getOrder(); switch ($paymentAction) { case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE: parent::authorize($payment, $order->getBaseTotalDue()); break; case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE: parent::authorize($payment, $order->getBaseTotalDue()); break; case $orderAction: parent::order($payment, $order->getBaseTotalDue()); break; default: parent::order($payment, $order->getBaseTotalDue()); break; } }