Repository navigation
TRANS-116 Bootstrap local environment #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Priyaj11
wants to merge
1
commit into
adyen-examples:main
from
Priyaj11:feature/TRANS-116-local-environment
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 = [] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The entries
venv/,__pycache__/, and*.pycare already defined in the existing.gitignorefile (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.