@php $u = auth()->user(); $cfg = $u?->current_workspace_id ? \App\Models\WaProviderConfig::query()->forWorkspace($u->current_workspace_id)->first() : null; $sf = $u?->current_workspace_id ? \App\Models\WaStorefront::where('workspace_id', $u->current_workspace_id)->first() : null; @endphp
@include('user.store._sidebar', ['current' => 'gateways', 'cfg' => $cfg, 'sf' => $sf])
{{ __('Store / Checkout gateways') }}

{{ __('Checkout') }} {{ __('gateways') }}

{{ __('Add your OWN payment gateway keys so in-chat checkout charges INTO your account. Works on both WhatsApp Business API and Unofficial numbers. Paste the keys the gateway names in its docs — one per line.') }}

@if (session('status'))
{{ session('status') }}
@endif @if ($errors->any())
{{ $errors->first() }}
@endif
@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