function it_can_connect_to_production_wpf() { $endpoints = array(\Genesis\API\Constants\Endpoints::ECOMPROCESSING, \Genesis\API\Constants\Endpoints::EMERCHANTPAY); Config::setEnvironment(\Genesis\API\Constants\Environments::PRODUCTION); foreach ($endpoints as $endpoint) { Config::setEndpoint($endpoint); $this->send_remote_connection(sprintf('https://%s%s', Config::getSubDomain('wpf'), Config::getEndpoint())); } }
/** * Build the complete URL for the request * * @param $sub String - gateway/wpf etc. * @param $path String - path of the current request * @param $token String - should we append the token to the end of the url * * @return string - complete URL */ protected function buildRequestURL($sub = 'gateway', $path = '', $token = '') { $protocol = $this->getApiConfig('protocol') ? $this->getApiConfig('protocol') : 'https'; $sub = \Genesis\Config::getSubDomain($sub); $domain = \Genesis\Config::getEndpoint(); $port = $this->getApiConfig('port') ? $this->getApiConfig('port') : 443; $path = $token ? sprintf('%s/%s/', $path, $token) : $path; return sprintf('%s://%s%s:%s/%s', $protocol, $sub, $domain, $port, $path); }