Model/OrderPaymentListCalculator.php
public function calculate()
    {
        $this->init();

        foreach ($this->getPaymentList() as $payment) {
            $status = $payment->getStatus();
            $action = $payment->getAction();
            $amount = $payment->getAmount();

            $this->aggregateAmounts($action, $status, $amount);
        }
    }
public function calculate()
    {
        $this->init();

        foreach ($this->getPaymentList() as $payment) {
            $status = $payment->getStatus();
            $action = $payment->getAction();
            $amount = $payment->getAmount();

            $this->aggregateAmounts($action, $status, $amount);
        }
    }
public function calculate ( ) { $ this -> init ( ) ; foreach ( $ this -> getPaymentList ( ) as $ payment ) { $ status = $ payment -> getStatus ( ) ; $ action = $ payment -> getAction ( ) ; $ amount = $ payment -> getAmount ( ) ; $ this -> aggregateAmounts ( $ action , $ status , $ amount ) ; } }
Sum up payment amounts for capture, void, refund.
Take into account successful transactions only.
Sum up payment amounts for capture void refund . Take into account successful transactions only .