Refactor order payment process and enhance invoice details

- Updated `payOrder` method in `OrderControllerRefactor` to accept `orderNum` instead of `id` for better clarity and functionality.
- Implemented `findByOrderNum` method in `OrderRepository` to retrieve orders based on order number and customer ID.
- Enhanced `InvoiceDetailResource` to include VMware details and removed unnecessary fields.
- Added `service_plan_id` to `ProductResource` and updated the `Product` model to establish a relationship with `ServicePlan`.
- Created `ServicePlan` and `ServicePlanPlesk` models along with their respective controllers and migrations for managing hosting service plans.
- Updated API routes to include endpoints for managing service plans.
- Modified email templates to standardize support phone number across various customer communications.
This commit is contained in:
baodev0
2026-08-11 10:12:25 +07:00
parent e3d3dea8aa
commit 7314313198
26 changed files with 329 additions and 32 deletions
@@ -62,6 +62,7 @@ class ProductController extends Controller
$validated = $request->validate([
'name' => 'required|string|max:255',
'product_categories_id' => 'nullable|integer|exists:product_categories,id',
'service_plan_id' => 'nullable|integer|exists:service_plans,id',
'product_type' => 'nullable|string',
'category' => 'nullable|string|max:255',
'thumbnail' => 'nullable|string|max:2048',
@@ -93,6 +94,7 @@ class ProductController extends Controller
'name' => $validated['name'],
'slug' => Str::slug($validated['name']),
'product_categories_id' => $validated['product_categories_id'] ?? null,
'service_plan_id' => $validated['service_plan_id'] ?? null,
'product_type' => $productType,
'thumbnail' => ($validated['thumbnail'] ?? null) ?: null,
'is_active' => $validated['is_active'] ?? true,
@@ -124,6 +126,7 @@ class ProductController extends Controller
$validated = $request->validate([
'name' => 'sometimes|required|string|max:255',
'product_categories_id' => 'nullable|integer|exists:product_categories,id',
'service_plan_id' => 'nullable|integer|exists:service_plans,id',
'product_type' => 'nullable|string',
'thumbnail' => 'nullable|string|max:2048',
'is_active' => 'boolean',