Email Configuration: - Added SMTP support via Mailgun (smtp.mailgun.org:587) - EmailService now supports both Mailgun API and SMTP - Configured to use twist@mail.dev.oliver.solutions - Emails sent to logged-in user (SSO email or local dev email) OMG API: - Enabled OMG API lookup in process-csv.php - API key configured in config.php - Looks up business unit from campaign number - Falls back to 'ERROR' if business unit not recognized SMTP Implementation: - Full SMTP protocol with AUTH LOGIN - Proper error handling and logging - Fallback to Mailgun API if SMTP fails Notifications sent to user email: - Process started notification - Process completed notification (with file count) - Error notifications 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
101 lines
3.4 KiB
PHP
101 lines
3.4 KiB
PHP
<?php
|
|
/**
|
|
* L'Oréal Box Asset Submission Form - Configuration
|
|
*/
|
|
|
|
return [
|
|
// SSO Configuration
|
|
'sso' => [
|
|
// KILL SWITCH: Set to false for local development, true for production
|
|
'enabled' => false,
|
|
|
|
// Azure AD Configuration (for production use)
|
|
'tenant_id' => '', // Add your Azure tenant ID when enabling SSO
|
|
'client_id' => '', // Add your Azure client ID when enabling SSO
|
|
|
|
// Local development user (used when SSO is disabled)
|
|
'local_user' => [
|
|
'name' => 'Dave Porter',
|
|
'email' => 'daveporter@oliver.agency'
|
|
]
|
|
],
|
|
|
|
// Box API Configuration
|
|
'box' => [
|
|
'jwt_config_path' => __DIR__ . '/43984435_77m2ujl3_config.json',
|
|
'enterprise_id' => '43984435',
|
|
|
|
// Box API endpoints
|
|
'api_base_url' => 'https://api.box.com/2.0',
|
|
'oauth_url' => 'https://api.box.com/oauth2/token',
|
|
|
|
// Token caching (in seconds)
|
|
'token_cache_duration' => 3600 // 1 hour
|
|
],
|
|
|
|
// Webhook Configuration
|
|
'webhook' => [
|
|
'url' => 'https://hook.us1.make.celonis.com/ddxrhuykysnbxqvb25uxsg0pjngqytiv',
|
|
'api_key' => 'E4P9923eBaUTKrEr.iqvHtVHcZ6L!WH',
|
|
'timeout' => 30 // seconds
|
|
],
|
|
|
|
// Global to Local CSV Transformation
|
|
'global_to_local' => [
|
|
'output_box_folder_id' => 'XXXXXXXXX', // Box folder for output CSVs
|
|
'max_file_size' => 5242880, // 5MB max upload
|
|
'iso_codes' => [
|
|
'en-GB', 'es-ES', 'pt-PT', 'en-IE', 'fr-CH', 'de-AT',
|
|
'de-DE', 'cs-CZ', 'hu-HU', 'sk-SK', 'da-DK', 'fi-FI',
|
|
'nb-NO', 'sv-SE', 'en-NN', 'de-CH'
|
|
],
|
|
'business_unit_map' => [
|
|
'VICHY' => 'VICHY',
|
|
'LA ROCHE' => 'LA ROCHE',
|
|
'PPD - MULTIBRAND' => 'MULTIBRAND',
|
|
'SKINCEUTICAL' => 'SKINCEUTICAL',
|
|
'BIOLAGE' => 'BIOLAGE',
|
|
'KERASTASE' => 'KERASTASE',
|
|
'LOREAL PROFESSIONNEL PARIS' => 'LPP',
|
|
'MATRIX' => 'MATRIX',
|
|
'MIZANI' => 'MIZANI',
|
|
'PUREOLOGY' => 'PUREOLOGY',
|
|
'REDKEN' => 'REDKEN',
|
|
'SHU UEMURA ART OF HAIR' => 'SHUUEMURA',
|
|
'LP' => 'LPP',
|
|
'KER' => 'KERASTASE',
|
|
'SKINC' => 'SKINCEUTICAL',
|
|
'LAROCHEPOSAY' => 'LA ROCHE',
|
|
'CERAVE' => 'CERAVE',
|
|
'LDB - MULTIBRAND' => 'LDB MULTIBRAND',
|
|
'VICHY TEST' => 'Vichy Test'
|
|
]
|
|
],
|
|
|
|
// OMG API Configuration
|
|
'omg_api' => [
|
|
'base_url' => 'https://api2.omg.oliver.solutions/loreal/v1',
|
|
'api_key' => 'PeyJvcmciOiIyOCIsImlkIjoiNjJhNWMwODkxOGI1NDhiYTlkOGU0NTU2N2ZmOTY2NGIiLCJoIjoibXVybXVyNjQifQ==', // Replace with actual key
|
|
'timeout' => 60
|
|
],
|
|
|
|
// Email Service Configuration
|
|
'email' => [
|
|
'enabled' => true,
|
|
'service' => 'smtp', // Using SMTP via Mailgun
|
|
'from' => 'twist@mail.dev.oliver.solutions',
|
|
'domain' => 'mail.dev.oliver.solutions',
|
|
// SMTP credentials
|
|
'smtp_host' => 'smtp.mailgun.org',
|
|
'smtp_port' => 587,
|
|
'smtp_username' => 'twist@mail.dev.oliver.solutions',
|
|
'smtp_password' => '102115e9f3b9d7332d0cd1d4329bc0d4-77751bfc-ca066b71'
|
|
],
|
|
|
|
// Application Settings
|
|
'app' => [
|
|
'name' => 'L\'Oréal Box Asset Submission',
|
|
'timezone' => 'UTC',
|
|
'debug' => true // Set to false in production
|
|
]
|
|
];
|