20 lines
567 B
PHP
20 lines
567 B
PHP
|
<?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');
|
||
|
}
|
||
|
}
|