feat: khởi tạo/huỷ domain Plesk qua job, gửi mail hoá đơn qua queue, đính kèm triển khai
- ProvisionDnsDomainJob/SuspendDnsDomainJob: tạo domain admin lên Plesk, huỷ = suspend (is_created=3) - Khách xem zone DNS được gán ở /dich-vu/domain, quản lý bản ghi A/AAAA/CNAME/TXT/MX/SRV - send-mail hoá đơn đẩy SendInvoiceMailJob, preview + sửa nội dung, ghi mail.order_id - invoice_attachments.type (payment_proof/deployment) - CacheService xoá theo SCAN pattern, Redis không persistent mặc định - Backfill transactions.public_code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
30898ea46f
commit
94614d9cb3
@@ -24,6 +24,7 @@ use App\Repositories\InvoiceItem\InvoiceItemRepositoryInterface;
|
||||
use App\Repositories\Module\Hosting\HostingRepositoryInterface as ModuleHostingRepositoryInterface;
|
||||
use App\Repositories\Module\HostingServer\HostingServerRepositoryInterface;
|
||||
use App\Repositories\Order\OrderRepositoryInterface;
|
||||
use App\Support\AutoEmailGate;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -246,7 +247,7 @@ class OrderService
|
||||
],
|
||||
[
|
||||
'uuid' => (string) Str::uuid(),
|
||||
'public_code' => 'INV-PAY-' . now()->format('Ymd') . '-' . strtoupper(Str::random(6)),
|
||||
'public_code' => Transaction::newPublicCode('INV-PAY'),
|
||||
'amount' => $orderTotal,
|
||||
'user_id' => Auth::guard('admin')->id(),
|
||||
'status' => TransactionStatus::COMPLETED->value,
|
||||
@@ -258,15 +259,17 @@ class OrderService
|
||||
return $order;
|
||||
});
|
||||
|
||||
OrderCreatedJob::dispatch([
|
||||
'customer_email' => $customer->email,
|
||||
'client_name' => $customer->fullname,
|
||||
'order_num' => $orderData['order_num'],
|
||||
'invoice_num' => $invoiceData['invoice_number'],
|
||||
'order_total' => number_format($orderTotal, 0, ',', '.'),
|
||||
'company_name' => setting('general.company_name') ?: config('app.name'),
|
||||
'company_logo' => setting('general.company_logo') ?: '',
|
||||
]);
|
||||
if (AutoEmailGate::allows('order_created')) {
|
||||
OrderCreatedJob::dispatch([
|
||||
'customer_email' => $customer->email,
|
||||
'client_name' => $customer->fullname,
|
||||
'order_num' => $orderData['order_num'],
|
||||
'invoice_num' => $invoiceData['invoice_number'],
|
||||
'order_total' => number_format($orderTotal, 0, ',', '.'),
|
||||
'company_name' => setting('general.company_name') ?: config('app.name'),
|
||||
'company_logo' => setting('general.company_logo') ?: '',
|
||||
]);
|
||||
}
|
||||
|
||||
return $order;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user