public function generateSecurityCode()
    {
        $result = $this->getCertificatePrivateKey();
        $result .= $this->getOib();
        $result .= $this->getDateTime();
        $result .= $this->getInvoiceNumber()->getInvoiceNumber();
        $result .= $this->getInvoiceNumber()->getBusinessLocationCode();
        $result .= $this->getInvoiceNumber()->getPaymentDeviceCode();
        $result .= $this->getTotalValue();

        $this->setSecurityCode(md5($result));

        return $this;
    }