Payu\Component\Basket::getTotalPrice PHP Method

getTotalPrice() public method

Return Total Price of Basket
public getTotalPrice ( ) : double
return double
    public function getTotalPrice()
    {
        $sum = 0.0;
        /** @var $product \Payu\Component\Product */
        foreach ($this->collection as $product) {
            $sum += (int) $product->getQuantity() * (double) $product->getPrice();
        }
        return $sum;
    }