{{-- Merchant checkout-gateway keys (per-workspace, wa_merchant_gateways storefront_id=0). The CLIENT's OWN gateway keys — the SAME keys used by store checkout AND appointment booking deposits, so money is collected into the client's account, never the platform owner's. Expects: $catalog, $configured, $fields, $webhookBase. Forms post to user.store.gateways.* (routes unchanged). --}}
@foreach ($catalog as $slug => $meta) @php $row = $configured[$slug] ?? null; $isOn = $row && $row->active; @endphp
{{ $meta['name'] }} @if ($row) {{ $isOn ? __('active') : __('off') }} {{ $row->mode }} @endif
{{ $meta['desc'] }}
@csrf @php $fset = $fields[$slug] ?? []; @endphp @if (!empty($fset))
@foreach ($fset as $fkey => $f) @php $ftype = ($f['type'] ?? 'text') === 'password' ? 'password' : 'text'; $stored = $row ? $row->getCredential($fkey) : null; // Never pre-fill a secret; safe to show non-password keys (key ids). $prefill = ($ftype === 'text' && $stored) ? $stored : ''; $ph = $ftype === 'password' && $stored ? '•••••••• ' . __('stored') : ($f['hint'] ?? ''); @endphp @endforeach
@if ($row) {{ __('Leave a field blank to keep its stored value.') }} @endif @else @endif {{-- Webhook URL — MUST be pasted into the gateway dashboard so payments confirm. --}}
{{ __('Webhook URL') }} — {{ __('paste into your :name dashboard so payments confirm automatically', ['name' => $meta['name']]) }} {{ $webhookBase }}{{ $slug }}
@if ($row)
@csrf @method('DELETE')
@endif
@endforeach