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.
35 lines
865 B
35 lines
865 B
<?php |
|
|
|
require "SGP.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()); |
|
|
|
$sgp = new SGP(CONF_TOKEN_API, CONF_URL_API, CONF_USERID_API, CONF_LOGGER_ATIVO); |
|
$sgp->db()->setRegistros($registros); |
|
|
|
if (CONF_AUDIO_ERROR) { |
|
$sgp->db()->setIdAudioError(CONF_AUDIO_ERROR); |
|
} |
|
|
|
$contrato = $sgp->agi()->get_variable('CONTRATO', true); |
|
$liberado = $sgp->liberacaoPromessa($contrato); |
|
|
|
if($liberado['status'] == 1){ |
|
$sgp->agi()->exec_goto($sgp->db()->getAnuncio('INT_DESBLOQUEIO_SUCESSO')); |
|
}else{ |
|
$sgp->agi()->exec_goto($sgp->db()->getAnuncio('INT_DESBLOQUEIO_FALHA')); |
|
} |
|
|
|
$sgp->db()->atualizaIntegracao(); |
|
|
|
?>
|