Files
crosscode-platform/apps/events/frontend/src/content/help/site-settings.tsx
T
joshuaandClaude Opus 5.5 228719ef96 PayFast provider, Pay online page, amount checks on payments
- PayFast (custom integration): signed form (PHP-style encoding, checked
  against a real sandbox), ITN checks (signature over all posted fields,
  PayFast host, VALID from /eng/query/validate, amount vs checkout).
- ProviderCheckout records every checkout (amount, metadata, request);
  webhooks match payments to it and hold a different amount for review
  (ProviderTransaction.note).
- /pay/<id>: payers choose a provider when several are on, and the
  browser posts PayFast's form from there, so payment links work for
  every provider.
- Site settings → Payments: PayFast card (merchant ID/key, encrypted
  passphrase, sandbox/live) while PayFast is enabled.
- Payer-facing wording no longer names Yoco; legal pages name both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 14:25:49 +02:00

144 lines
7.2 KiB
TypeScript

import React from "react";
import { Building2, Palette, Bell, Mail, Scale, MessageCircle, LayoutDashboard, Timer, Play, CreditCard, ArrowUpDown, KeyRound } from "lucide-react";
import { GuideItem } from "@/components/shared/GuideItem";
import type { HelpContent } from "./types";
/** Help content for Site Settings (/dashboard/admin/settings). */
export const siteSettingsHelpContent: HelpContent = {
title: "Site Settings help",
subtitle: "Configure your organisation, branding, email, WhatsApp, payments, and legal pages.",
quickLinks: [
{ label: "Back to Admin dashboard", href: "/dashboard/admin", icon: LayoutDashboard },
],
tabs: [
{
key: "organisation",
label: "Organisation",
icon: Building2,
content: (
<div className="space-y-4">
<p>Your organisation&apos;s name, tagline, and contact details.</p>
<div className="space-y-4">
<GuideItem icon={Building2} title="Contact email, phone, and address" tone="brand">
These feed the public Contact page directly — update them here and the Contact page updates automatically.
</GuideItem>
<GuideItem icon={Building2} title="Site URL" tone="gray">
The public URL of this site, used in email links like password resets and ticket delivery.
</GuideItem>
<GuideItem icon={Building2} title="Google Search Console verification" tone="gray">
Proves to Google that you own this site, so you can see search traffic and submit <code>/sitemap.xml</code> in Search Console. Add the site there as a URL-prefix property (e.g. <code>https://events.yourchurch.org/</code>), pick the <strong>HTML tag</strong> method, paste the tag here and save, then click Verify. Each site has its own code. Google finds your events without this; it only unlocks the Search Console reports.
</GuideItem>
</div>
</div>
),
},
{
key: "branding",
label: "Branding",
icon: Palette,
content: (
<div className="space-y-4">
<p>Your logo and accent color.</p>
<GuideItem icon={Palette} title="Accent color" tone="violet">
This only recolors the organisation name next to the logo in the top navigation bar. Every other button, link, and highlight across the site uses a fixed color scheme by design — changing this setting won&apos;t change anything else.
</GuideItem>
</div>
),
},
{
key: "notifications",
label: "Notifications",
icon: Bell,
content: (
<div className="space-y-4">
<p>The email address(es) that get notified whenever someone registers for an event — separate multiple addresses with commas.</p>
</div>
),
},
{
key: "email",
label: "Email",
icon: Mail,
content: (
<div className="space-y-4">
<p>Outgoing SMTP settings used for tickets, payment confirmations, and account emails.</p>
<GuideItem icon={Mail} title="Leave blank for defaults" tone="gray">
If left blank, the server falls back to its own environment configuration. The SMTP password is stored encrypted.
</GuideItem>
</div>
),
},
{
key: "legal",
label: "Legal",
icon: Scale,
content: (
<div className="space-y-4">
<p>Details used to populate the site&apos;s Privacy Policy and Terms pages — operator name, information officer details, website URL, and effective date.</p>
</div>
),
},
{
key: "whatsapp",
label: "WhatsApp",
icon: MessageCircle,
content: (
<div className="space-y-4">
<p>Connects the site to a WhatsApp number (via WAWP) for sending tickets and notifications.</p>
<div className="space-y-4">
<GuideItem icon={MessageCircle} title="Three-step setup" tone="brand">
Enter your WAWP access token, set up a session instance (create new or enter an existing one), then scan the QR code (or use a phone pairing code) to link a WhatsApp number.
</GuideItem>
<GuideItem icon={MessageCircle} title="Session status" tone="green">
Once connected, the status card shows live connection health and auto-refreshes while reconnecting. If it fails, the system attempts to auto-recover and emails an admin alert if that doesn&apos;t work.
</GuideItem>
</div>
</div>
),
},
{
key: "payments",
label: "Payments",
icon: CreditCard,
content: (
<div className="space-y-4">
<p>Online payments: which providers people can pay with, and each provider&apos;s settings.</p>
<div className="space-y-4">
<GuideItem icon={ArrowUpDown} title="Providers and order" tone="brand">
Tick a provider to let people pay with it, and use the arrows to set the order. The first provider that&apos;s ticked and set up is the default. If none is, online payments are off and people pay at the door.
</GuideItem>
<GuideItem icon={KeyRound} title="Yoco" tone="green">
Shown while Yoco is ticked. Paste the secret key, then generate the webhook (or enter its secret) so payments are confirmed automatically. Secrets are stored encrypted and never shown in full.
</GuideItem>
<GuideItem icon={KeyRound} title="PayFast" tone="green">
Shown while PayFast is ticked. Enter the merchant ID, merchant key and salt passphrase from your PayFast dashboard (Settings), and choose Sandbox to test or Live for real payments. The passphrase must match the dashboard exactly. When more than one provider is ticked, payers choose how to pay.
</GuideItem>
<GuideItem icon={CreditCard} title="Minimum and fees" tone="gray">
Online payments must be at least R15. Payments are recorded at the full amount paid; provider fees aren&apos;t deducted or added to the payer&apos;s total — deal with them at cashup.
</GuideItem>
</div>
</div>
),
},
{
key: "jobs",
label: "Background jobs",
icon: Timer,
content: (
<div className="space-y-4">
<p>Tasks the server runs on a schedule: the daily summary email, waitlist offers, feedback forms, session reminders and certificates, consent reminders, analytics, the nightly backup and temp-file cleanup.</p>
<div className="space-y-4">
<GuideItem icon={Timer} title="Schedule and history" tone="brand">
Each job shows when it runs and when it runs next. Click a job&apos;s last result to see its last 10 runs — when they started and finished, and what they did (or the error). A failed run is retried twice.
</GuideItem>
<GuideItem icon={Play} title="Run now" tone="green">
Runs a job straight away, e.g. to send a feedback form without waiting. It&apos;s recorded in the audit log.
</GuideItem>
</div>
<p className="text-xs text-gray-500">Jobs run once per schedule even when more than one server process is running. Schedules and on/off switches are set by the server&apos;s environment variables.</p>
</div>
),
},
],
};