feat: Add deposit success email notification system with new mailer, job, view, and client update request.

This commit is contained in:
pbao9
2026-02-19 20:33:24 +07:00
parent c720e62bda
commit 7769326ac9
9 changed files with 612 additions and 0 deletions
@@ -0,0 +1,36 @@
<?php
namespace App\Jobs\Mail\Customer;
use App\Mail\Customer\DepositSuccess;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Mail;
class DepositSuccessJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public array $data;
public function __construct(array $data)
{
$this->data = $data;
}
public function handle(): void
{
try {
Mail::to($this->data['customer_email'])
->send(new DepositSuccess($this->data));
} catch (\Throwable $e) {
\Log::error('Không thể gửi email thông báo nạp tiền thành công: ' . $e->getMessage(), [
'customer_email' => $this->data['customer_email'] ?? null,
'transaction_code' => $this->data['transaction_code'] ?? null,
]);
}
}
}