repositório com os arquivos utilizados para integração entre o sistema SimplesIP e diversos sistemas.
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.
 
 

28 lines
903 B

<?php
include 'IxcSoft.php';
$ixc = new IxcSoft();
$idcliente = $ixc->agi()->get_variable('CODCLIENTE', true);
$unlock = false;
$contratos = $ixc->listarContrato($idcliente);
foreach ($contratos['registros'] as $item){
if ($item['status_internet'] == 'CA'){
$ret_unlock = $ixc->desbloqueiaCliente($item['id']);
if ($ret_unlock['tipo'] == 'sucesso'){
$unlock = true;
}
}else if ($item['status_internet'] == 'FA'){
$ret_unlock = $ixc->retirarReducao($item['id']);
if ($ret_unlock['type'] == 'success'){
$unlock = true;
}
}
}
if($unlock){
$ixc->executarFluxo('ANUNCIO', 'INT_DESBLOQUEIO_SUCESSO_V2'); // Sucesso
}else{
$ixc->executarFluxo('ANUNCIO', 'INT_DESBLOQUEIO_FALHA_V2');//Falha
}
?>