<?php
/**
 *
 * Copyright (C) Die Randgruppe GmbH
 *
 * http://www.randshop.com
 * http://www.dierandgruppe.com
 *
 * Unter der Lizenz von Die Randgruppe GmbH:
 * http://www.randshop.com/Lizenz
 *
 */

include_once('../../conf/config.inc.php');
include_once(DATEIPFAD . 'conf/db.inc.php');
include_once(DATEIPFAD . 'includes/functions.shopeinstellung.inc.php');

$einstellungen = GetEinstellungen('access_token', 'easymarketing');
if($_GET['shop_token'] !== getShopToken() || !$einstellungen->easymarketing->access_token) {
    header($_SERVER["SERVER_PROTOCOL"] . ' 401 Unauthorized');
    echo '<h1>Error 401 - You are not allowed to access this resource</h1>';
    exit;
}

$resultObj = new stdClass();
$resultObj->shopsystem = 'Randshop';
$resultObj->shopsystem_human = 'Randshop';
$resultObj->shopsystem_version = SHOPVERSION;
$resultObj->api_version = '1.0.0';

echo json_encode($resultObj);