Serveur preprod f0c0c48223 first push
2016-04-14 16:14:31 +02:00

20 lines
567 B
PHP
Executable File

<?php
include(dirname(__FILE__).'/../../config/config.inc.php');
include(dirname(__FILE__).'/digitalkeys.php');
$mod = new DigitalKeys();
if (!$mod->active)
die(0);
if (!Tools::getValue('token') || Tools::getValue('token') != Configuration::get('DIGITALKEYS_TOKEN'))
die('invalid token');
$dkws = new digitalKeysWs();
$dkws->isCustomer(Tools::getValue('email'));
class digitalKeysWs{
public function isCustomer($email){
if (!Validate::isEmail($email))
die('invalid email');
if (Customer::customerExists($email))
die('customer exists');
die('ok');
}
}