<?php

/*
 * ROMAN DIGITAL - Autor: Américo Patetta
 */

set_include_path("../../");
include_once("server/class/PedidosManager.php");

$jsonParams = file_get_contents('php://input');
$paramObj = json_decode($jsonParams);

if (isset($paramObj->idPedido) && isset($paramObj->token) && $paramObj->token == TOKEN_BRODEVO) {
   
    $pm = new PedidosManager();
    $response['error'] = ($pm->cedular($paramObj->idPedido))?0:-2;
   
} else {
    $response['error'] = -1;
}

header('Content-Type: application/json; charset=utf-8');
echo json_encode($response);
