{{-- Navigation retour --}}
{{ __('canc.payments.back') }}
{{-- Flash messages --}} @if (session('success'))
{{ session('success') }}
@endif {{-- Carte Principale de la Transaction --}}
{{-- En-tête Statut --}}
{{ __('canc.payments.reference') }}

{{ $payment->public_id }}

{{ $payment->offer->localizedName() }}

{{-- Badge de Statut Visuel --}} @php $statusStyles = match ($payment->status->value) { 'paid' => 'bg-emerald-100 text-emerald-800 border-emerald-200', 'pending_customer', 'processing' => 'bg-blue-100 text-blue-800 border-blue-200 animate-pulse', 'awaiting_review' => 'bg-indigo-100 text-indigo-800 border-indigo-200', 'failed', 'rejected' => 'bg-rose-100 text-rose-800 border-rose-200', 'expired', 'cancelled' => 'bg-slate-100 text-slate-800 border-slate-200', 'refunded', 'partially_refunded' => 'bg-purple-100 text-purple-800 border-purple-200', default => 'bg-amber-100 text-amber-800 border-amber-200', }; @endphp
{{ __('canc.payments.status.' . $payment->status->value) }}
{{-- Message contextuel d'orientation client --}}
@if ($payment->status->value === 'paid')
{{ __('canc.payments.success_title') }}

{{ __('canc.payments.success_description') }} @if ($payment->invoice && $payment->invoice->receipt_number) - {{ __('canc.payments.official_receipt', ['number' => $payment->invoice->receipt_number]) }}. @endif

@elseif ($payment->status->value === 'pending_customer')
{{ __('canc.payments.pending_title') }}

{{ __('canc.payments.pending_description') }} @if ($payment->payer_phone_last_four) (Numéro se terminant par •••• {{ $payment->payer_phone_last_four }}). @endif

@elseif ($payment->status->value === 'awaiting_review')
{{ __('canc.payments.review_title') }}

{{ __('canc.payments.review_description') }}

@elseif ($payment->failure_message)
{{ __('canc.payments.status.failed') }}

{{ $payment->failure_message }}

@endif {{-- Grille des détails financiers --}}
{{ __('canc.payments.fields.amount') }}
{{ number_format($payment->amount_minor, 0, ',', ' ') }} {{ $payment->currency }}
{{ __('canc.payments.fields.channel') }}
{{ $payment->channel->localizedName() }}
{{ __('canc.payments.fields.date') }}
{{ $payment->created_at->translatedFormat('d F Y · H:i') }}
@if ($payment->payer_phone_last_four)
{{ __('canc.payments.fields.phone') }}
•••• {{ $payment->payer_phone_last_four }}
@endif @if ($payment->offline_reference)
{{ __('canc.payments.fields.reference') }}
{{ $payment->offline_reference }}
@endif @if ($payment->provider_transaction_id)
{{ __('canc.payments.transaction_id') }}
{{ $payment->provider_transaction_id }}
@endif
{{-- Facture associée si émise --}} @if ($payment->invoice)
{{ __('canc.payments.invoice') }} {{ $payment->invoice->number }}
{{ __('canc.payments.view_invoice') }}
@endif {{-- Actions de suivi / boutons --}}
{{-- Bouton externe fournisseur si URL disponible --}} @if (data_get($payment->metadata, 'checkout_url') && ! $payment->status->isFinal()) {{ __('canc.payments.continue_provider') }} @endif {{-- Rafraîchir le statut pour paiement en cours --}} @if ($payment->method->isOnline() && ! $payment->status->isFinal())
@csrf
@endif {{-- Annulation par le client si non final --}} @if ($payment->status->allowsCustomerCancellation())
@csrf
@endif {{-- Si paiement échoué ou expiré : lien pour relancer --}} @if ($payment->status->isFinal() && $payment->status->value !== 'paid') {{ __('canc.payments.retry_payment') }} @endif