Skip to content

New Feature - SumUp pay-per-print integration (Solo & QR-Code)#1500

Open
frogro wants to merge 12 commits intoPhotoboothProject:devfrom
frogro:feature/sumup-payment
Open

New Feature - SumUp pay-per-print integration (Solo & QR-Code)#1500
frogro wants to merge 12 commits intoPhotoboothProject:devfrom
frogro:feature/sumup-payment

Conversation

@frogro
Copy link
Copy Markdown

@frogro frogro commented Mar 30, 2026

Prerequisites checklist

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • New feature
  • Other, please explain:

What changes did you make? (Give an overview)

feat: add SumUp pay-per-print integration (Solo & QR-Code)

  • Added sumup_print_wrapper.php to bridge Python scripts with native print logic.
  • Added sumup_solo.py for SumUp Solo Terminal support via Cloud API.
  • Added webhook_sumup.py (Flask) for SumUp QR-code payment processing.
  • Updated installer to automate ngrok, gunicorn, and dependency setup.
  • Ensures all print effects (frames, QR codes) are applied to paid prints.

Pay-per-print Integration for Sumup Payment (via QR code or Solo Terminal

This PR introduces a robust payment integration that allows charging for prints while maintaining the full feature set of Photobooth (Frames, QR-Codes, etc.).

Core Integration:

  • sumup_solo.py: Handles transactions for the SumUp Solo Terminal.
  • webhook_sumup.py: Flask-based listener for QR-code payment status updates.
  • Logic Wrapper: Added sumup_print_wrapper.php to bridge Python scripts with the native print.php. This ensures that all configured effects (QR codes, frames, rotation) are applied correctly to the payment-triggered prints.

Setup Requirements:

  • SumUp: Secret API Key and Affiliate Key required. Solo Terminal needs to be linked via Cloud API.
  • Ngrok: Provides a secure tunnel for the SumUp Webhook to reach the local Photobooth.
  • Gunicorn: Runs the Python webhook listener as a background service.

Installation:

  • Included a dedicated installer script: install-photobooth-sumup-ngrok-gunicorn.sh based on the original installer to automate the environment setup.

1.) Create a free SumUp account and API access token

Settings > For Developers > API Key (secret.txt) + > Settings > For Developers > Affiliate Key; optionally, link Solo under Cloud API

2. Create a free ngrok account

Set up an ngrok authoring token / note the dev domain (it should be an fixed IP - maybe it will be offered to you later)

ngrok config add-authtoken YOUR_TOKEN

3. Start the tunnel (only required for QR code payment)

ngrok http --url=myurl.ngrok-free.app 5000 or via the service (integrated in the installer)

4. Start guinicorn (only required for QR code payment)

cd /var/www/html/api
sudo -u www-data gunicorn -w 2 -b 127.0.0.1:5000 webhook_sumup:app or via the service (integrated in the installer)

Is there anything you'd like reviewers to focus on?

You can also clone with following commands:

sudo apt install git
cd ~
git clone -b feature/sumup-payment https://github.com/frogro/photobooth.git photobooth
cd ~/photobooth
git branch

Should show:
* feature/sumup-payment

bash install-photobooth-sumup-ngrok-gunicorn.sh

AI used to create this Pull Request?

Yes. It was done with the support of ChatGPT and Gemini.

Copy link
Copy Markdown
Contributor

@andi34 andi34 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Install script als needs execution permissions, chmod +x

@andi34 andi34 force-pushed the feature/sumup-payment branch 6 times, most recently from b4c1c2a to 1a7ca4b Compare April 5, 2026 12:02
check_git_install
fi
check_photobooth_version
install_system_icon || warn "Failed to install Photobooth system icon"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed?

@andi34 andi34 force-pushed the feature/sumup-payment branch 3 times, most recently from 4fc41ce to 86d9f00 Compare April 8, 2026 04:54
frogro and others added 12 commits April 11, 2026 09:06
Change-Id: I6144c0db0c2541d89ba926ba071f3a491ea12a1d
Change-Id: Ib8c17613e6f0172194d5bf54a3dcada8b4fa441d
npm run format
pre-commit run --all-files

Change-Id: I5bda30bc0f3ddb11364d5c16f6a6b9c557d560f6
Change-Id: I93b4b337b5571c1391d37ed914a4fad6b5aa3660
Change-Id: Ic022250597b29d7ce8d2ab0e7f831432124bcb29
Change-Id: I231d32b866590ea08f2fcab44def02ec48afa38a
Change-Id: I2c0dab008b64475c3773cbfd7ebc72efa392c1d4
Change-Id: I3d0343150ebbb8f3e6cab1466b2ed0df29315bf7
Change-Id: I65eeeb49e54550865abdff8f4689352ab1ee23a1
Change-Id: I915b194bc703ed3ffed70ad770db90b17a0a3e57
dont depend on german language

Change-Id: I77f07d5e93760ad400bc6043325b76cafd297943
@andi34 andi34 force-pushed the feature/sumup-payment branch from b05ef6f to 6e0c928 Compare April 11, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants