示例#1
0
文件: Pay.php 项目: rajarshc/Rooja
 /**
  * 
  * @param TBT_Rewards_Model_Transfer_Reference $transferReference
  */
 protected function _approvePointsTransfer($transferReference)
 {
     $transfer = Mage::getModel('rewards/transfer')->load($transferReference->getRewardsTransferId());
     //$transferCollection->getFirstItem();
     $order_id = $transferReference->getReferenceId();
     if (empty($transfer)) {
         return $this;
     }
     $approve_result = $transfer->setStatus($transfer->getStatus(), TBT_Rewards_Model_Transfer_Status::STATUS_APPROVED);
     if (!$approve_result) {
         Mage::helper('rewardsref')->log("Unable to approve points transfer #{$transfer->getId()} associated with order #{$order_id}.");
         return $this;
     }
     $transfer->save();
     return $this;
 }