'', 'token' => '' ]; $config = \IpSupply\SyncOrder\Config\Getter::get('config'); if ($config) { $data = json_decode($config, true); } return [ [ 'label' => 'API', 'name' => 'url', 'value' => $data['url'] ?? '' ], [ 'label' => 'Token', 'name' => 'token', 'value' => $data['token'] ?? '' ] ]; } static function responseOk(array $data) { header('HTTP/1.1 200 Ok'); header('Accept: application/json'); header('Content-Type: application/json'); die(json_encode($data)); } static function responseFail(array $data) { header('HTTP/1.1 400 Bad request'); header('Accept: application/json'); header('Content-Type: application/json'); die(json_encode($data)); } static function responseMethodFail() { header('HTTP/1.1 400 bad request'); header('Accept: application/json'); header('Content-Type: application/json'); die(json_encode([ 'status' => false, 'message' => 'Param ?method=... not exist!' ])); } }