@extends('layouts.base') @section('title', 'Panel - Documents') @section('content')

Documents

Countries documents

{{-- --}} {{-- --}} @foreach ($documents as $document) @php $amount = 0; if (str_starts_with($document->payment_gateway, 'stripe')) { $amount = (float) ($document->payment['amount'] / 100) ?? 0; } elseif (str_starts_with($document->payment_gateway, 'paypal')) { $amount = (float) $document->payment['purchase_units'][0]['amount']['value'] ?? 0; } @endphp {{-- --}} @endforeach
IDPayment IDDate time Country Email Passport Payment Status Actions
@foreach (config('countries') as $iso => $country) @endforeach
{{ $document->id }} {{ $document->payment['id'] }} {{ $document->created_at->format('d-m-Y H:i:s') }}
{{ config("countries.$document->iso")['name'] }}
{{ Str::limit($document->data['email'], 30) }} {{ Str::limit($document->data['passport'], 30) }} ID:

{{ isset($document->payment['id']) ? trim(substr($document->payment['id'], 0, 5) . ' ... ' . substr($document->payment['id'], -5)) : 'N/A' }}

Amount:

{{ $amount }} USD

Last 4:

{{ isset($document->payment['latest_charge']['payment_method_details']['card']['last4']) ? $document->payment['latest_charge']['payment_method_details']['card']['last4'] : 'N/A' }}

Payment Gateway

{{ $document->payment_gateway }}

!$document->refund, 'text-red-500' => $document->refund, ])> {{ $document->refund ? 'Refunded' : 'Paid' }}
@if (!$document->refund)
@csrf @endif
@if (count($documents) === 0)

No documents found

@else @endif
@endsection @push('scripts') @endpush