@extends('frontend.layout_2') @section('title', 'কিস্তি পরিশোধ') @push('styles') @endpush @section('sub_layout') @php $oldMethod = old('method'); $headerData = null; if ($oldMethod && str_starts_with($oldMethod, 'mobile:')) { $slug = substr($oldMethod, 7); $pm = $mobileMethods->firstWhere('slug', $slug); if ($pm) { $headerData = [ 'type' => 'mobile', 'name' => $pm->name, 'logo' => $pm->logo ?? null, 'account' => $pm->account_number, 'holder' => null, 'branch' => null, ]; } } elseif ($oldMethod && str_starts_with($oldMethod, 'bank:')) { $slug = substr($oldMethod, 5); $pm = $bankMethods->firstWhere('slug', $slug); if ($pm) { $headerData = [ 'type' => 'bank', 'name' => $pm->bank_name, 'logo' => $pm->logo ?? null, 'account' => $pm->account_number, 'holder' => $pm->account_holder, 'branch' => $pm->branch_name, ]; } } $headerLogo = ''; if($headerData && !empty($headerData['logo'])){ $headerLogo = preg_match('/^(https?:\/\/|\/)/i', $headerData['logo']) ? $headerData['logo'] : asset('storage/'.$headerData['logo']); } @endphp
{{-- Loan summary --}}
Loan
#{{ $loan->id }}
Installment Amount
৳ {{ number_format($amount) }}
Due date
{{ $installment->due_date->format('d M Y') }}
{{-- নির্দেশনা --}}
নির্দেশনা
প্রথমে নির্বাচিত Mobile / Bank মেথডে Send Money / Bank Transfer করুন, তারপর নিচে Transaction ID ও Amount দিন।
{{-- HEADER: selected method + account info (deposit-style) --}}
@if($headerLogo) @else @endif
Payment Method
{{ $headerData['name'] ?? 'একটি পেমেন্ট মেথড নির্বাচন করুন' }}
Secure
{{-- account card --}}
@if($headerData) {{ $headerData['type'] === 'bank' ? 'Bank Account' : 'Mobile Account' }} @else Account @endif
{{ $headerData['account'] ?? '' }}
Account holder: {{ $headerData['holder'] ?? '' }}
Branch: {{ $headerData['branch'] ?? '' }}
{{-- FORM --}}
@csrf {{-- Methods --}}
পেমেন্ট মেথড সিলেক্ট করুন
@if($mobileMethods->count())
Mobile Banking
@foreach($mobileMethods as $m) @php $value = 'mobile:'.$m->slug; $logoRaw = $m->logo; $logoUrl = $logoRaw ? (preg_match('/^(https?:\/\/|\/)/i', $logoRaw) ? $logoRaw : asset('storage/'.$logoRaw)) : ''; $checked = $oldMethod === $value; @endphp @endforeach
@endif @if($bankMethods->count())
Bank Transfer
@foreach($bankMethods as $b) @php $value = 'bank:'.$b->slug; $logoRaw = $b->logo; $logoUrl = $logoRaw ? (preg_match('/^(https?:\/\/|\/)/i', $logoRaw) ? $logoRaw : asset('storage/'.$logoRaw)) : ''; $checked = $oldMethod === $value; @endphp @endforeach
@endif @error('method')
{{ $message }}
@enderror
{{-- Amount --}}
কমপক্ষে {{ number_format($amount) }} টাকা দিতে হবে।
@error('amount')
{{ $message }}
@enderror
{{-- TRX ID --}}
Mobile / Bank SMS থেকে প্রাপ্ত ট্রানজ্যাকশন আইডি লিখুন।
@error('transaction_id')
{{ $message }}
@enderror
@php $hasOldMethod = !empty($oldMethod); @endphp
Copied!
@endsection @push('scripts') @endpush