WP Manifestindependent plugin directory
manifest / ecommerce / stregsystem-payment-gateway

Stregpay Checkout

Stregsystem Payment gateway for WooCommerce / Wordpress

by The WordPress Contributors · github.com/f-klubben/stregsystem-payment-gateway · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/f-klubben/stregsystem-payment-gateway/archive/refs/heads/main.zip


████ ████ ████ ████
 ██   ██   ██   ██
  ╲━━━━━━━━━━━━╱
     StregPay

StregPay

WooCommerce Payment Gateway for F-Klub's Stregdollar System

Let members pay with their club balance — directly at checkout.



Stregsystemet →  ·  F-Klub →  ·  Report a Bug →



What is StregPay?

StregPay is a native WooCommerce payment gateway plugin that connects F-Klub's online store to Stregsystemet — the club's internal credit (stregdollar) system. Members can pay for purchases using the same balance they use at the bar, without ever leaving the checkout page.

No redirects. No third-party processors. Just stregdollars.

  Member at checkout
        │
        ▼
  StregPay queries Stregsystemet API
        │
        ├── Balance ≥ order total? → Show StregPay as payment option
        │
        ▼
  Member confirms payment
        │
        ▼
  Stregsystemet deducts balance atomically
        │
        ▼
  WooCommerce order confirmed ✓

Features

Feature Description
Live balance display Member's stregdollar balance shown inline at checkout before committing
🛡️ Atomic transactions Balance deduction and order confirmation happen together — no partial states
🔄 Auto-refund support Refunds return stregdollars directly to the member's account
🎛️ WP Admin config Full settings panel in WooCommerce → Settings → Payments
🔒 Member-gated Only members with sufficient balance can use the gateway
🐳 Hot-reload dev loop File watcher auto-builds and syncs to Docker on every save

Requirements

Dependency Version
PHP ≥ 8.0
WordPress ≥ 6.x
WooCommerce ≥ 7.x
Stregsystemet API ≥ v2.6
Node.js (build only) ≥ 18
Docker (dev only) any recent

Quick Start

1 — Install build dependencies

npm install

2 — Start the Docker environment

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

docker-compose up -d

3 — Install the plugin

Copy the plugin into the running container and fix ownership.

sh update-container.sh

4 — Open WordPress

Navigate to http://localhost:8080 and activate StregPay from WooCommerce → Settings → Payments.


Development Workflow

Automated — file watcher (recommended)

Watches for file changes, auto-rebuilds assets, and syncs to the container.

npm run dev-watch
# Auto-rebuilds on changes
# Auto-updates plugin in the container
# Press Ctrl+C to stop

Manual — explicit rebuild & sync

# 1. Compile JS + CSS assets
npm run build

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

Note: PHP changes are synced by the watcher automatically. JavaScript and CSS changes always require npm run build first. Container sync takes approximately 3–5 seconds.


Docker Commands

Action Command
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 <container> bash

Troubleshooting

Plugin not showing in WooCommerce? Re-run the install step from Quick Start — the copy command must be run again after any container restart.

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 write outside the www-data scope.


Project Structure

stregsystem-payment-gateway/
├── src/                  # Source JS + CSS (compiled via npm run build)
├── assets/               # Compiled JS + CSS (do not edit directly)
├── includes/             # PHP gateway class and helpers
├── templates/            # WooCommerce checkout templates
├── stregpay-checkout.php # Plugin entry point
├── docker-compose.yml    # Dev environment
├── update-container.sh   # Container sync helper
└── package.json          # Build toolchain

  • stregsystemet — The F-Klub stregdollar system (Django) that StregPay integrates with
  • fklub.dk — The F-Klub club website running WooCommerce + StregPay

License

LPW © F-Klub — fklub.dk


Made with ☕ and stregdollars by the members of F-Klub, Aalborg University

fklub.dk  ·  stregsystemet