Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Transact local configuration.
#
# Copy this file to .env and adjust. Every value below is a placeholder.
# None of them are real credentials and none of them will authenticate anywhere.
#
# Two rules that never bend:
# 1. Real credentials live only in your own .env, which is git ignored.
# 2. Continuous integration never receives real credentials. From Phase 3
# onward the Adyen base URL is redirected to a local stub, so CI cannot
# reach a real payment provider even by accident.

PORT=8080

# Server side API key. Used by the backend to open a payment session.
ADYEN_API_KEY=placeholder_api_key_not_real

# Browser side key. Injected into the checkout page.
ADYEN_CLIENT_KEY=placeholder_client_key_not_real

# The merchant account the payment is booked against.
ADYEN_MERCHANT_ACCOUNT=TransactTestMerchant

# Shared secret used to verify webhook signatures. Must be hexadecimal.
ADYEN_HMAC_KEY=0000000000000000000000000000000000000000000000000000000000000000
File renamed without changes.
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,12 @@ dist
build
.vscode

.env
.env
# ---- Transact ----
.venv/
venv/
__pycache__/
*.pyc
.pytest_cache/
reports/
.coverage
Comment on lines +18 to +24

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The entries venv/, __pycache__/, and *.pyc are already defined in the existing .gitignore file (lines 6, 10, and 9 respectively). Adding them again here introduces redundant duplicates. We should only add the new entries like .venv/, .pytest_cache/, reports/, and .coverage.

.venv/
.pytest_cache/
reports/
.coverage

62 changes: 62 additions & 0 deletions docs/UPSTREAM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Upstream foundation and attribution

Transact is not a payment application. It is a quality engineering platform built
around one, and the payment application is somebody else's work.

## What the upstream project is

| | |
|---|---|
| Project | [adyen-python-online-payments](https://github.com/adyen-examples/adyen-python-online-payments) |
| Maintained by | Adyen |
| License | MIT |
| Base commit | `a78d64f`, 16 June 2026 |
| What it demonstrates | The Adyen Sessions flow: a Flask backend opens a payment session, and Adyen's browser component handles the payment itself |

Adyen did not create Transact, has not reviewed it, and does not endorse it. The
upstream license text is preserved unchanged in `LICENSE`.

## Code that is not mine

Everything below existed before Transact and is credited to Adyen:

- the Flask application factory and routing in `app/app.py`
- the payment session integration in `app/main/sessions.py`
- HMAC signature verification on the webhook endpoint
- the configuration getters in `app/main/config.py`
- every Jinja template and static asset, including the browser side checkout wiring
- the `_archive/v5` folder, which holds the previous checkout version and is unused here

## Changes made to upstream files

Each entry names the file, the change, and the reason. This list is kept current
as the project moves through its phases.

### Phase 1

| File | Change | Why |
|---|---|---|
| `.github/workflows/e2e.yml` | Renamed to `e2e.yml.disabled` | It runs Adyen's own Playwright suite and requires Adyen test credentials as repository secrets. On a fork without those secrets it fails on every push, which makes the repository look broken. Transact builds its own pipeline in Phase 13. |
| `.gitignore` | Added entries for the virtual environment, caches, and generated reports | Generated output does not belong in version control. |

### Files added by Transact in Phase 1

| File | Purpose |
|---|---|
| `pyproject.toml` | Pins every runtime dependency and sets the minimum Python version. Upstream `requirements.txt` leaves Flask unpinned, which means two people can install two different applications. Transact does not use `requirements.txt`. |
| `.env.example` | Documents the configuration surface with placeholder values, so the project can be set up without anyone guessing which variables exist. |
| `docs/UPSTREAM.md` | This file. |

## Planned modifications, not yet made

Recorded here so the boundary stays honest as the project grows.

- a payment endpoint that accepts and validates a request body, because the upstream
endpoint ignores its input and hard codes the amount, which leaves nothing to test
- a persistence layer for payment attempts and webhook events, because idempotency
and duplicate detection are claims about stored state
- a configurable Adyen base URL and HTTP timeout, so tests can be pointed at a local
stub and continuous integration can never reach a real payment provider
- idempotency key support, which the Adyen library already accepts and upstream never passes
- structured error responses on the webhook path, which currently returns HTTP 500
for malformed input and for an invalid signature
30 changes: 30 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Transact project manifest.
#
# Upstream ships a requirements.txt with an unpinned Flask. Transact does not use it.
# A quality platform that cannot reproduce its own environment cannot make claims
# about anything else, so every runtime dependency is pinned here instead.

[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"

[project]
name = "transact"
version = "0.1.0"
description = "Payment API quality engineering platform built around the Adyen Python online payments example"
requires-python = ">=3.10"

dependencies = [
"Flask==3.1.3",
"Adyen==13.3.0",
"python-dotenv==1.0.1",
]

[project.optional-dependencies]
# Test tooling is added phase by phase, as each tool earns its place.
dev = []

[tool.setuptools]
# Transact is an application, not a library. Nothing here is meant to be
# importable from site-packages, so no packages are installed.
packages = []