Deploy Ladill Merchant / deploy (push) Successful in 44s
Co-authored-by: Cursor <cursoragent@cursor.com>
96 lines
6.2 KiB
PHP
96 lines
6.2 KiB
PHP
<x-user-layout>
|
|
<x-slot name="title">Settings</x-slot>
|
|
|
|
<div class="mx-auto max-w-2xl">
|
|
<h1 class="text-xl font-semibold tracking-tight text-slate-900">Settings</h1>
|
|
<p class="mt-0.5 text-sm text-slate-500">Notification preferences for your payment QRs.</p>
|
|
|
|
@if (session('success'))
|
|
<div class="mt-4 rounded-xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-sm text-emerald-800">{{ session('success') }}</div>
|
|
@endif
|
|
|
|
<form method="POST" action="{{ route('account.settings.update') }}" class="mt-6 space-y-4">
|
|
@csrf
|
|
@method('PUT')
|
|
|
|
<div class="rounded-2xl border border-slate-200 bg-white p-5">
|
|
<h2 class="text-sm font-semibold text-slate-900">Notifications</h2>
|
|
<p class="mt-1 text-xs text-slate-500">Choose what we email you about payments and your account.</p>
|
|
|
|
<div class="mt-4">
|
|
<label for="notify_email" class="block text-[11px] font-medium text-slate-500">Notifications email</label>
|
|
<input type="email" id="notify_email" name="notify_email"
|
|
value="{{ old('notify_email', $settings->notify_email ?? $account->email) }}"
|
|
class="mt-1 w-full rounded-lg border border-slate-200 bg-slate-50 px-3 py-2 text-sm focus:border-indigo-300 focus:bg-white focus:outline-none focus:ring-2 focus:ring-indigo-100">
|
|
@error('notify_email') <p class="mt-1 text-xs text-rose-600">{{ $message }}</p> @enderror
|
|
</div>
|
|
|
|
<label class="mt-4 flex items-center justify-between gap-4">
|
|
<span>
|
|
<span class="block text-sm font-medium text-slate-800">Incoming payments</span>
|
|
<span class="block text-xs text-slate-400">Email when a customer pays via your payment QR.</span>
|
|
</span>
|
|
<input type="checkbox" name="notify_registrations" value="1"
|
|
@checked(old('notify_registrations', $settings->notify_registrations ?? true))
|
|
class="h-5 w-5 rounded border-slate-300 text-indigo-600 focus:ring-indigo-500">
|
|
</label>
|
|
|
|
<label class="mt-4 flex items-center justify-between gap-4">
|
|
<span>
|
|
<span class="block text-sm font-medium text-slate-800">Payouts & settlements</span>
|
|
<span class="block text-xs text-slate-400">Email when takings settle into your wallet.</span>
|
|
</span>
|
|
<input type="checkbox" name="notify_payouts" value="1"
|
|
@checked(old('notify_payouts', $settings->notify_payouts ?? true))
|
|
class="h-5 w-5 rounded border-slate-300 text-indigo-600 focus:ring-indigo-500">
|
|
</label>
|
|
|
|
<label class="mt-4 flex items-center justify-between gap-4">
|
|
<span>
|
|
<span class="block text-sm font-medium text-slate-800">Ladill Merchant updates</span>
|
|
<span class="block text-xs text-slate-400">Occasional emails about new features and improvements.</span>
|
|
</span>
|
|
<input type="checkbox" name="product_updates" value="1"
|
|
@checked(old('product_updates', $settings->product_updates ?? true))
|
|
class="h-5 w-5 rounded border-slate-300 text-indigo-600 focus:ring-indigo-500">
|
|
</label>
|
|
</div>
|
|
|
|
<div class="rounded-2xl border border-slate-200 bg-white p-5 space-y-4">
|
|
<div>
|
|
<h2 class="text-sm font-semibold text-slate-900">Customer payment engine</h2>
|
|
<p class="mt-1 text-xs text-slate-500">Ladill Pay is recommended, zero-config, and selected by default.</p>
|
|
</div>
|
|
<p class="rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-800">Ladill Pay remains the safe fallback and requires no owner keys.</p>
|
|
@if ($canUsePaymentGateway ?? false)
|
|
<select name="gateway_provider" class="w-full rounded-lg border-slate-200 text-sm">
|
|
<option value="">Ladill Pay (recommended)</option>
|
|
<option value="paystack" @selected(old('gateway_provider', $gateway?->is_active ? $gateway?->provider : '') === 'paystack')>My Paystack account</option>
|
|
</select>
|
|
<div class="grid gap-3 sm:grid-cols-2">
|
|
<input name="gateway_public_key" placeholder="{{ $gateway?->public_key ? 'Public key saved — leave blank to keep' : 'pk_live_…' }}" class="rounded-lg border-slate-200 text-sm">
|
|
<input type="password" name="gateway_secret_key" autocomplete="new-password" placeholder="{{ $gateway?->secret_key ? 'Secret saved — leave blank to keep' : 'sk_live_…' }}" class="rounded-lg border-slate-200 text-sm">
|
|
</div>
|
|
<label class="flex items-center gap-2 text-sm text-slate-700">
|
|
<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 ?? false)) class="rounded border-slate-300 text-indigo-600">
|
|
Use my Paystack account
|
|
</label>
|
|
<p class="text-xs text-slate-500">Optional. Invalid or incomplete keys automatically fall back to Ladill Pay.</p>
|
|
@else
|
|
<p class="rounded-lg bg-indigo-50 px-3 py-2 text-sm text-indigo-800">Free uses Ladill Pay only. Pro and higher plans may optionally connect owner Paystack.</p>
|
|
@endif
|
|
</div>
|
|
|
|
<button type="submit" class="btn-primary">
|
|
Save settings
|
|
</button>
|
|
</form>
|
|
|
|
<p class="mt-6 text-xs text-slate-400">
|
|
Profile, password, and security are managed on
|
|
<a href="{{ ladill_account_url('account-settings') }}" class="font-medium text-indigo-600 hover:text-indigo-800">account.ladill.com</a>.
|
|
</p>
|
|
</div>
|
|
</x-user-layout>
|