This commit is contained in:
pbao9
2025-07-29 17:31:45 +07:00
parent d80580d1e4
commit b048edee11
15 changed files with 382 additions and 16 deletions
@@ -117,14 +117,6 @@ class ProcessOrderPaymentJob implements ShouldQueue
$successfulVMs = array_filter($vmCreationResults, fn($vm) => $vm['success']);
$failedVMs = array_filter($vmCreationResults, fn($vm) => !$vm['success']);
Log::info("Kết quả tạo VM cho đơn hàng #{$this->order->order_num}", [
'order_id' => $this->order->id,
'total_vms' => count($vmCreationResults),
'successful_vms' => count($successfulVMs),
'failed_vms' => count($failedVMs),
'vm_results' => $vmCreationResults
]);
// Nếu tất cả VM được tạo thành công, tiến hành thanh toán
if ($allVMsCreated && count($successfulVMs) > 0) {
DB::beginTransaction();
@@ -142,13 +134,6 @@ class ProcessOrderPaymentJob implements ShouldQueue
DB::commit();
Log::info("Thanh toán thành công cho đơn hàng #{$this->order->order_num}", [
'order_id' => $this->order->id,
'vm_results' => $vmCreationResults,
'total_vms' => count($vmCreationResults),
'successful_vms' => count($successfulVMs)
]);
// Gửi thông báo thành công cho khách hàng
$this->sendSuccessNotification($vmCreationResults);