diff --git a/trunk/src/AppBundle/Export/SternToursCrmExporter.php b/trunk/src/AppBundle/Export/SternToursCrmExporter.php index e2498629..92e94aa5 100644 --- a/trunk/src/AppBundle/Export/SternToursCrmExporter.php +++ b/trunk/src/AppBundle/Export/SternToursCrmExporter.php @@ -25,8 +25,9 @@ abstract class SternToursCrmExporter } protected final function httpGet($url) - { - $resp = Util::httpGet($url, ['X-ApiKey: '. self::API_KEY]); + { + $auth = base64_encode("star:4w28baV8xEZa0SR4"); + $resp = Util::httpGet($url, ['X-ApiKey: '. self::API_KEY, 'Authorization: Basic '.$auth]); $ret = json_decode($resp['content'], true); if ($ret === null) { @@ -39,7 +40,8 @@ abstract class SternToursCrmExporter protected final function httpPost($context, $postData = [], $isContextFullUrl = false) { $url = $isContextFullUrl ? $context : self::API_URL.'/'. $context .'.json'; - $resp = Util::httpPost($url, $postData, ['X-ApiKey: '. self::API_KEY], true); + $auth = base64_encode("star:4w28baV8xEZa0SR4"); + $resp = Util::httpPost($url, $postData, ['X-ApiKey: '. self::API_KEY, 'Authorization: Basic '.$auth], true); return [ 'content' => json_decode($resp['content']), 'location' => isset($resp['response_headers']['location']) @@ -48,4 +50,6 @@ abstract class SternToursCrmExporter 'success' => $resp['success'] && ($resp['status_code'] == 201) ]; } + + } \ No newline at end of file