Drupal module · core + payment domain

Connector Hub

One connection layer for Drupal. Configure a secret and an endpoint once, and let a small plugin handle the one thing that's actually different about each external system: a payment provider today, a CRM or an invoicing network later.

Drupal ^10.3 || ^11.0 phpcs: Drupal + DrupalPractice phpstan level 6 GPL-2.0-or-later

Why a hub at all

Every integration tends to rebuild the same plumbing from scratch. Connector Hub builds that plumbing once, so a new integration is mostly the one part that's genuinely different.

× Without a shared core

Each integration invents its own place to store a secret, its own retry logic for a flaky API, its own webhook route with its own signature check, and its own admin screen to configure it. Five integrations, five slightly different versions of the same problem.

✓ With Connector Hub

A connector endpoint holds the connection: which plugin, which secret (via the Key module, never in configuration), whether it sends, receives, or both. A queue handles delivery and retries. A webhook route handles rate limiting and the path token. The plugin only has to speak the one dialect that system actually uses.

How it's layered

Connector Hub itself stays generic on purpose. Payment is the first domain built on it, not a feature baked into it, which is why it ships as its own module.

Mollie · next Stripe Adyen MultiSafepay Buckaroo CRM ERP PEPPOL
connector_hub_payment
Payment domain: exact amounts, per-operation status, idempotent registration.
shipped
connector_hub
Core: connections, plugins, queued delivery, authenticated webhooks.
shipped

What's actually built

Nothing here is described as finished until it has run inside a real Drupal 11 install, not just read back correctly on the page.

connector_hub shipped

  • Connector endpoint entity: one per connection, multiple accounts per plugin supported
  • Secrets resolved through the Key module only, never stored in configuration
  • Queued outbound delivery with automatic retries and a give-up event
  • Generic webhook route; each plugin verifies its own signature scheme
  • Rate limiting and a secret path token on every inbound call
  • phpcs and phpstan (level 6) clean, Kernel and Functional tests for every auth path

connector_hub_payment shipped

  • Money as integer minor units with an explicit decimal exponent, never a float
  • One record per operation (initiation, capture, cancel, refund), not one per purchase
  • Idempotency key backed by a real database unique constraint, not just a lookup
  • A status-changed event, so fulfillment reacts to a confirmed status, not a webhook alone
  • Read-only admin listing of every payment operation
  • No provider adapter yet: this is the shared domain, not a Mollie or Stripe integration

Roadmap

In order, and open to reshuffling if a real project needs a specific provider sooner.

01

Mollie adapter

A full vertical slice: hosted checkout, a verified status read, refunds, reconciliation.

02

Stripe adapter

Built second on purpose, to prove the contract isn't shaped around Mollie specifically.

03

MultiSafepay and Buckaroo

Two more provider adapters on the same payment contracts.

04

Adyen

With an explicit choice between its Sessions/Drop-in flow and the lower-level API, made once and documented, not assumed.

∞

Beyond payments

CRM, ERP and PEPPOL e-invoicing connectors, built the same way: a small plugin on top of the same core.

Documentation

Each module carries its own README and CONTRIBUTING file in its repository. The short version of both is here.

connector_hub/README.md

Covers the connector endpoint entity, the plugin interface (send(), verifyInboundRequest(), the configuration form hooks), the dispatcher service, and the webhook controller. Includes the exact steps to add a new connector plugin in a separate module.

Admin UI
Configuration › Web services › Connector Hub
Permission
administer connector endpoints
Repository
View project on drupal.org
connector_hub_payment/README.md

Covers Money, PaymentStatus, RemoteReferences, the PaymentOperation entity, and the three small contracts an adapter implements only where it applies: initiating, reading status, and refunding.

Admin UI
Content › Payment operations
Permissions
view payment operations, execute payment refunds
Repository
View project on drupal.org

Contributing

Both modules are open source under GPL-2.0-or-later. Every change follows the same bar, documented in each module's CONTRIBUTING.md.

What every change needs

  • English only: code, comments, commit messages, UI strings
  • Drupal coding standards and DrupalPractice, phpstan at level 6
  • Dependency injection throughout, no service calls from inside a class that could take them as constructor arguments
  • A Kernel or Functional test for new behaviour, positive and negative cases for anything security- or money-related

Local setup

Each module is tested against a real Drupal 11 site via DDEV, not assumed to work from reading the code.

# inside either module's own directory
ddev config --project-type=drupal11 --docroot=web
ddev add-on get ddev/ddev-drupal-contrib
ddev start && ddev poser && ddev symlink-project
# then
ddev phpcs && ddev phpstan analyze . && ddev phpunit web/modules/custom