src/ClearSaleID/Entity/Request/Payment.php
public function setAmount( $amount )
    {
        if (preg_match( '/^(?:\d*\.)?\d+$/', $amount ) !== 1) {
            throw new InvalidArgumentException( sprintf( 'Amount should be a non-negative number (%s)', $amount ) );
        }

        $this->amount = (float)number_format( $amount, 4, '.', '' );

        return $this;
    }
public function setAmount( $amount )
    {
        if (preg_match( '/^(?:\d*\.)?\d+$/', $amount ) !== 1) {
            throw new InvalidArgumentException( sprintf( 'Amount should be a non-negative number (%s)', $amount ) );
        }

        $this->amount = (float)number_format( $amount, 4, '.', '' );

        return $this;
    }
@param  float $amount

@return $this