Introduced cron tasks for syncing user economic customer details and discounts. Enhanced caching mechanisms for users and departments, added Slack messaging capabilities, and updated CLI/script routing for better flexibility. New routes and utility methods improve cron execution and logging.
37 lines
2.1 KiB
PHP
37 lines
2.1 KiB
PHP
<?php global $CONFIG_DB, $DEBUG, $ENCRYPTION_KEY, $CORS, $ECONOMIC_API, $WORDPRESS_STATIC_TOKEN, $USE_PROD_ECONOMIC_IN_DEBUG, $REDIS_CONFIG, $EMAIL_WASH_CERTIFICATE_TOKEN, $MINIO, $WORDPRESS_API_URL, $SLACK_DEFAULT_WEBHOOK;
|
|
$CONFIG_DB = [
|
|
'host' => '', // IP address of the database server e.g. 127.0.0.1
|
|
'user' => '', // Username of the database server e.g. root
|
|
'password' => '', // Password of the database server e.g. password123
|
|
'database' => '' // Name of the database e.g. my_database
|
|
];
|
|
$DEBUG = true; // Set to true to enable debugging (Error messages will be shown, and this should never be used in production)
|
|
$USE_PROD_ECONOMIC_IN_DEBUG = true; // Set to true to use the production economic API in debug mode
|
|
$ENCRYPTION_KEY = ''; // 44 Characters long encryption key
|
|
$CORS = '*'; // Set to the domain that should be allowed to access the API e.g. https://example.com
|
|
$ECONOMIC_API = [
|
|
'app_access_grant' => '', // Economic API access grant token (1)
|
|
'app_access_grant2' => '', // Economic API access grant token (2)
|
|
'app_secret_token' => '' // Economic API secret token
|
|
];
|
|
if ($DEBUG && !$USE_PROD_ECONOMIC_IN_DEBUG) {
|
|
$ECONOMIC_API = [
|
|
'app_access_grant' => '', // Development Economic API access grant token (1)
|
|
'app_access_grant2' => '', // Development Economic API access grant token (2)
|
|
'app_secret_token' => '' // Development Economic API secret token
|
|
];
|
|
}
|
|
$WORDPRESS_STATIC_TOKEN = ''; // Static token used to authenticate the WordPress plugin
|
|
$EMAIL_WASH_CERTIFICATE_TOKEN = ''; // Token used to authenticate the wash certificate generator
|
|
$WORDPRESS_API_URL = ''; // URL to the WordPress API ajax endpoint e.g. https://example.com/wp-admin/admin-ajax.php
|
|
$MINIO = [
|
|
'endpoint' => '', // Minio endpoint e.g. http://0.0.0.0:9000
|
|
'access_key' => '', // Minio access
|
|
'secret_key' => '' // Minio secret key
|
|
];
|
|
$SLACK_DEFAULT_WEBHOOK = ''; // Default Slack webhook URL e.g. https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX
|
|
$REDIS_CONFIG = [
|
|
'host' => '', // Redis host (IP address)
|
|
'database' => 0, // Redis database number (0-15)
|
|
'password' => '' // Redis password
|
|
]; |