/** * Set the per-request configuration * * @return void */ protected function initConfiguration() { $this->config = \Genesis\Utils\Common::createArrayObject(array('protocol' => 'https', 'port' => 443, 'type' => 'POST', 'format' => 'xml')); $this->setApiConfig('url', $this->buildRequestURL('gateway', 'reconcile/by_date', \Genesis\Config::getToken())); }
/** * Build the complete URL for the request * * @param $subDomain String - gateway/wpf etc. * @param $path String - path of the current request * @param $appendToken Bool - should we append the token to the end of the url * * @return string - complete URL (sub_domain,path,token) */ protected function buildRequestURL($subDomain = 'gateway', $path = '/', $appendToken = true) { $token = $appendToken ? \Genesis\Config::getToken() : ''; $baseURL = \Genesis\Config::getEnvironmentURL($this->getApiConfig('protocol'), $subDomain, $this->getApiConfig('port')); return sprintf('%s/%s/%s', $baseURL, $path, $token); }