{{-- resources/views/admin/payments/index.blade.php --}} @extends('admin.layouts.app') @section('title', $pageTitle ?? 'المدفوعات') @push('styles') @endpush @section('content') @php use Illuminate\Support\Facades\Route; $c = $cols ?? []; $F = $filters ?? []; $gateways = $gateways ?? []; $hasStart = Route::has('admin.payments.start'); $hasShow = Route::has('admin.payments.show'); $hasUpd = Route::has('admin.payments.updateStatus'); @endphp
admin.payments.start غير معرّف. أضِف:
POST /admin/payments/start → PaymentController@start
config/payments.php ضمن
['gateways' => ['stripe'=>['enabled'=>true], ...]].
| # | @if(!empty($c['reference']))المرجع | @endif @if(!empty($c['transaction_id']))رقم المعاملة | @endif @if(!empty($c['amount']))المبلغ | @endif @if(!empty($c['currency']))العملة | @endif @if(!empty($c['status']) || !empty($c['is_paid']))الحالة | @endif @if(!empty($c['gateway']))البوابة | @endif @if(!empty($c['email']))الإيميل | @endif @if(!empty($c['phone']))الهاتف | @endif @if(!empty($c['paid_at']) || !empty($c['created_at']))التاريخ | @endifإجراءات | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $row->{$c['id'] ?? 'id'} ?? '—' }} | @if(!empty($c['reference'])){{ $row->{$c['reference']} }} | @endif @if(!empty($c['transaction_id'])){{ $row->{$c['transaction_id']} }} | @endif @if(!empty($c['amount'])){{ number_format((float)($row->{$c['amount']} ?? 0), 2) }} | @endif @if(!empty($c['currency'])){{ $row->{$c['currency']} ?? '—' }} | @endif @if(!empty($c['status']) || !empty($c['is_paid'])) @php $sv = $c['status'] ? (string)($row->{$c['status']} ?? '') : ''; $pv = $c['is_paid'] ? (string)($row->{$c['is_paid']} ?? '') : ''; $isOk = in_array(strtolower($sv), ['paid','success','succeeded'], true) || in_array($pv, ['1','true'], true); $isPend = in_array(strtolower($sv), ['pending','processing'], true); $cls = $isOk ? 'bg-success' : ($isPend ? 'bg-warning text-dark' : 'bg-danger'); $txt = $sv !== '' ? $sv : ($isOk ? 'paid' : ($isPend ? 'pending' : 'failed')); @endphp{{ $txt }} | @endif @if(!empty($c['gateway'])){{ strtoupper((string)($row->{$c['gateway']} ?? '—')) }} | @endif @if(!empty($c['email'])){{ $row->{$c['email']} ?? '—' }} | @endif @if(!empty($c['phone'])){{ $row->{$c['phone']} ?? '—' }} | @endif @php $dcol = $c['paid_at'] ?? $c['created_at'] ?? null; @endphp @if($dcol){{ optional($row->{$dcol} ?? null)->format('Y-m-d') ?? (is_string($row->{$dcol} ?? null) ? \Illuminate\Support\Str::substr($row->{$dcol},0,10) : '—') }} | @endif@if($hasUpd) @endif | |
| لا توجد نتائج حالياً. | |||||||||||