コード例 #1
0
ファイル: Data.php プロジェクト: xiaoguizhidao/bb
 /**
  * Determine if a transaction has been voided, using the "txn_type" field
  * instead of "type" like the native isVoided method does
  *
  * @param Mage_Sales_Model_Order_Payment_Transaction $trans
  * @return bool
  */
 public function transactionIsVoided($trans)
 {
     $children = $trans->getChildTransactions();
     $result = false;
     if (Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH === $trans->getTxnType()) {
         foreach ($children as $child) {
             if (Mage_Sales_Model_Order_Payment_Transaction::TYPE_VOID === $child->getTxnType()) {
                 $result = true;
             }
         }
     }
     return $result;
 }