src/icepay_api_order.php
public function setOrderDiscountAmount($amount, $name = 'Discount', $description = 'Order Discount') {
        $obj = Icepay_Order_Product::create()
                ->setProductID('02')
                ->setProductName($name)
                ->setDescription($description)
                ->setQuantity('1')
                ->setUnitPrice(-$amount)
                ->setVATCategory(Icepay_Order_VAT::getCategoryForPercentage(-1));

        $this->addProduct($obj);

        return $this;
    }
public function setOrderDiscountAmount($amount, $name = 'Discount', $description = 'Order Discount') {
        $obj = Icepay_Order_Product::create()
                ->setProductID('02')
                ->setProductName($name)
                ->setDescription($description)
                ->setQuantity('1')
                ->setUnitPrice(-$amount)
                ->setVATCategory(Icepay_Order_VAT::getCategoryForPercentage(-1));

        $this->addProduct($obj);

        return $this;
    }
public function setOrderDiscountAmount ( $ amount , $ name = 'Discount' , $ description = 'Order Discount' ) { $ obj = Icepay_Order_Product :: create ( ) -> setProductID ( '02' ) -> setProductName ( $ name ) -> setDescription ( $ description ) -> setQuantity ( '1' ) -> setUnitPrice ( - $ amount ) -> setVATCategory ( Icepay_Order_VAT :: getCategoryForPercentage ( - 1 ) ) ; $ this -> addProduct ( $ obj ) ; return $ this ; }
Sets the order discount

@since 1.0.0
@param string $amount Contains the discount amount in cents
@param string $name Contains the name of the discount
@param string $description Contains description of the discount
@return \Icepay_Order
Sets the order discount