@extends('admin.layouts.app') @section('title', 'Courier Settings') @section('crumbs')Courier Settings@endsection @section('content') @php $help = [ 'steadfast' => 'portal.packzy.com (Steadfast merchant panel) β†’ API Settings theke API Key ar Secret Key. Shudhu address dilei order jay.', 'pathao' => 'Pathao merchant panel β†’ Developer API theke Client ID / Secret. Username/password holo merchant login. Store ID: merchant panel er Store list theke. Pathanor shomoy protita order er city ar zone select korte hobe.', 'carrybee' => 'CarryBee er public API nei, tai key lage na. On korle Orders theke CarryBee select kora jabe: order ta merchant.carrybee.com e baniye tracking code ekhane likhe dao, order Shipped hobe. Status nije update hobe na.', 'redx' => 'RedX merchant panel β†’ Developer API theke Access Token. Pickup Store ID: RedX er pickup store list theke. Pathanor shomoy protita order er delivery area select korte hobe.', ]; @endphp
@csrf @method('PUT') @php $cronUrl = url('/cron/courier-sync/'.$hookSecret); $cronCmd = 'wget -q -O /dev/null "'.$cronUrl.'"'; @endphp {{-- courier e pathano order er status nije nije update --}}

πŸ”„ Auto status update

@if ($lastSync) Shesh check: {{ \Illuminate\Support\Carbon::parse($lastSync)->diffForHumans() }} @else Ekhono check hoy ni @endif
cPanel → Cron Jobs → Common Settings: Once Per Half Hour (*/30 * * * *) → Command e paste → Add. Courier e pathano order gula protি 30 minute e check hobe: Out for Delivery, Delivered, Return hole order er Status nije nije bodlabe.
@foreach (['steadfast' => 'Steadfast', 'pathao' => 'Pathao', 'redx' => 'RedX'] as $ck => $cl) @php $hook = route('courier.webhook', [$ck, $hookSecret]); @endphp @endforeach Courier status bodlalei ei link e khobor pathabe. Link e gopon code ache, kauke dio na. Shudhu live site e (greatdealbd.com) kaj kore, local PC te na.
@foreach ($couriers as $key => $class)

🚚 {{ $class::label() }}

@if ($class::enabled() && $class::configured()) Ready @elseif ($class::configured()) Off @else Key nei @endif
@include('admin.partials.check', ['name' => "{$key}[enabled]", 'label' => $class::label().' use korbo', 'checked' => $class::enabled(), 'hint' => 'On thakle Orders page e ei courier select kora jabe'])
@foreach ($class::fields() as $field => $f) @php [$label, $type] = $f; $secret = $f[2] ?? false; $val = $class::config($field); @endphp @if ($type === 'check')
@include('admin.partials.check', ['name' => "{$key}[{$field}]", 'label' => $label, 'checked' => (bool) $val, 'hint' => 'Courier er test server e jabe, asol parcel hobe na'])
@else
@endif @endforeach @if ($key === 'pathao' && $class::configured())
@if ($pathaoStores)
@foreach ($pathaoStores as $st) @endforeach
Store IDNam
{{ $st['id'] }} {{ $st['name'] }} @if ($st['default'])Default@endif @unless ($st['active'])Off@endunless
{{ $st['address'] }}
@else
⚠️ Store list ana jay ni. {{ $pathaoError }}
@endif
@endif

ℹ️ {{ $help[$key] ?? '' }}

@endforeach
πŸ”’ Secret key/password database e encrypt kore rakha hoy, page e kokhono dekhay na.
@endsection @push('scripts') @endpush