Skip to content

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

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

New Feature - SumUp pay-per-print integration (Solo & QR-Code)#1500
frogro wants to merge 38 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.

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.

1 participant