<?php

require_once __DIR__ . "/vendor/autoload.php";
require_once __DIR__ . "/settings.php";

if ($_SETTINGS["debug"]) {
    error_reporting(E_ALL);
    ini_set('display_errors', 'On');
} else {
    error_reporting(0);
    ini_set('display_errors', 'off');
    ini_set('display_startup_errors', 'off');
    ini_set('html_errors', 'off');
}

$libs = glob(__DIR__ . "/lib/*.lib.php");
foreach ($libs as $lib) {
    require_once $lib;
}

\EasyPost\EasyPost::setApiKey($_SETTINGS["easypost_key"]);
\Stripe\Stripe::setApiKey($_SETTINGS["stripe_sk"]);

header("Access-Control-Allow-Origin: *");