{{ __('Checkout Summary') }}

Order Summary

{{-- Session Messages --}} @if (session('success')) @endif @if (session('error')) @endif

Items in your order:

@forelse ($purchases as $item) @empty @endforelse
Item Type Price
@if ($item['type'] === 'transfer_pass') {{-- Added specific details for pass transfers --}} {{ $item['name'] ?? 'Pass Transfer Fee' }} @php $meta = $item['meta_data']; @endphp @if(isset($meta['pass_type']) && isset($meta['pass_id']))

Pass Type: {{ ucfirst($meta['pass_type']) }} Pass, ID: {{ $meta['pass_id'] }}

@endif @elseif ($item['type'] === 'update_plate') Vehicle Plate Update @php // Fix: Check if meta_data is a string before decoding $meta = is_string($item['meta_data']) ? json_decode($item['meta_data'], true) : $item['meta_data']; @endphp @if (isset($meta['old_vehicle_no']) && isset($meta['new_vehicle_no']))

{{-- Display both old and new plate numbers --}} Old Plate: {{ $meta['old_vehicle_no'] }} -> New Plate: {{ $meta['new_vehicle_no'] }}

@endif @else {{ $item['name'] }} @endif
@if ($item['type'] === 'transfer_pass') Transfer @elseif ($item['type'] === 'purchase_pass') Season Pass @elseif ($item['type'] === 'purchase_reserved_lot') Reserved Lot @elseif ($item['type'] === 'payment_compound') Compound @elseif ($item['type'] === 'update_plate') Plate Update @endif RM {{ number_format($item['price'], 2) }}
No items found in this order.
{{-- New Summary Breakdown --}}
Subtotal: RM {{ number_format($subtotalAmount, 2) }}
{{ $feeName ?? 'Processing Fee' }}: RM {{ number_format($processingFee, 2) }}
Grand Total: RM {{ number_format($totalAmount, 2) }}
{{-- Payment Methods Section (New Layout) --}}

Payment Method

@csrf {{-- FIX: Updated the variable name to align with the CheckoutController --}}
@forelse($availablePaymentMethods as $method) @empty

No payment methods are currently available.

@endforelse
Back to Cart
{{-- Full Page Loading Indicator for Finalize --}}