php-mpos/include/pages/api/getuserbalance.inc.php
2015-04-26 20:06:29 -05:00

15 lines
368 B
PHP

<?php
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
// Check if the API is activated
$api->isActive();
// Check user token
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
// Output JSON format
echo $api->get_json($transaction->getBalance($user_id));
// Supress master template
$supress_master = 1;