@php use App\General\SettingsClass; use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Config; use App\Models\User; use Illuminate\Support\Facades\DB; $logoPath = null; $companyName = env('APP_NAME', 'WMS'); $companyAddress = ''; $companyCity = ''; $companyState = ''; $companyPostCode = ''; $companyCountry = ''; $companyPhone = 'Contact Information'; $companyEmail = env('EMAIL_ADDRESS', 'support@example.com'); // Get admin settings data $admin = User::where('user_type', config('constants.user_types.admin'))->first(); if ($admin) { $settings = DB::table('adminsettings') ->where('customer_id', $admin->id) ->get(); // Transform into key-value pairs for easier access $settingsData = []; foreach ($settings as $setting) { $settingsData[$setting->key] = $setting->value; } // Get logo if (isset($settingsData['brand_logo_dark'])) { $logoPath = $settingsData['brand_logo_dark']; } // Get company information if (isset($settingsData['company_company_name'])) { $companyName = $settingsData['company_company_name']; } if (isset($settingsData['company_company_address'])) { $companyAddress = $settingsData['company_company_address']; } if (isset($settingsData['company_company_city'])) { $companyCity = $settingsData['company_company_city']; } if (isset($settingsData['company_company_state'])) { $companyState = $settingsData['company_company_state']; } if (isset($settingsData['company_company_post_code'])) { $companyPostCode = $settingsData['company_company_post_code']; } if (isset($settingsData['company_company_country'])) { $companyCountry = $settingsData['company_company_country']; } if (isset($settingsData['company_company_telephone'])) { $companyPhone = $settingsData['company_company_telephone']; } if (isset($settingsData['company_company_email'])) { $companyEmail = $settingsData['company_company_email']; } if (isset($settingsData['system_date_format'])) { $DateFormate = $settingsData['system_date_format']; } } // Format full address $fullAddress = $companyAddress; if (!empty($companyCity)) { $fullAddress .= ', ' . $companyCity; } if (!empty($companyState)) { $fullAddress .= ', ' . $companyState; } if (!empty($companyPostCode)) { $fullAddress .= ' ' . $companyPostCode; } if (!empty($companyCountry)) { $fullAddress .= ', ' . $companyCountry; } // Set defaults for variables that might not be provided if (!isset($subject)) { $subject = 'Purchase Confirmation'; } // Status configuration for purchase confirmation $status_config = [ 'status_text' => 'Purchase Confirmed Successfully', 'color' => '#22C55E', // Green 'background' => 'linear-gradient(135deg, #22C55E 0%, #16A34A 100%)', 'icon' => '✅', 'message' => 'Your purchase has been confirmed successfully! Your plan is now active.', ]; @endphp
Thank you for your purchase.
Hi {{ $name ?? 'Valued Customer' }},
Thank you for your purchase! We're excited to confirm that your order has been processed successfully. Below are the details of your purchase.
| Order ID | {{ $order_id ?? 'N/A' }} |
| Plan Name | {{ $plan_name ?? 'N/A' }} |
| Original Price | {{ number_format($original_price, 2) }} {{ $currency }} |
| Discount ({{ $coupon_code }}) | {{ number_format($discount_amount, 2) }} {{ $currency }} |
| Final Amount | {{ number_format($price, 2) }} {{ $currency }} |
| Amount | {{ number_format($price, 2) }} {{ $currency }} |
| Duration | {{ $interval ?? 'N/A' }} Month(s) |
| Expiry Date | {{ $expiry_date ?? 'N/A' }} |
Your plan is now active and you can start using all the premium features right away. We're here to help you get the most out of your purchase.
Access Your Dashboard
If you have any questions about your purchase or need assistance, please don't hesitate to contact our support team.
Thank you,
{{ $companyName }} Team