74 lines
3.0 KiB
PHP
74 lines
3.0 KiB
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Mail\Mailables\Content;
|
|
use Illuminate\Mail\Mailables\Envelope;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class NotifikasiCustomer extends Mailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
/**
|
|
* Create a new message instance.
|
|
*/
|
|
public $pemesan;
|
|
public $noOrder;
|
|
public $total_harga;
|
|
public function __construct($pemesan, $noOrder, $total_harga)
|
|
{
|
|
$this->pemesan = $pemesan;
|
|
$this->noOrder = $noOrder;
|
|
$this->total_harga = $total_harga;
|
|
}
|
|
|
|
/**
|
|
* Get the message content definition.
|
|
*/
|
|
public function build(){
|
|
return $this->subject('Konfirmasi Pesanan Anda')->html("
|
|
<div style='font-family: Arial, sans-serif; max-width: 600px; margin: auto; border: 1px solid #eee; padding: 24px;'>
|
|
<h2 style='color: #28a745;'>✅ Pesanan Berhasil!</h2>
|
|
<p>Halo, <strong>{$this->pemesan}</strong>,</p>
|
|
<p>Terima kasih telah melakukan pemesanan. Berikut detail pesanan Anda:</p>
|
|
|
|
<table style='width: 100%; border-collapse: collapse; margin-top: 16px;'>
|
|
<tr>
|
|
<td style='padding: 8px; border: 1px solid #ddd;'>No. Order</td>
|
|
<td style='padding: 8px; border: 1px solid #ddd;'>{$this->noOrder}</td>
|
|
</tr>
|
|
<tr>
|
|
<td style='padding: 8px; border: 1px solid #ddd;'>Tanggal</td>
|
|
<td style='padding: 8px; border: 1px solid #ddd;'>" . now()->format('d M Y H:i') . "</td>
|
|
</tr>
|
|
<tr>
|
|
<td style='padding: 8px; border: 1px solid #ddd;'>Status</td>
|
|
<td style='padding: 8px; border: 1px solid #ddd; color: green;'>Menunggu Pembayaran</td>
|
|
</tr>
|
|
<tr>
|
|
<td style='padding: 8px; border: 1px solid #ddd;'>Nominal Harus Bayar</td>
|
|
<td style='padding: 8px; border: 1px solid #ddd; color: green;'>Rp ". number_format($this->total_harga, 0,',', '.')
|
|
."</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p style='margin-top: 24px;'>Silakan segera lakukan pembayaran ke rekening berikut:</p>
|
|
<ul style='list-style: none; padding: 0;'>
|
|
<li><strong>Bank:</strong> BCA</li>
|
|
<li><strong>Nomor Rekening:</strong> 1234-5678-9101</li>
|
|
<li><strong>Atas Nama:</strong> RSAB Harapan Kita</li>
|
|
</ul>
|
|
|
|
<p style='margin-top: 24px; font-size: 14px; color: #555;'>Jika Anda tidak merasa melakukan pesanan ini, abaikan email ini.</p>
|
|
|
|
<hr style='margin-top: 40px;'>
|
|
<p style='text-align: center; font-size: 12px; color: #888;'>© " . date('Y') . " RSAB Harapan Kita</p>
|
|
</div>
|
|
");
|
|
}
|
|
}
|