src/ShopPaymentTransactionBundle/objects/TPkgShopPaymentTransactionManagerEndPoint.class.php
public function getRefundableProducts($bIncludeUnconfirmedTransactions = true)
    {
        $aProductList = array();
        $oOrderItemList = $this->order->GetFieldShopOrderItemList();
        $oOrderItemList->GoToStart();
        while ($oOrderItem = $oOrderItemList->Next()) {
            $iBilled = $this->getProductAmountWithTransactionType(
                $oOrderItem->id,
                self::TRANSACTION_TYPE_PAYMENT,
                false
            );
            $iRefunded = $this->getProductAmountWithTransactionType(
                $oOrderItem->id,
                self::TRANSACTION_TYPE_CREDIT,
                $bIncludeUnconfirmedTransactions
            );
            $iRefunded += $this->getProductAmountWithTransactionType(
                $oOrderItem->id,
                self::TRANSACTION_TYPE_PAYMENT_REVERSAL,
                $bIncludeUnconfirmedTransactions
            );
            $iRefundable = round($iBilled + $iRefunded);
            if ($iRefundable > 0) {
                $aProductList[$oOrderItem->id] = $iRefundable;
            }
        }
        $oOrderItemList->GoToStart();

        return $aProductList;
    }
public function getRefundableProducts($bIncludeUnconfirmedTransactions = true)
    {
        $aProductList = array();
        $oOrderItemList = $this->order->GetFieldShopOrderItemList();
        $oOrderItemList->GoToStart();
        while ($oOrderItem = $oOrderItemList->Next()) {
            $iBilled = $this->getProductAmountWithTransactionType(
                $oOrderItem->id,
                self::TRANSACTION_TYPE_PAYMENT,
                false
            );
            $iRefunded = $this->getProductAmountWithTransactionType(
                $oOrderItem->id,
                self::TRANSACTION_TYPE_CREDIT,
                $bIncludeUnconfirmedTransactions
            );
            $iRefunded += $this->getProductAmountWithTransactionType(
                $oOrderItem->id,
                self::TRANSACTION_TYPE_PAYMENT_REVERSAL,
                $bIncludeUnconfirmedTransactions
            );
            $iRefundable = round($iBilled + $iRefunded);
            if ($iRefundable > 0) {
                $aProductList[$oOrderItem->id] = $iRefundable;
            }
        }
        $oOrderItemList->GoToStart();

        return $aProductList;
    }
public function getRefundableProducts ( $ bIncludeUnconfirmedTransactions = true ) { $ aProductList = array ( ) ; $ oOrderItemList = $ this -> order -> GetFieldShopOrderItemList ( ) ; $ oOrderItemList -> GoToStart ( ) ; while ( $ oOrderItem = $ oOrderItemList -> Next ( ) ) { $ iBilled = $ this -> getProductAmountWithTransactionType ( $ oOrderItem -> id , self :: TRANSACTION_TYPE_PAYMENT , false ) ; $ iRefunded = $ this -> getProductAmountWithTransactionType ( $ oOrderItem -> id , self :: TRANSACTION_TYPE_CREDIT , $ bIncludeUnconfirmedTransactions ) ; $ iRefunded += $ this -> getProductAmountWithTransactionType ( $ oOrderItem -> id , self :: TRANSACTION_TYPE_PAYMENT_REVERSAL , $ bIncludeUnconfirmedTransactions ) ; $ iRefundable = round ( $ iBilled + $ iRefunded ) ; if ( $ iRefundable > 0 ) { $ aProductList [ $ oOrderItem -> id ] = $ iRefundable ; } } $ oOrderItemList -> GoToStart ( ) ; return $ aProductList ; }
returns an array of all products that have been billed and not refunded.

@param $bIncludeUnconfirmedTransactions

@return array [shop_order_item_id] = amount
returns an array of all products that have been billed and not refunded .