@extends('layouts.app') @section('title','Purchase Success') @section('content') @php $isSuccess = in_array($purchase->status, ['success','completed','approved']); $isFailed = in_array($purchase->status, ['failed','rejected','cancelled']); if ($isFailed) { $statusLabel = 'বাতিল/ব্যর্থ'; $statusColor = 'text-red-500'; } elseif ($isSuccess) { $statusLabel = 'সফল হয়েছে'; $statusColor = 'text-green-500'; } else { $statusLabel = 'অপেক্ষমান'; $statusColor = 'text-orange-500'; } $offerName = $purchase->offer->title ?? $purchase->offer->name ?? 'Offer'; $amount = (float) $purchase->price; @endphp
{{-- main white card --}}
{{-- green circle with check --}}
{{-- heading --}}

লেনদেন গ্রহণ করা হয়েছে

Offer Purchase

{{-- details box --}}
{{-- offer name --}}
অফারঃ {{ \Illuminate\Support\Str::limit($offerName, 22) }}
{{-- amount --}}
পরিমাণঃ ৳{{ number_format($amount, 2) }}
{{-- msisdn --}}
নম্বরঃ {{ $purchase->msisdn }}
{{-- status --}}
অবস্থাঃ {{ $statusLabel }}
{{-- date --}}
তারিখঃ {{ optional($purchase->created_at)->format('d-m-Y') }}
{{-- bottom full-width green button --}} হোমে ফিরে যান
@endsection