Polish Give UX: always-on online giving, correct mobile branding, clearer payouts.
Deploy Ladill Give / deploy (push) Successful in 31s

Remove the redundant accepts-payment toggle, fix the mobile header title, and update payout copy to reflect Ladill Pay and the 9% donation fee.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-09 09:30:39 +00:00
co-authored by Cursor
parent 3eb41fe08e
commit 8edafc5966
11 changed files with 12 additions and 53 deletions
@@ -65,7 +65,6 @@ class GivingPageController extends Controller
'brand_color' => ['nullable', 'string', 'max:20'],
'collection_types' => ['nullable', 'array', 'min:1'],
'collection_types.*' => ['string', 'max:80'],
'accepts_payment' => ['nullable', 'boolean'],
'church_logo' => ['nullable', 'image', 'mimes:jpeg,jpg,png,gif,webp', 'max:4096'],
'church_cover' => ['nullable', 'image', 'mimes:jpeg,jpg,png,gif,webp', 'max:8192'],
]);
@@ -73,7 +72,7 @@ class GivingPageController extends Controller
$data = array_merge($request->all(), [
'type' => QrCode::TYPE_CHURCH,
'currency' => 'GHS',
'accepts_payment' => $request->boolean('accepts_payment'),
'accepts_payment' => true,
'church_logo' => $request->file('church_logo'),
'church_cover' => $request->file('church_cover'),
]);
@@ -115,14 +114,13 @@ class GivingPageController extends Controller
'brand_color' => ['nullable', 'string', 'max:20'],
'collection_types' => ['nullable', 'array', 'min:1'],
'collection_types.*' => ['string', 'max:80'],
'accepts_payment' => ['nullable', 'boolean'],
'is_active' => ['sometimes', 'boolean'],
'church_logo' => ['nullable', 'image', 'mimes:jpeg,jpg,png,gif,webp', 'max:4096'],
'church_cover' => ['nullable', 'image', 'mimes:jpeg,jpg,png,gif,webp', 'max:8192'],
]);
$data = array_merge($request->all(), [
'accepts_payment' => $request->boolean('accepts_payment', (bool) ($givingPage->content()['accepts_payment'] ?? false)),
'accepts_payment' => true,
'is_active' => $request->boolean('is_active', $givingPage->is_active),
'church_logo' => $request->file('church_logo'),
'church_cover' => $request->file('church_cover'),
@@ -27,10 +27,6 @@ class DonationController extends Controller
return response()->json(['error' => 'This giving page does not accept donations.'], 422);
}
if (empty($qrCode->content()['accepts_payment'])) {
return response()->json(['error' => 'Online giving is not enabled for this page.'], 422);
}
$validated = $request->validate([
'customer_name' => ['required', 'string', 'max:120'],
'customer_email' => ['required', 'email', 'max:200'],
@@ -30,10 +30,6 @@ class GiveDonationService
throw new RuntimeException('This QR is not a giving page.');
}
if (empty($qrCode->content()['accepts_payment'])) {
throw new RuntimeException('Online giving is not enabled for this page.');
}
$items = $data['items'] ?? [];
if (empty($items)) {
throw new RuntimeException('Enter an amount to give.');
+1 -1
View File
@@ -188,7 +188,7 @@ class QrPayloadValidator
'logo_path' => $input['logo_path'] ?? null,
'cover_path' => $input['cover_path'] ?? null,
'org_type' => $orgType,
'accepts_payment' => filter_var($input['accepts_payment'] ?? false, FILTER_VALIDATE_BOOL),
'accepts_payment' => true,
'currency' => 'GHS',
'collection_types' => $collectionTypes,
],