<?php
	require '../../inc/conexao.php';
	require '../../inc/functions.php';
	require '../../api/api.php';

	$code = $_GET["registro"];

	// Parametros
	$params['code'] = $code;
	$params['token'] = $_SESSION["usuario"]["api_token"];
	$api = api('/cancellCoupon', $params);
	$api = json_decode($api, 1);

	if(isset($api["success"])){ echo '1'; }
	else { echo $api["error"]; }
?>