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


PHP Mage_Sales_Model_Order_Payment::getId方法代码示例

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


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

示例1: _beforeSave

 /**
  * Verify data required for saving
  * @return Mage_Sales_Model_Order_Payment_Transaction
  * @throws Mage_Core_Exception
  */
 protected function _beforeSave()
 {
     // set parent id
     $this->_verifyPaymentObject();
     $this->setPaymentId($this->_paymentObject->getId())->setOrderId($this->getOrderId());
     return parent::_beforeSave();
 }
开发者ID:hunnybohara,项目名称:magento-chinese-localization,代码行数:12,代码来源:Transaction.php

示例2: _beforeSave

 /**
  * Verify data required for saving
  * @return Mage_Sales_Model_Order_Payment_Transaction
  * @throws Mage_Core_Exception
  */
 protected function _beforeSave()
 {
     // set parent id
     $this->_verifyPaymentObject();
     if (!$this->getId()) {
         // We need to set order and payment ids only for new transactions
         if (null !== $this->_paymentObject) {
             $this->setPaymentId($this->_paymentObject->getId());
         }
         if (null !== $this->_order) {
             $this->setOrderId($this->_order->getId());
         }
         $this->setCreatedAt(Mage::getModel('core/date')->gmtDate());
     }
     return parent::_beforeSave();
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:21,代码来源:Transaction.php

示例3: addPayment

 public function addPayment(Mage_Sales_Model_Order_Payment $payment)
 {
     $payment->setOrder($this)->setParentId($this->getId());
     if (!$payment->getId()) {
         $this->getPaymentsCollection()->addItem($payment);
     }
     return $this;
 }
开发者ID:blazeriaz,项目名称:youguess,代码行数:8,代码来源:Order.php

示例4: getTransactionFromPaymentObject

 /**
  * Get DESC list of specific transactions from payment object
  *
  * @param Mage_Sales_Model_Order_Payment    $payment
  * @param array|string                      $type_filter
  * @return array
  */
 public function getTransactionFromPaymentObject($payment, $type_filter)
 {
     $transactions = array();
     $collection = Mage::getModel('sales/order_payment_transaction')->getCollection()->setOrderFilter($payment->getOrder())->addPaymentIdFilter($payment->getId())->addTxnTypeFilter($type_filter)->setOrder('created_at', Varien_Data_Collection::SORT_ORDER_DESC);
     /** @var Mage_Sales_Model_Order_Payment_Transaction $txn */
     foreach ($collection as $txn) {
         $transactions[] = $txn->setOrderPaymentObject($payment);
     }
     return $transactions;
 }
开发者ID:snehamalvankar,项目名称:magento-ce-emp-plugin,代码行数:17,代码来源:Data.php


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