generate_token.php 349 B

123456789101112131415161718192021
  1. <?php
  2. include_once('config.php');
  3. include_once('security.php');
  4. include_once('autoloader.php');
  5. try{
  6. $db = new Database();
  7. $token = $db->generateToken();
  8. $db->add($token);
  9. header('Location: https://' . $_GET['shop'] . '/admin/apps/facturis-online-sync');
  10. }
  11. catch(\Exception $e) {
  12. echo $e->getMessage();
  13. }