@extends('backend.p2p.layout') @section('title', __('Marketplace Settings')) @section('p2p_title') {{ __('Marketplace Settings') }} @endsection @section('p2p_icon', 'cil-settings') @php $allowedSelected = old('allowed_countries', $allowedSelected ?? []); $blockedSelected = old('blocked_countries', $blockedSelected ?? []); $makerFee = old('maker_fee_pct', $settings->maker_fee_pct); $takerFee = old('taker_fee_pct', $settings->taker_fee_pct); $orderExpiry = old('order_expiry_minutes', $settings->order_expiry_minutes); $disputeWindow = old('dispute_window_minutes', $settings->dispute_window_minutes); $minAmount = old('min_amount', $settings->min_amount); $maxAmount = old('max_amount', $settings->max_amount); $p2pEnabled = (bool) ($settings->enabled ?? false); $currencyCode = siteCurrency('code') ?? 'BDT'; $allowedCount = count($allowedSelected); $blockedCount = count($blockedSelected); $updatedAgo = $settings->updated_at ? $settings->updated_at->diffForHumans() : __('never'); @endphp @section('p2p_action') @lang('Back to dashboard') @endsection @section('p2p_content')
{{-- ── Status hero (read-only) ── --}}
@lang('Marketplace status')
{{ $p2pEnabled ? __('Open · Accepting trades') : __('Paused') }} {{ $p2pEnabled ? __('Live') : __('Offline') }}

@lang('Trading availability is controlled by the platform feature flag, not from this page. To toggle, use the') p2p_marketplace @lang('feature in admin → Feature management.')

@lang('Last updated') {{ $updatedAgo }} @lang('Default currency') {{ $currencyCode }}
{{-- ── Validation summary ── --}} @if($errors->any()) @endif
@csrf @method('PUT')
{{-- ── Fees ── --}}
@lang('Fees')
@lang('Platform commission charged to each side of a trade')
%
@lang('Charged to the trader who created the offer (the seller).') @error('maker_fee_pct'){{ $message }}@enderror
%
@lang('Charged to the trader who accepts the offer (the buyer).') @error('taker_fee_pct'){{ $message }}@enderror
@lang('On a trade of') {{ $currencyCode }}
@lang('Maker earns') 0.00 {{ $currencyCode }} · @lang('Taker pays') 0.00 {{ $currencyCode }} · @lang('Total platform revenue') 0.00 {{ $currencyCode }}
{{-- ── Timing ── --}}
@lang('Time windows')
@lang('How long traders have to pay and to dispute')
@lang('min')
@lang('Buyer payment deadline · 5 to 2,880 minutes (48h)') @error('order_expiry_minutes'){{ $message }}@enderror
@lang('min')
@lang('Time to raise a dispute after payment · 10 to 4,320 min (72h)') @error('dispute_window_minutes'){{ $message }}@enderror
@lang('Settlement timeline') {{ (int) $orderExpiry + (int) $disputeWindow }} @lang('min')
{{-- ── Limits ── --}}
@lang('Trade limits')
@lang('Default min / max trade amount per offer')
{{ $currencyCode }}
@lang('Smallest amount a trader can buy or sell in one order.') @error('min_amount'){{ $message }}@enderror
{{ $currencyCode }}
@lang('Leave blank for no upper limit. Must exceed minimum.') @error('max_amount'){{ $message }}@enderror
{{-- ── Geography ── --}}
@lang('Country availability')
@lang('Allow specific countries, block specific countries, or leave both empty to allow everyone')
{{-- Allowed countries --}}
    @foreach($countryOptions as $country) @php($isSelected = in_array($country['code'], $allowedSelected, true))
  • {{ $country['name'] }} {{ $country['code'] }}
  • @endforeach
@error('allowed_countries'){{ $message }}@enderror @error('allowed_countries.*'){{ $message }}@enderror
{{-- Blocked countries --}}
    @foreach($countryOptions as $country) @php($isSelected = in_array($country['code'], $blockedSelected, true))
  • {{ $country['name'] }} {{ $country['code'] }}
  • @endforeach
@error('blocked_countries'){{ $message }}@enderror @error('blocked_countries.*'){{ $message }}@enderror
@lang('Compliance tip'): @lang('A country cannot appear in both lists. If both are empty, the marketplace is open to all countries by default.')
{{-- ── Sticky save bar ── --}}
@lang('Changes take effect immediately for new orders. Existing trades follow their original rules.') @lang('Unsaved changes') @lang('Cancel')
@endsection @push('scripts') @endpush