当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Sales_Model_Order_Payment::_isCaptureFinal方法代码示例

本文整理汇总了PHP中Mage_Sales_Model_Order_Payment::_isCaptureFinal方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Sales_Model_Order_Payment::_isCaptureFinal方法的具体用法?PHP Mage_Sales_Model_Order_Payment::_isCaptureFinal怎么用?PHP Mage_Sales_Model_Order_Payment::_isCaptureFinal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Sales_Model_Order_Payment的用法示例。


在下文中一共展示了Mage_Sales_Model_Order_Payment::_isCaptureFinal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _isCaptureFinal

 /**
  * Decide whether authorization transaction may close (if the amount to capture will cover entire order)
  * @param float $amountToCapture
  * @return bool
  */
 protected function _isCaptureFinal($amountToCapture)
 {
     if (!Mage::helper('imagecc')->isActive()) {
         return parent::_isCaptureFinal($amountToCapture);
     }
     $amountToCapture = $this->_formatAmount($amountToCapture, true);
     $orderGrandTotal = $this->_formatAmount($this->getOrder()->getGrandTotal(), true);
     if ($orderGrandTotal == $this->_formatAmount($this->getBaseAmountPaid(), true) + $amountToCapture) {
         if (false !== $this->getShouldCloseParentTransaction()) {
             $this->setShouldCloseParentTransaction(true);
         }
         return true;
     }
     return false;
 }
开发者ID:vinayshuklasourcefuse,项目名称:sareez,代码行数:20,代码来源:Intellimage_CurrencyCheckout_Model_Sales_Order_Payment.php

示例2: _isCaptureFinal

 /**
  * Decide whether authorization transaction may close (if the amount to capture will cover entire order)
  *
  * @param float $amountToCapture            
  * @return bool
  */
 protected function _isCaptureFinal($amountToCapture)
 {
     /**
      * Declare repeted string variable
      */
     $coreResource = 'core/resource';
     $coreWrite = 'core_write';
     $processing = 'processing';
     $orderNo = 'order_no=?';
     $superdealsOrders = 'superdeals_orders';
     /**
      * load order item
      */
     foreach ($this->getOrder()->getAllItems() as $oOrderItems) {
         /**
          * get order id from loop value
          */
         $ordrId = $this->getOrder()->getIncrementId();
         $connection = Mage::getSingleton($coreResource)->getConnection($coreWrite);
         $connection->beginTransaction();
         $fields = array();
         $fields = $this->statusForPayment($fields, $oOrderItems, $processing, $Processing);
         /**
          * check condition if order item is equal to pending paypal
          */
         if ($oOrderItems()->getStatus() == 'pending_paypal') {
             $fields['status'] = 'Pending PayPal';
         }
         /**
          * update and commit order status
          */
         $where = $connection->quoteInto($orderNo, $ordrId);
         $connection->update($superdealsOrders, $fields, $where);
         $connection->commit();
     }
     return parent::_isCaptureFinal($amountToCapture);
 }
开发者ID:igorvasiliev4,项目名称:magento_code,代码行数:43,代码来源:Payment.php


注:本文中的Mage_Sales_Model_Order_Payment::_isCaptureFinal方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。