Retorna o codigo de transmissão.

@return string
@throws \Exception
772649
public function getCodigoTransmissao()
    {
        $conta = $this->getConta();
        if (strlen($conta) == 9) {
            $conta = substr($conta, 0, 7);
        }

        return Util::formatCnab('9', $this->getAgencia(), 4)
            . Util::formatCnab('9', substr($this->getCodigoCliente(), 0, 7), 8)
            . Util::formatCnab('9', $conta, 8);
    }
1283881
public function enviar()
    {
        // generar XML que se enviará
        if (!$this->xml_data)
            $this->xml_data = $this->generar();
        if (!$this->xml_data) {
            \sasco\LibreDTE\Log::write(
                \sasco\LibreDTE\Estado::DOCUMENTO_ERROR_GENERAR_XML,
                \sasco\LibreDTE\Estado::get(
                    \sasco\LibreDTE\Estado::DOCUMENTO_ERROR_GENERAR_XML,
                    substr(get_class($this), strrpos(get_class($this), '\\')+1)
                )
            );
            return false;
        }
        // validar schema del documento antes de enviar
        if (!$this->schemaValidate())
            return false;
        // solicitar token
        $token = \sasco\LibreDTE\Sii\Autenticacion::getToken($this->Firma);
        if (!$token)
            return false;
        // enviar AEC
        $email = $this->caratula['MailContacto'];
        $emisor = $this->caratula['RutCedente'];
        $result = $this->enviarRTC($email, $emisor, $this->xml_data, $token, 10);
        if ($result===false)
            return false;
        if (!is_numeric((string)$result->TRACKID))
            return false;
        return (int)(string)$result->TRACKID;
    }
470854
public function getAgenciaCodigoBeneficiario()
    {
        $agencia = $this->getAgenciaDv() !== null ? $this->getAgencia() . '-' . $this->getAgenciaDv() : $this->getAgencia();

        if ($this->getContaDv() !== null && strlen($this->getContaDv()) == 1) {
            $conta = substr($this->getConta(), 0, -1) . '-' .substr($this->getConta(), -1).$this->getContaDv();
        } elseif ($this->getContaDv() !== null && strlen($this->getContaDv()) == 2) {
            $conta = substr($this->getConta(), 0, -1) . '-' .substr($this->getConta(), -1).$this->getContaDv();
        } else {
            $conta = $this->getConta();
        }

        return $agencia . ' / ' . $conta;
    }
1119253
public function getDescription(): string
    {
        if (!empty($this->networkRange)) {
            $message = $this->networkRange['min'];
            if (isset($this->networkRange['max'])) {
                $message .= '-' . $this->networkRange['max'];
            } else {
                $message .= '/' . long2ip((string)bindec($this->networkRange['mask']));
            }
            return __('must be an IP address in the "%s" range', $message);
        }
        return __('must be an IP address');
    }
76973
public function lostPasswordRequestAction() 
    {
        $pathAppConfigForm = '/meliscore/forms/meliscore_forgot';
        $melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
        $appConfigForm = $melisMelisCoreConfig->getItem($pathAppConfigForm);
        $translator = $this->getServiceLocator()->get('translator');
        
        $success = false;
        $errors  = array();
        $message = '';

        
        if($this->getRequest()->isPost())
        {
            $login = $this->getRequest()->getPost('usr_login');
            $email = $this->getRequest()->getPost('usr_email');
            
            $melisLostPass = $this->getServiceLocator()->get('MelisCoreLostPassword');
            $userTable = $this->getServiceLocator()->get('MelisCoreTableUser');
            $userData = $userTable->getDataByLoginAndEmail($login, $email);
            $userData = $userData->current();
            
            if($userData) 
            {
                if($melisLostPass->userExists($login))
                {
                    $success = $melisLostPass->addLostPassRequest($login, $email);
                    if($success)
                    {
                        $message = $translator->translate('tr_meliscore_email_lost_password_request_success');
                    }
                    else
                    {
                        $message = $translator->translate('tr_meliscore_email_lost_password_request_failed');
                    }
                }
                else
                {
                    $message = $translator->translate('tr_meliscore_email_lost_password_request_failed');
                }
            }
            else 
            {
                $success = false;
                $message = $translator->translate('tr_meliscore_email_failed');
            }
        }
        
        return new JsonModel(array('success' => $success, 'message' => $message));
    }
775393
public function getTransfered()
    {
        $base = log($this->transfered, 1024);
        $suffixes = array(
            '',
            'K',
            'M',
            'G',
            'T',
        );
        return round(pow(1024, $base - floor($base)), 2) . ' ' . $suffixes[floor($base)];
    }
629157
public function getTransactionString()
    {
        return sprintf(
                "Paymentmethod: %s \n| OrderID: %s \n| Status: %s \n| StatusCode: %s \n| PaymentID: %s \n| TransactionID: %s \n| Amount: %s", isset($this->data->paymentMethod) ? $this->data->paymentMethod : "", isset($this->data->orderID) ? $this->data->orderID : "", isset($this->data->status) ? $this->data->status : "", isset($this->data->statusCode) ? $this->data->statusCode : "", isset($this->data->paymentID) ? $this->data->paymentID : "", isset($this->data->transactionID) ? $this->data->transactionID : "", isset($this->data->amount) ? $this->data->amount : ""
        );
    }
1093495
private function generateRouteName(): string
    {
        if (!array_key_exists($this->actionName, $this->adminConfiguration->getParameter('actions'))) {
            throw new Exception(
                sprintf('Invalid action name %s for admin %s (available action are: %s)',
                    $this->actionName,
                    $this->adminName,
                    implode(', ', array_keys($this->adminConfiguration->getParameter('actions'))))
            );
        }
        $routeName = RoutingLoader::generateRouteName(
            $this->adminName,
            $this->actionName,
            $this->adminConfiguration->getParameter('routing_name_pattern')
        );

        return $routeName;
    }
1095079
protected function parseTransactionDescription()
    {
        $results = [];
        if (preg_match_all('/[\n]:86:(.*?)(?=\n(:6([12]))|$)/s', $this->getCurrentTransactionData(), $results)
            && !empty($results[1])
        ) {
            return $this->sanitizeDescription(implode(PHP_EOL, $results[1]));
        }

        return '';
    }
1194206
protected function requestAccessToken() {
        $code = $this->getRequestVar('code');
        if (!empty($code)) {
            $res = $this->sendRequest('POST', $this->getUrl('oauth', 'token'), array(
                'code' => $code,
                'client_id' => $this->getClientId(),
                'client_secret' => $this->getClientSecret(),
                'grant_type' => 'authorization_code',
                'redirect_uri' => $this->redirectUri,
            ));
            $result = $res->getBody();
            if ($result && $result = json_decode($result, true)) {
                if (!empty($result['error'])) {
                    throw new Exception($result['error_description']);
                }

                return $result;
            }
        }
        return null;
    }
196567
public function transportUrl()
    {
        $proto = $this->getConfig('tls') ? 'wss' : 'ws';
        $port = intval($this->getConfig('port'));
        if($port>0) {
            $port = ':'.$port;
        }
        else {
            $port = '';
        }
        return $proto.'://'.$this->getConfig('host').$port.$this->getConfig('path');
    }
1150907
public function info()
    {
        $resp=$this->_transport->send(HttpRequest::GET, $this->_baseURL);
        $ret = array();
        $ret["hub"] = $this->_hub;
        $ret["key"] = $this->_key;
        $ret["disabledTill"] = $resp["disabledTill"];
        $ret["converts"] = $resp["converts"];
        return $ret;
    }
486603
protected function getCurrentPort()
    {
        // Сначала проверьте наличие прокси-сервера
        $port = $this->getHeader('X_FORWARDED_PORT');
        if ($port) {
            return (string)$port;
        }

        $protocol = (string)$this->getHeader('X_FORWARDED_PROTO');
        if ($protocol === 'https') {
            return '443';
        }

        return (string)$this->getServerVar('SERVER_PORT');
    }
1345108
private function getTransport()
    {
        switch ($this->transport)
        {
            case 'stream':
                return new Transport\Stream($this->host, $this->port);

            case 'curl':
            default:
                return new Transport\Curl($this->host, $this->port);
        }
    }
222438
protected function getAdapter()
    {
        $type = strtolower($this->options['type']);
        if (!$this->adapter) {
            if ($this->options['class']) {
                $adapterClass = $this->options['class'];
            } else {
                $adapterClass = '\\Wslim\\Security\\Crypt\\' . ucfirst($type) . 'Adapter';
            }
            
            if (!class_exists($adapterClass)) {
                throw new Exception('crypt type is not exists: ' . $type . ' .');
            }
            $this->adapter = new $adapterClass();
        }
        return $this->adapter;
    }
868567
protected function getMailer()
    {
        $transport = null;
        if ($this->configurationManager->getSetting('mailer.type') === 'sendmail') {
            $transport = \Swift_SendmailTransport::newInstance($this->configurationManager->getSetting('mailer.sendmailCommand'));
        } else if ($this->configurationManager->getSetting('mailer.type') === 'smtp') {
            $host = $this->configurationManager->getSetting('mailer.smtpHost');
            $port = $this->configurationManager->getSetting('mailer.smtpPort');
            $username = $this->configurationManager->getSetting('mailer.smtpUsername');
            $password = $this->configurationManager->getSetting('mailer.smtpPassword');
            
            $transport = \Swift_SmtpTransport::newInstance($host, $port);
            $transport->setUsername($username);
            $transport->setPassword($password);
        }
        
        if ($transport === null) {
            throw new Exception('No mail transport defined. Please check your configuration.');
        }

        return \Swift_Mailer::newInstance($transport);
    }
694110
public function getMessage()
	{
		$code = $this->getCode();

		if (!array_key_exists($code, $this->_messageMap))
			throw new \Ergo\Routing\Exception("Unknown HTTP status code: $code");

		return $this->_messageMap[$code];
	}