Make guest landing-page checkouts email-optional like Ladill Mini.
Deploy Ladill Merchant / deploy (push) Successful in 59s
Deploy Ladill Merchant / deploy (push) Successful in 59s
Drop required buyer email on public merchant forms; require phone for bookings so merchants can reach guests without Ladill accounts. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -42,8 +42,8 @@ class BookingController extends Controller
|
||||
|
||||
$validated = $request->validate([
|
||||
'customer_name' => ['required', 'string', 'max:120'],
|
||||
'customer_email' => ['required', 'email', 'max:200'],
|
||||
'customer_phone' => ['nullable', 'string', 'max:30'],
|
||||
'customer_email' => ['nullable', 'email', 'max:200'],
|
||||
'customer_phone' => ['required', 'string', 'max:30'],
|
||||
'service_index' => ['required', 'integer', 'min:0'],
|
||||
'starts_at' => ['required', 'date'],
|
||||
]);
|
||||
|
||||
@@ -34,7 +34,7 @@ class SaleOrderController extends Controller
|
||||
|
||||
$validated = $request->validate([
|
||||
'customer_name' => ['required', 'string', 'max:120'],
|
||||
'customer_email' => ['required', 'email', 'max:200'],
|
||||
'customer_email' => ['nullable', 'email', 'max:200'],
|
||||
'customer_phone' => ['required', 'string', 'max:30'],
|
||||
'shipping_fee' => ['nullable', 'numeric', 'min:0', 'max:10000'],
|
||||
'items' => ['required', 'array', 'min:1'],
|
||||
|
||||
@@ -56,7 +56,7 @@ class MerchantSaleService
|
||||
'amount_minor' => $amountMinor,
|
||||
'currency' => $qrCode->content()['currency'] ?? 'GHS',
|
||||
'payer_name' => trim((string) ($data['customer_name'] ?? '')),
|
||||
'payer_email' => trim((string) ($data['customer_email'] ?? '')),
|
||||
'payer_email' => ($email = trim((string) ($data['customer_email'] ?? ''))) !== '' ? $email : null,
|
||||
'payer_phone' => trim((string) ($data['customer_phone'] ?? '')),
|
||||
'status' => QrSaleOrder::STATUS_PENDING,
|
||||
'payment_reference' => null,
|
||||
|
||||
Reference in New Issue
Block a user