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
@@ -6,6 +6,7 @@ use App\Enums\TransactionStatus;
use App\Http\Controllers\Controller;
use App\Http\Requests\DepositRequest;
use App\Http\Services\VNPayService;
use App\Jobs\Mail\Customer\DepositSuccessJob;
use App\Models\Customer;
use App\Models\Log;
use App\Models\Transaction;
@@ -148,6 +149,17 @@ class TransactionController extends Controller
'customer_id' => $transaction->customer_id,
]);
DepositSuccessJob::dispatch([
'customer_email' => $customer->email,
'customer_name' => $customer->fullname,
'transaction_code' => $transaction->public_code,
'amount' => $transaction->amount,
'credit' => $transaction->amount / 100,
'current_total' => $customer->total,
'current_credit' => $customer->credit,
'deposit_date' => now()->format('d/m/Y H:i:s'),
]);
DB::commit();
} catch (\Exception $e) {
DB::rollBack();