Search by

schmidtwebmedia / sepa-donate

schmidtwebmedia

TYPO3 extension for SEPA donations with EPC GiroCode QR generation

Package info

github.com/SchmidtWebmedia/sepa-donate

Type:typo3-cms-extension

pkg:composer/schmidtwebmedia/sepa-donate

Statistics

Installs: 11

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-12-02 06:48 UTC

This package is auto-updated.

Last update: 2026-12-02 06:58:53 UTC


README

TYPO3 13 TYPO3 14

Latest Stable Version Monthly Downloads

Buy Me A Coffee

TYPO3 extension for integrating a SEPA donation form with EPC GiroCode QR code generation.

SEPA Donate provides a lightweight donation flow directly inside TYPO3. Visitors prepare a SEPA bank transfer by selecting a donation amount, optionally entering their details for a donation receipt and scanning the generated EPC GiroCode with their banking app. No external payment provider is required.

Features

  • EPC GiroCode generation for SEPA bank transfers that can be scanned with compatible banking apps.
  • Predefined donation amounts configurable through TYPO3 Site Settings.
  • Individual donation amounts entered directly by the visitor.
  • Unique payment purpose generated for every prepared donation to make incoming transfers easier to identify.
  • Optional donation receipt details including name, address and email address.
  • Independent operator and donor emails, with separate delivery status and targeted retries when storage is enabled.
  • Optional announcement storage and a TYPO3 backend module for documenting incoming payments, receipt dispatch, CSV export and scheduled cleanup.
  • TYPO3 Site Set integration for account and extension configuration.
  • Multi-site support with configuration resolved from the current TYPO3 site.
  • Subdirectory support by deriving the endpoint from the TYPO3 Site Base.
  • Customizable Fluid templates so the form can be fully integrated into the design of a SitePackage.
  • Stable data-sepa-* JavaScript hooks, allowing CSS classes and IDs to be changed in template overrides without breaking the frontend logic.
  • Multiple donation forms per page supported by the JavaScript integration.
  • Built-in spam prevention without Captcha or external services, including a hidden trap field, request rate limiting and short-lived single-use form tokens.
  • Same-origin protection for browser requests when an Origin header is available.
  • No payment provider or bank API required. The payment itself remains a normal SEPA transfer performed in the donor's banking application.
  • No external spam-protection service or additional frontend framework required.

The extension deliberately does not process payments itself and does not verify incoming transfers. Generating a GiroCode means that a transfer has been prepared, not that a donation has been received.

Requirements

  • TYPO3 13 LTS or TYPO3 14
  • Composer-based TYPO3 installation

Integration

1. Installation

Install the extension via Composer:

composer require schmidtwebmedia/sepa-donate

After installation, clear the TYPO3 caches if necessary.

2. Add the Site Set

The extension provides the TYPO3 Site Set:

schmidtwebmedia/sepa-donate

Add SEPA Donate as a dependency to the Site Set used by your site. This loads the required TypoScript and makes the SEPA Donate site settings available.

3. Configure the Site Settings

Configure the following settings for your TYPO3 site:

Setting Type Default Description Example
sepaDonate.iban string empty Required account IBAN DE89370400440532013000
sepaDonate.bic string empty Bank BIC COBADEFFXXX
sepaDonate.recipient string empty Required payment recipient Musterverein e.V.
sepaDonate.buttonBarAmounts string empty Comma-separated preset euros. Falls back to 10, 25, 50 and 100. 10,25,50,100
sepaDonate.form.emailMode string receipt receipt, optional or required. Requesting a receipt always requires an email. optional
sepaDonate.form.receiptEnabled bool true Offer the receipt request and address fields. false
sepaDonate.form.privacyLink string empty TYPO3 page link or HTTP(S) URL for the privacy notice. t3://page?uid=42
sepaDonate.mail.operatorEnabled bool true Send operator notifications when a recipient is configured. false
sepaDonate.mail.to string empty Recipient of operator notifications. vorstand@example.org
sepaDonate.mail.donorEnabled bool false Send transfer information when the donor provides an email. Independent of operator mail and email requirements. true
sepaDonate.mail.fromAddress string empty Sender address. Empty uses TYPO3's default address. donations@example.org
sepaDonate.mail.fromName string empty Sender name. Empty uses TYPO3's default name. Musterverein
sepaDonate.mail.replyTo string empty Optional reply address. office@example.org
sepaDonate.storage.enabled bool false Save new announcements. Requires a positive storage PID. true
sepaDonate.storage.pid int 0 Storage page UID within the current site. 73
sepaDonate.storage.retentionDays int 0 Days to retain unconfirmed announcements. Zero disables cleanup. A positive value requires a storage PID. 90

4. Add the Donation Form

Create a new content element on the page where the donation form should be displayed and select the plugin:

SEPA Donate — Donation form

The plugin renders the donation form and automatically includes the JavaScript and functional CSS required by the extension.

Visitors can select one of the configured donation amounts or enter an individual amount. They can optionally request a donation receipt and provide the required contact details. After submitting the form, an EPC GiroCode is generated containing the configured account, donation amount and unique payment purpose.

5. Notification Emails

Operator mail is sent when sepaDonate.mail.operatorEnabled is on and sepaDonate.mail.to is set. It contains the announced amount, reference, and supplied contact details. Donor mail is controlled independently by sepaDonate.mail.donorEnabled and needs a supplied email address. It contains the transfer instructions and asks the donor to complete the transfer with their bank.

The donor uses the language of the submitted form. The operator uses the site's default language at submission. Both locales are saved with stored announcements and reused on retries. The operator address and sender settings come from the current site configuration. Empty sender and Reply-To overrides fall back to TYPO3's mail configuration.

Override Notification/DonationNotification.txt or Donor/TransferInformation.txt using a higher numbered $GLOBALS['TYPO3_CONF_VARS']['MAIL']['templateRootPaths'] entry. The plain text templates receive translated lines, the selected locale and transfer data including amount, purpose, recipient, iban and address.

Each channel is handled separately. Mail errors are logged without contact details and the transfer details are still returned. Stored announcements track pending, sending, sent, failed, limited or disabled independently for each channel. A failed channel can be retried individually. Automatic repeats of the form operation do not resend mail. If a process stops while sending, the sending state is retained because transport acceptance may be unknown. Mail transport acceptance does not guarantee inbox delivery. Without storage, there are no delivery records or manual retries. Replay and recipient limits use TYPO3's hash cache and locking. Multi-node installations need a shared cache and locking strategy for those limits to apply across nodes.

When storage is disabled, enable operator mail to forward receipt requests to the operator. If mail fails and storage is disabled, the operator has no record to retry.

Public submissions initiate at most one donor mail attempt per recipient address per hour for the TYPO3 installation. Authorized manual retries of failed mails do not use this quota.

6. Templates and Styling

The extension contains the complete functional frontend, but its appearance is intentionally designed to be adapted by the integrating SitePackage.

The default template is located at:

EXT:sepa_donate/Resources/Private/Templates/Donation/Form.html

Custom template paths can be configured in the SitePackage, for example:

plugin.tx_sepadonate {
    view {
        templateRootPaths.10 = EXT:site_package/Resources/Private/Templates/SepaDonate/
        partialRootPaths.10 = EXT:site_package/Resources/Private/Partials/SepaDonate/
        layoutRootPaths.10 = EXT:site_package/Resources/Private/Layouts/SepaDonate/
    }
}

Optional base theme

The extension includes a responsive base theme with styled amount buttons, form fields, receipt details, transfer results and visible keyboard focus. It inherits the website's font.

To enable it in TYPO3 13 or 14:

  1. Open Site Management → Sites and edit the relevant site.
  2. Add SEPA Donate — Base theme (optional) under Sets for this Site (German label SEPA Donate — Basis-Theme (optional)).
  3. Save the site and clear frontend caches.

The set identifier is schmidtwebmedia/sepa-donate-base-theme. It depends on the main SEPA Donate set and loads Resources/Public/Css/base_theme.css through TypoScript. Adding the main set alone keeps the form's existing functional styling. Remove the base theme set to disable the additional styling.

The theme targets the default template's CSS classes inside .donation-form. Custom template overrides need to preserve those classes to use this theme. The JavaScript hooks continue to work independently of these classes.

Adapt the theme in a stylesheet loaded after it, for example:

.donation-form {
    --sepa-accent: #166534;
    --sepa-accent-hover: #14532d;
    --sepa-on-accent: #fff;
    --sepa-radius: 0.75rem;
}

Further variables are --sepa-text, --sepa-muted, --sepa-border, --sepa-surface, --sepa-surface-soft and --sepa-error. Choose accessible text and background combinations when changing colors.

Template contract

CSS classes and HTML IDs are not part of the JavaScript API and can be changed freely when overriding the template.

The controller provides the following template variables from the current TYPO3 site settings:

Variable Content
{amounts} List of configured donation amounts
{donationSettings.recipient} Name of the payment recipient
{donationSettings.iban} IBAN of the donation account
{endpointPath} Site-aware QR-code endpoint path
{formToken} Short-lived form token
{receiptEnabled} Whether to offer a receipt
{emailMode} Email field mode
{privacyLink} Validated TYPO3 page link or HTTP(S) URL

Payment details and predefined amounts are read directly from the current site. The QR-code endpoint uses the same configuration provider, ensuring that displayed payment details and generated GiroCodes cannot diverge.

The data-sepa-* attributes are the stable hooks used by the extension JavaScript and must be preserved. Use email for the shared email address. Keep the address[...], formToken and company input names and the existing receipt toggle hook.

This separation allows the HTML structure and visual styling to be adapted extensively without coupling the JavaScript behavior to project-specific CSS classes.

The CSS shipped by the extension contains only the functional behavior required by the form. Use the optional base theme below or provide project-specific styling in the SitePackage.

7. Spam Prevention

The public QR-code endpoint includes several lightweight protection mechanisms without requiring a Captcha or an external service:

  • a hidden trap field for generic form bots,
  • one request per TYPO3 site and IP address within 60 seconds,
  • a cryptographically random form token generated when the form is rendered,
  • a minimum token age of 2 seconds,
  • a token lifetime of 30 minutes,
  • one operation per token, with identical retries returning the same transfer details,
  • same-origin validation when the browser sends an Origin header.

These measures are intended to reduce automated endpoint and notification-mail abuse while keeping the donation flow frictionless for visitors.

8. How It Works

The form posts to the endpoint under the current site language base. This includes sites and languages hosted in subdirectories. TYPO3 resolves the site before the endpoint validates the donation data and form token. For a new announcement, the endpoint generates the transfer details and, when enabled, stores the announcement before attempting either email. The browser then displays the GiroCode and reference.

The generated payment reference is stored in the GiroCode as unstructured remittance information. The donor completes the transfer through their bank.

Form settings and existing overrides

The default form offers one email field. In receipt mode it is shown only for a receipt. In optional and required mode it is always shown. A receipt request requires all five address fields and an email. Turning off receipts hides the choice and ignores submitted address data. The optional privacy notice is a link, without a mandatory checkbox.

If you override the form, start from the current default to include receiptEnabled, emailMode, privacyLink, the shared input named email inside data-sepa-email-field, the formUnavailable flag and the accessible error region. The controller provides localized JavaScript messages for both the default template and existing overrides. Keep the existing hooks. The endpoint still accepts address[email] for a requested receipt, so older overrides remain compatible with the default mode. Keep address inputs inside data-sepa-receipt-address. Each instance receives a fresh token through the non-cacheable plugin.

Store donation announcements

Before enabling storage, apply the extension schema through Admin Tools → Maintenance → Analyze Database Structure. Create a system folder (UID greater than zero) inside the current site, set its UID as sepaDonate.storage.pid and enable sepaDonate.storage.enabled. A missing folder or one belonging to another site prevents creation. The extension stores validated contact data, transfer details and status fields. Amounts are stored as integer cents and the endpoint returns amount as a decimal string. IP addresses are used for throttling and are never included in the announcement record.

With the same site settings, an identical retry within 30 minutes reuses the transfer details and payment reference. Changing contact data or amount requires a new form token. Reload the page to start another announcement. The regular per-site/IP interval still applies to new announcements. When storage is disabled, the flow uses the TYPO3 hash cache to replay transfer details temporarily, and no announcement row is written.

Manage announcements in TYPO3

Open Web → Donation announcements (TYPO3 13) or Content → Donation announcements (TYPO3 14) in the live workspace. Grant the module and read access to the Donation announcements table. Grant table write access and the storage folder's Edit content page permission for changes. Editors need the folder in their web mounts and permission to show it. The module verifies that the storage folder and the stored site agree. Keep existing folders in their original site, including when storage is turned off or a new folder is configured.

Search by reference, name or email. Filter by site, announcement date (UTC), payment status and receipt status. Open a reference for the contact and transfer details. Mark an incoming payment with its date after checking it with the bank. The payment confirmation can be undone. For requested receipts, record dispatch separately after the payment is marked received. The extension does not generate or send a tax receipt.

A failed operator or donor mail can be retried from the detail view if its channel is enabled. Delete uses TYPO3 DataHandler and marks the record as deleted (soft delete).

Export and remove expired records

Use Export filtered announcements as CSV in the module after applying filters. The download contains the authorized rows in the same order as the list. It uses UTF-8 with a BOM, comma delimiters, UTC ISO 8601 timestamps, ISO dates and decimal euros with a separate currency column. Headers and statuses use the backend user's language. Values that could be interpreted as spreadsheet formulas are prefixed with an apostrophe.

Set sepaDonate.storage.retentionDays per site to enable cleanup. The default 0 disables it. Choose a duration that fits your organization's requirements. Preview and run with the extension's TYPO3 command:

vendor/bin/typo3 sepa-donate:cleanup --site example --dry-run
vendor/bin/typo3 sepa-donate:cleanup --site example
vendor/bin/typo3 sepa-donate:cleanup

Without --site, the command checks all sites. In TYPO3 Scheduler, create an Execute console commands task for sepa-donate:cleanup and set the desired interval. Cleanup can continue after new storage is disabled. A valid configured folder is required to enable cleanup, and records in older folders are included if the folders still belong to the same site.

The module's Delete action uses TYPO3 soft delete. The data remains in the database. The command physically removes announcements older than the configured duration that have neither a confirmed payment nor a recorded receipt dispatch, including eligible soft-deleted rows. This removes contact data and the associated reference, operation ID, payload fingerprint, locales and mail states. Confirmed payments are outside this cleanup even if soft-deleted. Mailboxes and backups are managed separately.

Complete site settings example

In config/sites/example/settings.yaml use the structure below. Replace the example bank details, addresses and page UIDs before enabling the form. Apply the database schema after updating the extension, including when updating an installation that previously ran without storage.

sepaDonate:
  iban: DE89370400440532013000
  bic: COBADEFFXXX
  recipient: Example Association
  buttonBarAmounts: '10,25,50,100'
  form:
    emailMode: optional
    receiptEnabled: true
    privacyLink: 't3://page?uid=42'
  mail:
    operatorEnabled: true
    to: office@example.org
    donorEnabled: true
    fromAddress: donations@example.org
    fromName: Example Association
    replyTo: office@example.org
  storage:
    enabled: true
    pid: 73
    retentionDays: 0

Languages and translation overrides

The English source labels are in Resources/Private/Language/locallang.xlf. The complete German translation is in de.locallang.xlf in the same directory. TYPO3 uses the active site language for the form and JavaScript, and the authenticated user's language for backend views and CSV. Missing translations fall back to English. Donor and operator emails use the locales described in the mail section. The command uses English at the CLI and TYPO3's active backend user language when available.

Override labels from your site package using TYPO3's XLIFF override configuration. For example, add this to the site package's ext_localconf.php and provide corresponding XLIFF files for the languages you override:

$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']
    ['EXT:sepa_donate/Resources/Private/Language/locallang.xlf'][]
    = 'EXT:site_package/Resources/Private/Language/SepaDonate/locallang.xlf';

Keep the same translation IDs and placeholders. Clear TYPO3 caches after changing translations. Template overrides can use the same keys through Fluid's f:translate view helper. The public endpoint returns language independent codes in error; JavaScript displays the corresponding translated message supplied by TYPO3.

Development checks

Run the PHP unit scripts and the simulated browser tests:

for test in Tests/*Test.php; do php "$test" || exit; done
node --check Resources/Public/JavaScript/sepa_donate.js
node Tests/FormJavaScriptTest.js

For integration tests, pass a local TYPO3 Composer project with the extension installed as a dependency and a PHP executable with PDO SQLite. The runner copies the dependency tree and creates a disposable project and SQLite database. It records emails locally with a test transport.

PHP_BIN=php8.4 bash Tests/Integration/run.sh /path/to/typo3-project

License

GPL-2.0-or-later

Configuration validation and database updates

IBAN values are normalized to uppercase without whitespace and checked for the country-specific format and checksum. An optional BIC must contain 8 or 11 valid characters. Invalid bank settings prevent preparing a transfer. The normalized values are used in the form, database and emails.

Internal privacy links accept a page UID or a TYPO3 page link with an optional section anchor, for example t3://page?uid=42#c123.

If the announcement table or required columns are missing, the backend module displays an update notice. Apply the extension schema using TYPO3's database comparison, then reload the module. Local development setups that link individual extension files must include ext_tables.sql when refreshing the checkout.

For the existing .Build/13 and .Build/14 development installations, refresh the SQL links before running TYPO3's database comparison:

bash Tests/Integration/refresh-local-schema.sh

Install the updated Composer requirements before deploying this version. Bank account validation uses symfony/validator.