Complete Ladill Pay payouts UI for Events.
Deploy Ladill Events / deploy (push) Successful in 38s

Show per-event payment history with fees and net amounts, and let organizers manage payout accounts and withdrawals without leaving the app.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-04 12:06:43 +00:00
co-authored by Cursor
parent 0aafb14836
commit d25682bc6c
7 changed files with 594 additions and 11 deletions
+23
View File
@@ -55,6 +55,29 @@ class QrEventRegistration extends Model
return round($this->amount_minor / 100, 2);
}
public function platformFeeMinor(): int
{
$metadata = (array) ($this->metadata ?? []);
if (isset($metadata['ladill_pay']['platform_fee_minor'])) {
return (int) $metadata['ladill_pay']['platform_fee_minor'];
}
if (isset($metadata['platform_fee_ghs'])) {
return (int) round((float) $metadata['platform_fee_ghs'] * 100);
}
$mode = $this->qrCode?->content()['mode'] ?? 'ticketing';
$rate = $mode === 'contributions' ? 0.035 : 0.055;
return (int) round($this->amount_minor * $rate);
}
public function netAmountMinor(): int
{
return max(0, $this->amount_minor - $this->platformFeeMinor());
}
public function isPaid(): bool
{
return $this->amount_minor > 0;