renderFromTemplate('manual_deposit_status', $this->vars())['subject'], ); } public function content(): Content { return new Content( htmlString: $this->renderFromTemplate('manual_deposit_status', $this->vars())['html'], ); } public function attachments(): array { return []; } private function payload(): array { try { $setting = Setting::where('key', 'setting')->first(); $settingValue = $setting ? json_decode((string) $setting->value, true) : []; } catch (\Throwable) { $settingValue = []; } return array_merge([ 'company_name' => $settingValue['company'] ?? config('app.name', 'The Gioi So'), 'company_logo' => $settingValue['logo'] ?? '', 'support_email' => $settingValue['email'] ?? config('mail.support_email', 'support@thegioiso.com'), 'support_phone' => $settingValue['hotline'] ?? ($settingValue['phone'] ?? config('mail.support_phone', '1900.xxxx')), 'portal_url' => rtrim(env('FRONTEND_URL', config('app.url')), '/') . '/nap-tien', ], $this->data); } private function vars(): array { $data = $this->payload(); $amount = (float) ($data['amount'] ?? 0); return [ 'company_name' => $data['company_name'] ?? config('app.name', 'The Gioi So'), 'customer_name' => $data['customer_name'] ?? 'Quý khách', 'transaction_code' => $data['transaction_code'] ?? 'N/A', 'amount_formatted' => number_format($amount, 0, ',', '.'), 'status_label' => $data['status_label'] ?? 'Đang chờ duyệt', 'status_color' => $data['status_color'] ?? '#f16723', 'status_bg' => $data['status_bg'] ?? '#fff7ed', 'status_message' => $data['status_message'] ?? ($data['message'] ?? ''), 'deposit_date' => $data['deposit_date'] ?? now()->format('d/m/Y H:i:s'), 'processed_date_row' => !empty($data['processed_date']) ? '