public function TotalPaid()
    {
        $paid = 0;

        if ($payments = $this->owner->Payments()) {
            foreach ($payments as $payment) {
                if ($payment->Status == 'Captured') {
                    $paid += $payment->Amount;
                }
            }
        }

        return $paid;
    }
public function TotalPaid()
    {
        $paid = 0;

        if ($payments = $this->owner->Payments()) {
            foreach ($payments as $payment) {
                if ($payment->Status == 'Captured') {
                    $paid += $payment->Amount;
                }
            }
        }

        return $paid;
    }
public function TotalPaid ( ) { $ paid = 0 ; if ( $ payments = $ this -> owner -> Payments ( ) ) { foreach ( $ payments as $ payment ) { if ( $ payment -> Status == 'Captured' ) { $ paid += $ payment -> Amount ; } } } return $ paid ; }
Get the total captured amount

@return float
Get the total captured amount