forked from Claudio/integracao
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
3 years ago
|
<?php
|
||
|
|
||
|
include 'HubSoft.php';
|
||
|
|
||
|
$registros = array(
|
||
|
"id" => '',
|
||
|
"reg_ura" => $ura,
|
||
|
"reg_tronco" => $tronco,
|
||
|
"reg_uniqueid" => $uid,
|
||
|
"reg_id_metodo" => $idMetodo,
|
||
|
"reg_uniqueid" => $uid,
|
||
|
"reg_uniqueid_old" => $uidOld,
|
||
|
"reg_fone" => $numero,
|
||
|
"reg_status_exec" => '1',
|
||
|
"reg_inicio" => date());
|
||
|
|
||
|
$hub = new HubSoft(
|
||
|
CONF_URL_API,
|
||
|
CONF_USERID_API,
|
||
|
CONF_TOKEN_API,
|
||
|
CONF_USER_API,
|
||
|
CONF_PASSWORD_API,
|
||
|
CONF_LOGGER_ATIVO
|
||
|
);
|
||
|
|
||
|
$hub->db()->setRegistros($registros);
|
||
|
|
||
|
if (CONF_AUDIO_ERROR) {
|
||
|
$hub->db()->setIdAudioError(CONF_AUDIO_ERROR);
|
||
|
}
|
||
|
|
||
|
$codCliente = $hub->agi()->get_variable('CODCLIENTE', true);
|
||
|
$retorno = $hub->consultaPendencia($codCliente);
|
||
|
|
||
|
if (!$retorno['faturas'][0]) {
|
||
|
$hub->agi()->exec_goto($hub->db()->getAnuncio('INT_PROBLEMAS_CONEXAO')); // CLIENTE EM DIA
|
||
|
} else {
|
||
|
$hub->agi()->exec_goto($hub->db()->getURA('INT_ATENDIMENTO')); // CLIENTE PENDENTE
|
||
|
}
|
||
|
|
||
|
$hub->db()->atualizaIntegracao();
|
||
|
?>
|