Use platform Paystack email and Figtree on Mini payment pages.
Deploy Ladill Mini / deploy (push) Successful in 1m11s
Deploy Ladill Mini / deploy (push) Successful in 1m11s
Route Paystack receipts to pay@ladill.com instead of vendor emails, and load Figtree on the public payment and confirmation screens. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -33,13 +33,7 @@ class MiniPaymentService
|
||||
throw new RuntimeException('Enter an amount greater than zero.');
|
||||
}
|
||||
|
||||
$qrCode->loadMissing('user.qrSetting');
|
||||
$merchant = $qrCode->user;
|
||||
$email = trim((string) ($merchant?->qrSetting?->notify_email ?: $merchant?->email));
|
||||
if ($email === '' || ! str_contains($email, '@')) {
|
||||
throw new RuntimeException('This payment QR is not ready yet — the vendor must add an email in Ladill Mini settings.');
|
||||
}
|
||||
|
||||
$qrCode->loadMissing('user');
|
||||
$amountMinor = (int) round($amountGhs * 100);
|
||||
$reference = 'MINP-'.strtoupper(Str::random(16));
|
||||
$payRef = 'MIN-'.strtoupper(Str::random(16));
|
||||
@@ -59,7 +53,7 @@ class MiniPaymentService
|
||||
]);
|
||||
|
||||
$paystackData = $this->paystack->initializeTransaction([
|
||||
'email' => $email,
|
||||
'email' => (string) config('services.paystack.checkout_email', 'pay@ladill.com'),
|
||||
'amount' => $amountMinor,
|
||||
'currency' => $payment->currency,
|
||||
'reference' => $payRef,
|
||||
|
||||
@@ -62,6 +62,7 @@ return [
|
||||
'public_key' => env('PAYSTACK_PUBLIC_KEY'),
|
||||
'secret_key' => env('PAYSTACK_SECRET_KEY'),
|
||||
'webhook_secret' => env('PAYSTACK_WEBHOOK_SECRET', env('PAYSTACK_SECRET_KEY')),
|
||||
'checkout_email' => env('PAYSTACK_CHECKOUT_EMAIL', 'pay@ladill.com'),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Payment confirmed</title>
|
||||
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600,700&display=swap" rel="stylesheet" />
|
||||
@vite(['resources/css/app.css'])
|
||||
</head>
|
||||
<body class="min-h-screen bg-emerald-50/40">
|
||||
<body class="min-h-screen bg-emerald-50/40 font-sans antialiased">
|
||||
<main class="mx-auto flex min-h-screen max-w-md flex-col justify-center px-4 py-10 text-center">
|
||||
<div class="rounded-3xl border border-emerald-100 bg-white p-8 shadow-sm">
|
||||
<div class="mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-emerald-100 text-emerald-600">
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<meta name="csrf-token" content="{{ $csrf }}">
|
||||
<title>Pay {{ $businessName }}</title>
|
||||
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600,700&display=swap" rel="stylesheet" />
|
||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||
</head>
|
||||
<body class="min-h-screen bg-slate-50 text-slate-900"
|
||||
<body class="min-h-screen bg-slate-50 font-sans text-slate-900 antialiased"
|
||||
x-data="{
|
||||
amount: @js(old('amount')),
|
||||
loading: false,
|
||||
|
||||
Reference in New Issue
Block a user