// Get app setting with company branding defaults function altahwel_get_setting($key, $default = '') { // Set default values for company branding $defaults = array( 'app_name' => 'عبد الله الصارم للتحويل', 'app_name_en' => 'Abdullah Al-Sarem Transfer', 'company_address' => 'الرياض، المملكة العربية السعودية', 'company_phone' => '+966 50 123 4567', 'company_email' => 'info@altahwel.com', 'company_website' => 'www.altahwel.com', 'license_number' => 'ترخيص رقم: 123456789', 'tax_number' => 'الرقم الضريبي: 300123456789003', 'min_transfer_amount' => 10, 'max_transfer_amount' => 50000, 'transfer_fee_percentage' => 0.5, 'external_transfer_fee' => 2.0 ); $setting_default = isset($defaults[$key]) ? $defaults[$key] : $default; return get_option('altahwel_' . $key, $setting_default); } // Format currency for display function altahwel_format_currency($amount, $currency = 'SAR') { $formatted = number_format($amount, 2); switch ($currency) { case 'SAR': return $formatted . ' ر.س'; case 'USD': return '$' . $formatted; case 'EUR': return '€' . $formatted; default: return $formatted . ' ' . $currency; } } // Generate unique reference number function altahwel_generate_reference_number() { $prefix = 'ALT'; $timestamp = time(); $random = mt_rand(1000, 9999); return $prefix . $timestamp . $random; }