public function capture(Varien_Object $payment, $amount) { if (AW_Sarp_Model_Subscription::isIterating()) { $Subscription = AW_Sarp_Model_Subscription::getInstance()->processPayment($payment->getOrder()); return $this; } return parent::capture($payment, $amount); }
public function capture(Varien_Object $payment, $amount) { if (AW_Sarp_Model_Subscription::isIterating()) { AW_Sarp_Model_Subscription::getInstance()->processPayment($payment->getOrder()); if (Mage::helper('sarp')->checkVersion('1.5.0.0')) { $this->_copyDataFromLastPayment($payment, $amount, parent::REQUEST_TYPE_AUTH_CAPTURE); $this->_placeTransaction($payment, $amount, parent::REQUEST_TYPE_AUTH_CAPTURE); $payment->setSkipTransactionCreation(1); } return $this; } return parent::capture($payment, $amount); }
/** * this method is called if we are authorizing AND * capturing a transaction */ public function capture(Varien_Object $payment, $amount) { $info = $this->getInfoInstance(); $orderTotal = Mage::getSingleton('checkout/cart')->getQuote()->collectTotals()->getGrandTotal(); if ($info->getPoAmount() < $orderTotal) { $amount = $orderTotal - $info->getPoAmount(); parent::capture($payment, $amount); } }