Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -123,16 +123,21 @@
|
||||
|
||||
<div class="border-t border-slate-100 pt-4">
|
||||
<p class="text-sm font-semibold text-slate-900">Payment gateway</p>
|
||||
<p class="mt-1 text-xs text-slate-400">Connect Paystack, Flutterwave, or Hubtel. Online checkouts go 100% to you — 0% Ladill fee. Pro & Business plans only.</p>
|
||||
<p class="mt-1 text-xs text-slate-400">Ladill Pay is recommended, selected by default, and needs no API keys. Pro and Business can optionally use an owner gateway.</p>
|
||||
</div>
|
||||
<div class="rounded-xl border border-emerald-100 bg-emerald-50 px-4 py-3 text-sm text-emerald-900">
|
||||
<p class="font-medium">Ladill Pay — recommended default</p>
|
||||
<p class="mt-1 text-emerald-800/80">Zero-config card and MoMo checkout. It remains the safe fallback whenever an owner gateway is unavailable.</p>
|
||||
</div>
|
||||
@if ($canUsePaymentGateway ?? false)
|
||||
<div>
|
||||
<label class="text-sm font-medium text-slate-700">Provider</label>
|
||||
<select name="gateway_provider" class="mt-1.5 block w-full rounded-xl border-slate-300 text-sm shadow-sm focus:border-indigo-500 focus:ring-indigo-500">
|
||||
<option value="">Select a provider</option>
|
||||
<option value="paystack" @selected(old('gateway_provider', $gateway?->provider ?? null) === 'paystack')>Paystack</option>
|
||||
<option value="flutterwave" @selected(old('gateway_provider', $gateway?->provider ?? null) === 'flutterwave')>Flutterwave</option>
|
||||
<option value="hubtel" @selected(old('gateway_provider', $gateway?->provider ?? null) === 'hubtel')>Hubtel</option>
|
||||
@php $selectedGateway = old('gateway_provider', $gateway?->is_active ? $gateway?->provider : ''); @endphp
|
||||
<option value="">Ladill Pay (recommended)</option>
|
||||
<option value="paystack" @selected($selectedGateway === 'paystack')>Paystack</option>
|
||||
<option value="flutterwave" @selected($selectedGateway === 'flutterwave')>Flutterwave</option>
|
||||
<option value="hubtel" @selected($selectedGateway === 'hubtel')>Hubtel</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="grid gap-4 sm:grid-cols-2">
|
||||
@@ -151,21 +156,21 @@
|
||||
</div>
|
||||
<label class="flex items-start gap-3 rounded-xl border border-slate-200 bg-slate-50 px-4 py-3">
|
||||
<input type="hidden" name="gateway_is_active" value="0">
|
||||
<input type="checkbox" name="gateway_is_active" value="1" @checked(old('gateway_is_active', $gateway?->is_active ?? true)) class="mt-0.5 rounded border-slate-300 text-indigo-600 focus:ring-indigo-500">
|
||||
<input type="checkbox" name="gateway_is_active" value="1" @checked(old('gateway_is_active', $gateway?->is_active ?? false)) class="mt-0.5 rounded border-slate-300 text-indigo-600 focus:ring-indigo-500">
|
||||
<span>
|
||||
<span class="block text-sm font-medium text-slate-800">Gateway enabled</span>
|
||||
<span class="mt-0.5 block text-xs text-slate-500">Required for card / MoMo checkouts on the register.</span>
|
||||
<span class="block text-sm font-medium text-slate-800">Use my gateway instead of Ladill Pay</span>
|
||||
<span class="mt-0.5 block text-xs text-slate-500">Optional. Invalid or incomplete credentials automatically fall back to Ladill Pay.</span>
|
||||
</span>
|
||||
</label>
|
||||
@if ($gateway?->isConfigured())
|
||||
<p class="rounded-xl bg-emerald-50 px-3 py-2 text-sm text-emerald-800">Gateway connected ({{ ucfirst($gateway->provider) }}).</p>
|
||||
@else
|
||||
<p class="rounded-xl bg-amber-50 px-3 py-2 text-sm text-amber-800">Online checkouts stay disabled until a gateway is connected.</p>
|
||||
<p class="rounded-xl bg-slate-50 px-3 py-2 text-sm text-slate-700">Ladill Pay remains active. Add valid credentials only if you want direct owner-gateway settlement.</p>
|
||||
@endif
|
||||
@else
|
||||
<div class="rounded-xl border border-indigo-100 bg-indigo-50 px-4 py-3 text-sm text-indigo-900">
|
||||
<p class="font-medium">Your own payment gateway is a Pro feature</p>
|
||||
<p class="mt-1 text-indigo-800/80">Upgrade to Pro or Business to connect Paystack, Flutterwave, or Hubtel and take card / MoMo payments with 0% Ladill fee. Cash sales stay free.</p>
|
||||
<p class="mt-1 text-indigo-800/80">Free uses Ladill Pay automatically. Upgrade to optionally connect Paystack, Flutterwave, or Hubtel.</p>
|
||||
<a href="{{ route('pos.pro.index') }}" class="mt-3 inline-flex text-sm font-semibold text-indigo-700 hover:text-indigo-900">View plans →</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user