- public function remoteCall($entity, $action, $params = array()) {
- $fields = "key={$this->key}&api_key={$this->api_key}";
- $query = $this->uri . "&entity=$entity&action=$action";
- $fields .= '&' . http_build_query($params);
+ private function remoteCall($entity, $action, $params = []) {
+ $query = $this->uri . "?entity=$entity&action=$action";
+ $fields = http_build_query([
+ 'key' => $this->key,
+ 'api_key' => $this->api_key,
+ 'json' => json_encode($params),
+ ]);
+