{{ __('Reseller billing · Meta credit line') }}
{{ __('Connect your') }} {{ __('Meta') }} {{ __('keys') }}.
{{ __('Attach your own Meta credit line to a customer\'s WhatsApp account so Meta bills you (the reseller) — not them. Follow the two steps below; the guide on the right shows exactly where to get each value.') }}
{{ session($k) }}
@endif
@endforeach
{{-- Do you even need this page? --}}
{{ __('Optional — only for true reselling.') }}
{{ __('You only need this if you want Meta to bill YOU for your customers\' messages. It requires Meta "Solution Partner" status + an approved Meta credit line. Until that\'s approved, everything still works: customers top up their wallet and you charge per message on') }}
{{ __('Message pricing') }}.
@php
// Currency is dynamic — pulled from the platform's own currencies,
// nothing hardcoded. Default the picker to the platform currency.
$metaCurrencies = \App\Models\Currency::query()->orderBy('code')
->pluck('code')->map(fn ($c) => strtoupper($c))->filter()->unique()->values()->all();
if (empty($metaCurrencies)) {
$metaCurrencies = [strtoupper(\App\Support\FormatSettings::currencyFor()?->code ?? 'USD')];
}
$platformCur = strtoupper(\App\Support\FormatSettings::currencyFor()?->code ?? 'USD');
$defaultCur = in_array($platformCur, $metaCurrencies, true) ? $platformCur : ($metaCurrencies[0] ?? 'USD');
@endphp
{{-- STEP 1 — Connect --}}
{{-- STEP 2 — Attach --}}
@else
@endif
{{-- Attached accounts --}}
@if ($rows->hasPages())
{{-- ══════════════ RIGHT: setup guide with official links ══════════════ --}}
1
{{ $configured ? __('Connected') : __('Not connected') }}
{{ __('meta connection') }}
{{ __('Connect your Meta business') }}
2
@if ($configured)
@endif
@if (empty($wabaAccounts))
{{ __('attach manually — optional') }}
{{ __('Attach one customer by hand') }}
{{ ($autoAttach ?? false) ? __('Auto-attach is ON, so new customers attach themselves — use this only for a one-off.') : __('Or turn on auto-attach above and skip this entirely.') }}
{{ __('No customer has connected a WhatsApp Business (Cloud API) number yet. Once a workspace connects one under') }}
/devices, {{ __('it will appear here to pick.') }}
{{ __('attached accounts') }}
{{ __('Credit lines in use') }}
| {{ __('Workspace') }} | {{ __('WABA') }} | {{ __('Alloc ID') }} | {{ __('Currency') }} | {{ __('Status') }} | {{ __('Action') }} |
|---|---|---|---|---|---|
| {{ $workspaceNames[$r->workspace_id] ?? ('#' . $r->workspace_id) }} | …{{ substr($r->waba_id, -6) }} | {{ $r->allocation_config_id ?: '—' }} | {{ $r->currency }} | @php $sc = ['attached'=>'bg-wa-green/20 text-wa-deep','revoked'=>'bg-paper-100 text-ink-500','failed'=>'bg-accent-coral/20 text-accent-coral'][$r->status] ?? 'bg-paper-100'; @endphp {{ $r->status }} @if ($r->last_error)!@endif | @if ($r->status === 'attached') @else — @endif |
| {{ __('No accounts attached yet. Finish steps 1 and 2 above.') }} | |||||
{{ $rows->links() }}
@endif