/** * Send invoice/receipt email after purchase */ public static function sendInvoiceEmail($email, $firstname, $payment_data) { $subject = "Invoice #" . $payment_data['id'] . " - SmartEA.PRO"; $message = self::getEmailTemplate([ 'title' => '💳 Payment Receipt', 'body' => "

Hello {$firstname},

Thank you for your purchase! Here's your invoice:

Invoice #{$payment_data['id']}

Date: " . date('F j, Y', strtotime($payment_data['created_at'])) . "
Package: {$payment_data['package_name']}
Amount: $" . number_format($payment_data['amount'], 2) . "
Payment Method: {$payment_data['payment_method']}
Transaction ID: {$payment_data['transaction_id']}
Status: ✓ Paid
Total Paid: $" . number_format($payment_data['amount'], 2) . "
" . (!empty($payment_data['license_key']) ? "

Your License Key:

{$payment_data['license_key']}
" : "") . "

Keep this email for your records. If you have any questions about your purchase, please contact us at support@smartea.pro

View Dashboard
" ]); return self::send($email, $subject, $message); } /** * Send ticket notification email */ public static function sendTicketNotification($email, $name, $ticket_data, $is_new = true) { if ($is_new) { $subject = "Ticket #{$ticket_data['id']} Created - SmartEA.PRO"; $title = '🎫 Ticket Created'; $body_text = "Your support ticket has been created successfully."; } else { $subject = "New Reply on Ticket #{$ticket_data['id']} - SmartEA.PRO"; $title = '💬 New Reply'; $body_text = "There's a new reply on your support ticket."; } $status_colors = [ 'open' => '#3B82F6', 'in_progress' => '#F59E0B', 'resolved' => '#10B981', 'closed' => '#6B7280' ]; $status_color = $status_colors[$ticket_data['status']] ?? '#3B82F6'; $message = self::getEmailTemplate([ 'title' => $title, 'body' => "

Hello {$name},

{$body_text}

Ticket #{$ticket_data['id']}

Subject: {$ticket_data['subject']}
Status: {$ticket_data['status']}
Created: " . date('F j, Y', strtotime($ticket_data['created_at'])) . "
View Ticket

We typically respond within 24 hours.

" ]); return self::send($email, $subject, $message); } Sign Up - SmartEA.PRO

Create your account

🔒 Security Check
1 + 6 = ?