Files
2025-06-24 14:14:35 +02:00

41 lines
1.0 KiB
PHP

<?php
/**
* NOTICE OF LICENSE
*
* This file is licenced under the Software License Agreement.
* With the purchase or the installation of the software in your application
* you accept the licence agreement.
*
* You must not modify, adapt or create derivative works of this source code
*
* @author PrestaHelp.com
* @copyright 2019 PrestaHelp
* @license LICENSE.txt
*/
header("Access-Control-Allow-Origin: *");
require_once __DIR__.'/../../config/config.inc.php';
require_once __DIR__.'/inpostship.php';
$inpostship = new InpostShip();
$action = Tools::getValue('action');
$return = '';
switch ($action) {
case 'deletePoint':
$return = $inpostship->deleteInpostPoint();
break;
case 'addPoint':
$count = 100;
$page = (int)Tools::getValue('page');
$return = $inpostship->addInpostPoint((int)$page, (int)$count);
break;
case 'getUserPoints':
$cod = Tools::getValue('cod', 0);
$return = $inpostship->getUserPoints($cod);
break;
}
echo json_encode($return);
exit();