StregPay

WooCommerce × Stregsystemet — Native Club Payments

Let F-Klub members pay with their stregdollar balance directly at WooCommerce checkout. No redirects, no friction, no third-party processors.

⚡ WooCommerce Gateway ✓ PHP 8.x ▲ WordPress Plugin 🐳 Docker Dev Environment LPW License F-Klub / fklub.dk
↗ Stregsystemet F-Klub →

Pay with your stregdollars.

StregPay is a WooCommerce payment gateway plugin that bridges the F-Klub online store with the club's internal balance system — Stregsystemet. Members check out using the same balance they use at the bar.

💳

Native WooCommerce Gateway

Integrates as a first-class WooCommerce payment method. Members see their balance at checkout and pay in one click — no redirects, no OAuth friction.

⚙️

Stregsystemet API

Talks directly to the stregsystemet backend over its REST API. Deducts balance atomically on purchase confirmation.

🔒

Club-member Gated

Only authenticated F-Klub members with a valid stregdollar balance can use the gateway. Non-members fall back to standard payment methods seamlessly.

🚀

Docker-first Dev Setup

Spin up a full WordPress + WooCommerce + stregsystemet environment in seconds with Docker Compose. Zero host-machine dependencies beyond Docker.

From cart to confirmed — in seconds.

The complete payment lifecycle runs between WooCommerce and the Stregsystemet API without ever leaving the club ecosystem.

01

Member logs in

Authenticates with their F-Klub username at WooCommerce checkout

02

Balance fetched

StregPay queries Stregsystemet API for live stregdollar balance

03

Gateway shown

If balance ≥ order total, StregPay appears as payment option

04

Purchase confirmed

Stregsystemet deducts stregdollars atomically on order placement

05

Order completed

WooCommerce confirms the order; balance is updated in real time

Everything you'd expect. Nothing you don't.

Instant balance check

Live stregdollar balance displayed inline at checkout before the member commits to payment.

🛡️

Atomic transactions

Balance deduction and order confirmation happen together — no partial states or double charges.

🔄

Auto-refund support

WooCommerce refunds return stregdollars directly to the member's account automatically.

📱

Mobile-friendly checkout

Fully responsive payment UI — works flawlessly on every device members use.

🎛️

WP Admin config

Full settings panel in WooCommerce → Settings → Payments. Toggle, configure, and test without touching code.

🐳

Hot-reload dev loop

File watcher auto-builds assets and syncs the plugin to the Docker container on every save.

Tech stack.

StregPay is a standard WordPress plugin. Here's what you need to run it.

🐘
PHP ≥ 8.0
🛒
WooCommerce ≥ 7.x
🔵
WordPress ≥ 6.x
🐳
Docker dev only
📦
Node.js ≥ 18 (build)
🏗️
Stregsystemet API v2.6+

Up and running in 4 commands.

Clone, install, compose, and you're live. The watcher handles everything after that.

1

Install dependencies

Install the Node.js build toolchain used to compile JS and CSS assets.

terminal
npm install
2

Start Docker containers

Spins up WordPress, WooCommerce, MySQL, and a local Stregsystemet instance.

terminal
docker-compose up -d
3

Install the plugin into the container

Copy the plugin files into the running WordPress container and fix permissions.

terminal
docker cp . stregpay-checkout-wordpress-1:/tmp/stregpay-checkout

docker exec stregpay-checkout-wordpress-1 \
  cp -r /tmp/stregpay-checkout/. \
  /var/www/html/wp-content/plugins/stregpay-checkout/

docker exec stregpay-checkout-wordpress-1 \
  chown -R www-data:www-data \
  /var/www/html/wp-content/plugins/stregpay-checkout
4

Open WordPress

Navigate to the local dev site. Activate StregPay from WooCommerce → Settings → Payments.

🌐
Dev URLhttp://localhost:8080

Two ways to work.

Rebuild and sync manually for focused changes, or let the watcher do it automatically as you code.

Manual One-shot update

Rebuild assets, then sync
# 1. Compile JS + CSS
npm run build

# 2. Push to container
sh update-container.sh

Auto File watcher

Watches for changes, auto-syncs
# Starts watcher — Ctrl+C to stop
npm run dev-watch

# ✓ Auto-rebuilds on file change
# ✓ Auto-updates plugin in container
Container sync takes ~3–5 seconds. PHP changes hot-reload via the watcher; no restart needed.

Container cheatsheet.

Start containers docker-compose up -d
Stop containers docker-compose down
View logs docker-compose logs -f
Restart containers docker-compose restart
Admin shell docker exec -u root …
WP CLI docker exec … wp …

Something not working?

👁️
Plugin not showing in WooCommerce? Re-run the install step from Quick Start — the copy command needs to run again after the container restarts.
🔄
Changes not reflecting in the browser? Clear your browser cache and flush WooCommerce transients from WooCommerce → System Status → Tools.
🔑
Permission errors on container copy? Use docker exec -u root for administrative commands that need to write outside www-data scope.
ℹ️
PHP vs JS changes PHP changes: the watcher handles re-copy automatically. JavaScript and CSS changes always require a rebuild (npm run build) first.