@extends('layouts.app') @push('styles') @endpush @section('content')

Order Details #{{$order->order_ref}}

Detailed view of a specific eSIM order.

Order Summary {{(ucfirst($order->status) == 'Pending') ? 'Failed' : ucfirst($order->status)}}

Order ID: {{$order->order_ref}}

Order Date: {{date('d M Y h:i A',strtotime($order->created_at))}}

Payment Status: {{ucfirst(@$order->payment->payment_status)}}

Total Amount: {{@$order->currency->symbol}} {{@$order->total_amount}}

Payment Mode: {{@$order->payment->payment_mode}}

Transaction ID: {{@$order->payment->payment_id ?? @$order->payment->gateway_order_id }}

Customer Information

Name: {{$order->user->name ?? 'N/A'}}

Email: {{$order->user->email ?? 'N/A'}}

@if($order->package->type == 'topup')
TopUp Details

Plan Name: {{$order->package->name}}

Data: {{$order->package->data}}

Validity: {{@$order->package->day}} Days

Price: {{@$order->currency->symbol}} {{@$order->total_amount}}

ICCID: {{ @$topuphistory->iccid }}

@if($order->esims)
QR Code / Manual Setup Details:
eSIM QR Code Scan to activate

Activation Code (Confirmation Code): {{@$order->esims->qrcode}}

Copied!
@endif
@else
eSIM Details

Plan Name: {{$order->package->name}}

Data: {{$order->package->data}}

Validity: {{@$order->package->day}} Days

Price: {{@$order->currency->symbol}} {{@$order->total_amount}}

eSIM Status: {{@$order->esims->status}}

ICCID: {{ @$order->esims->iccid }}

@if($order->esims)
QR Code / Manual Setup Details:
eSIM QR Code Scan to activate

Activation Code (Confirmation Code): {{@$order->esims->qrcode}}

Copied!
@endif
@endif @if(!empty($order->activation_details)) @php // Decode JSON safely $activationDetails = is_array($order->activation_details) ? $order->activation_details : json_decode($order->activation_details, true); // Function to detect if a string has HTML tags function containsHtml($value) { return $value !== strip_tags($value); } // Recursive render function function renderJsonDetails($data, $level = 0) { $indent = $level * 15; $html = ''; return $html; } @endphp @if(!empty($activationDetails))
Activation Details
{!! renderJsonDetails($activationDetails) !!}
@endif @endif
@endsection