36526-vm/config.php
2025-12-01 07:41:47 +00:00

24 lines
787 B
PHP

<?php
// Main application configuration
// Show errors for debugging, turn off in production
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
// Timezone
date_default_timezone_set('Asia/Muscat');
// Base URL - autodetect
define('BASE_URL', (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://" . $_SERVER['HTTP_HOST']);
// WATI API Configuration - REQUIRED
define('WATI_API_ENDPOINT', getenv('WATI_API_ENDPOINT') ?: 'https://api.wati.io');
define('WATI_ACCESS_TOKEN', getenv('WATI_ACCESS_TOKEN') ?: 'YOUR_WATI_ACCESS_TOKEN');
// Webhook validation token
define('WATI_WEBHOOK_TOKEN', getenv('WATI_WEBHOOK_TOKEN') ?: 'YOUR_WATI_WEBHOOK_SECRET');
// Database connection
require_once __DIR__ . '/db/config.php';