python-getpaid-payu 0.1.0__tar.gz → 3.0.0a3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. python_getpaid_payu-3.0.0a3/.github/workflows/ci.yml +33 -0
  2. python_getpaid_payu-3.0.0a3/.sisyphus/evidence/task-26-readme-payu.txt +3 -0
  3. python_getpaid_payu-3.0.0a3/.sisyphus/evidence/task-5-baseline-payu.txt +200 -0
  4. python_getpaid_payu-3.0.0a3/PKG-INFO +110 -0
  5. python_getpaid_payu-3.0.0a3/README.md +86 -0
  6. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/docs/changelog.md +1 -1
  7. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/docs/concepts.md +10 -10
  8. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/pyproject.toml +8 -2
  9. python_getpaid_payu-3.0.0a3/sandbox_keys.txt +17 -0
  10. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/src/getpaid_payu/__init__.py +1 -1
  11. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/src/getpaid_payu/client.py +16 -18
  12. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/src/getpaid_payu/processor.py +124 -75
  13. python_getpaid_payu-3.0.0a3/tests/conftest.py +117 -0
  14. python_getpaid_payu-3.0.0a3/tests/test_callback.py +123 -0
  15. python_getpaid_payu-3.0.0a3/tests/test_entry_points.py +12 -0
  16. python_getpaid_payu-3.0.0a3/tests/test_processor.py +232 -0
  17. python_getpaid_payu-3.0.0a3/tests/test_public_api.py +7 -0
  18. python_getpaid_payu-3.0.0a3/tests/test_url_construction.py +444 -0
  19. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/uv.lock +4 -5
  20. python_getpaid_payu-0.1.0/PKG-INFO +0 -152
  21. python_getpaid_payu-0.1.0/README.md +0 -128
  22. python_getpaid_payu-0.1.0/tests/conftest.py +0 -143
  23. python_getpaid_payu-0.1.0/tests/test_callback.py +0 -290
  24. python_getpaid_payu-0.1.0/tests/test_processor.py +0 -449
  25. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/.gitignore +0 -0
  26. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/.pre-commit-config.yaml +0 -0
  27. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/.python-version +0 -0
  28. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/.readthedocs.yml +0 -0
  29. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/CODE_OF_CONDUCT.md +0 -0
  30. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/CONTRIBUTING.md +0 -0
  31. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/LICENSE +0 -0
  32. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/docs/codeofconduct.md +0 -0
  33. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/docs/conf.py +0 -0
  34. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/docs/configuration.md +0 -0
  35. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/docs/contributing.md +0 -0
  36. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/docs/getting-started.md +0 -0
  37. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/docs/index.md +0 -0
  38. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/docs/license.md +0 -0
  39. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/docs/reference.md +0 -0
  40. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/docs/requirements.txt +0 -0
  41. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/src/getpaid_payu/py.typed +0 -0
  42. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/src/getpaid_payu/types.py +0 -0
  43. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/tests/__init__.py +0 -0
  44. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/tests/test_client.py +0 -0
  45. {python_getpaid_payu-0.1.0 → python_getpaid_payu-3.0.0a3}/tests/test_types.py +0 -0
@@ -0,0 +1,33 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ python-version: ["3.12", "3.13"]
14
+
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - name: Set up Python ${{ matrix.python-version }}
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: ${{ matrix.python-version }}
22
+
23
+ - name: Install uv
24
+ run: pip install uv
25
+
26
+ - name: Install dependencies
27
+ run: uv sync
28
+
29
+ - name: Lint with ruff
30
+ run: uv run ruff check .
31
+
32
+ - name: Run tests
33
+ run: uv run pytest --tb=short
@@ -0,0 +1,200 @@
1
+ ================================================================================
2
+ TASK 5 BASELINE: python-getpaid-payu
3
+ Executed: 2026-02-18
4
+ ================================================================================
5
+
6
+ DIRECTORY: /home/minder/projekty/python-getpaid/getpaid-payu/
7
+
8
+ ================================================================================
9
+ 1. PYTEST RESULTS
10
+ ================================================================================
11
+
12
+ Command: uv run pytest
13
+
14
+ Output:
15
+ ============================= test session starts ==============================
16
+ platform linux -- Python 3.12.10, pytest-9.0.2, pluggy-1.6.0
17
+ rootdir: /home/minder/projekty/python-getpaid/getpaid-payu
18
+ configfile: pyproject.toml
19
+ testpaths: tests
20
+ plugins: asyncio-1.3.0, cov-7.0.0, anyio-4.12.1, respx-0.22.0
21
+ asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_fixture_scope=function
22
+ collected 115 items
23
+
24
+ tests/test_callback.py ................... [ 16%]
25
+ tests/test_client.py ................................................... [ 60%]
26
+ ......... [ 68%]
27
+ tests/test_processor.py ......................... [ 90%]
28
+ tests/test_types.py ........... [100%]
29
+
30
+ ============================= 115 passed in 2.57s ==============================
31
+
32
+ STATUS: ✓ ALL TESTS PASSED
33
+
34
+ ================================================================================
35
+ 2. BUILD RESULTS
36
+ ================================================================================
37
+
38
+ Command: uv build
39
+
40
+ Output:
41
+ Building source distribution...
42
+ Building wheel from source distribution...
43
+ Successfully built dist/python_getpaid_payu-0.1.1.tar.gz
44
+ Successfully built dist/python_getpaid_payu-0.1.1-py3-none-any.whl
45
+
46
+ STATUS: ✓ BUILD SUCCESSFUL
47
+
48
+ Artifacts:
49
+ - dist/python_getpaid_payu-0.1.1.tar.gz (source distribution)
50
+ - dist/python_getpaid_payu-0.1.1-py3-none-any.whl (wheel)
51
+
52
+ ================================================================================
53
+ 3. PACKAGE METADATA INVENTORY
54
+ ================================================================================
55
+
56
+ Project Name: python-getpaid-payu
57
+ Version: 0.1.1
58
+ Python Requirement: >= 3.12
59
+ License: MIT (text format)
60
+ Authors: Dominik Kozaczko <dominik@kozaczko.info>
61
+
62
+ Description: PayU payment gateway integration for python-getpaid ecosystem.
63
+
64
+ Dependencies:
65
+ - python-getpaid-core >= 0.1.0
66
+ - httpx >= 0.27.0
67
+
68
+ Development Dependencies:
69
+ - pytest >= 8.0
70
+ - pytest-asyncio >= 0.24.0
71
+ - pytest-cov >= 5.0
72
+ - respx >= 0.22.0
73
+ - ruff >= 0.9.0
74
+ - pre-commit >= 4.0
75
+ - ty >= 0.0.16
76
+
77
+ Documentation Dependencies:
78
+ - furo >= 2024.8.6
79
+ - sphinx >= 8.0
80
+ - myst-parser >= 4.0
81
+
82
+ URLs:
83
+ - Homepage: https://github.com/django-getpaid/python-getpaid-payu
84
+ - Repository: https://github.com/django-getpaid/python-getpaid-payu
85
+ - Documentation: https://getpaid-payu.readthedocs.io/
86
+ - Changelog: https://github.com/django-getpaid/python-getpaid-payu/releases
87
+
88
+ Build System: hatchling
89
+
90
+ Classifiers:
91
+ - Development Status :: 3 - Alpha
92
+ - Intended Audience :: Developers
93
+ - License :: OSI Approved :: MIT License
94
+ - Programming Language :: Python :: 3.12
95
+ - Programming Language :: Python :: 3.13
96
+ - Topic :: Office/Business :: Financial
97
+ - Topic :: Office/Business :: Financial :: Point-Of-Sale
98
+ - Typing :: Typed
99
+
100
+ ================================================================================
101
+ 4. LICENSE CHECK
102
+ ================================================================================
103
+
104
+ LICENSE File Status: ✓ PRESENT
105
+ Format: MIT License
106
+ Copyright: 2022-2026 Dominik Kozaczko
107
+ Consistency: ✓ Matches pyproject.toml declaration (MIT)
108
+
109
+ ================================================================================
110
+ 5. README.MD CHECK
111
+ ================================================================================
112
+
113
+ README File Status: ✓ PRESENT
114
+ Size: ~4.5 KB (129 lines)
115
+ Content Verification:
116
+ ✓ Project description (PayU payment gateway plugin)
117
+ ✓ Architecture section (PayUClient + PayUProcessor)
118
+ ✓ Key features listed
119
+ ✓ Quick usage examples (async context manager)
120
+ ✓ Configuration table with all parameters
121
+ ✓ Supported currencies listed
122
+ ✓ Requirements section
123
+ ✓ Related projects links
124
+ ✓ License information
125
+ ✓ Disclaimer section
126
+ ✓ Credits
127
+
128
+ ================================================================================
129
+ 6. GITHUB WORKFLOWS (.github/workflows/)
130
+ ================================================================================
131
+
132
+ Status: ✗ NOT PRESENT
133
+
134
+ No .github/workflows/ directory found in the repository.
135
+ Note: Project is part of the python-getpaid umbrella but does not have its own CI configuration.
136
+
137
+ ================================================================================
138
+ 7. ENTRY-POINTS ANALYSIS [CRITICAL]
139
+ ================================================================================
140
+
141
+ Section Name: [project.entry-points."getpaid.backends"]
142
+ Status: ✗ ENTRY-POINTS NOT DEFINED
143
+
144
+ Current State:
145
+ - pyproject.toml does NOT contain any [project.entry-points] section
146
+ - grep search: "No entry-points found in pyproject.toml"
147
+
148
+ Impact Analysis:
149
+ The PayUProcessor is the main integration point with getpaid-core.
150
+ Entry-points are REQUIRED for plugin auto-discovery by framework adapters
151
+ (e.g., django-getpaid).
152
+
153
+ Expected Entry-Point (if needed):
154
+ [project.entry-points."getpaid.backends"]
155
+ payu = "getpaid_payu.processor:PayUProcessor"
156
+
157
+ OR (if supporting multiple backends):
158
+ [project.entry-points."getpaid.backends"]
159
+ payu = "getpaid_payu.processor:PayUProcessor"
160
+
161
+ Recommendation:
162
+ TASK 10 (Add entry-points configuration) IS REQUIRED
163
+ Current state prevents framework adapters from auto-discovering PayUProcessor.
164
+
165
+ ================================================================================
166
+ 8. PYPROJECT.TOML STRUCTURE
167
+ ================================================================================
168
+
169
+ Build Section: ✓ Present (hatchling)
170
+ Test Configuration: ✓ Present (pytest)
171
+ Coverage Config: ✓ Present
172
+ Linter Config (ruff): ✓ Present
173
+ Type Checker (ty): ✓ Present
174
+ Project Metadata: ✓ Complete
175
+
176
+ Entry-Points Section: ✗ MISSING (BLOCKING FOR TASK 10)
177
+
178
+ ================================================================================
179
+ SUMMARY
180
+ ================================================================================
181
+
182
+ ✓ Pytest: 115 passed (2.57s)
183
+ ✓ Build: Successful (tarball + wheel)
184
+ ✓ License: MIT, properly formatted
185
+ ✓ README: Comprehensive documentation
186
+ ✓ Version: 0.1.1 (consistent across build artifacts)
187
+ ✓ Metadata: Complete and correct
188
+
189
+ ✗ Entry-Points: NOT DEFINED
190
+ → PayUProcessor cannot be auto-discovered by framework adapters
191
+ → Task 10 required to add: [project.entry-points."getpaid.backends"]
192
+
193
+ BLOCKERS: Entry-points missing (expected, noted in Metis feedback)
194
+
195
+ NEXT STEPS:
196
+ - Task 10: Add entry-points configuration
197
+ - Ensure PayUProcessor class is properly exported for discovery
198
+
199
+ ================================================================================
200
+ EOF
@@ -0,0 +1,110 @@
1
+ Metadata-Version: 2.4
2
+ Name: python-getpaid-payu
3
+ Version: 3.0.0a3
4
+ Summary: PayU payment gateway integration for python-getpaid ecosystem.
5
+ Project-URL: Homepage, https://github.com/django-getpaid/python-getpaid-payu
6
+ Project-URL: Repository, https://github.com/django-getpaid/python-getpaid-payu
7
+ Project-URL: Documentation, https://getpaid-payu.readthedocs.io/
8
+ Project-URL: Changelog, https://github.com/django-getpaid/python-getpaid-payu/releases
9
+ Author-email: Dominik Kozaczko <dominik@kozaczko.info>
10
+ License: MIT
11
+ License-File: LICENSE
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Office/Business :: Financial
18
+ Classifier: Topic :: Office/Business :: Financial :: Point-Of-Sale
19
+ Classifier: Typing :: Typed
20
+ Requires-Python: >=3.12
21
+ Requires-Dist: httpx>=0.27.0
22
+ Requires-Dist: python-getpaid-core>=3.0.0a3
23
+ Description-Content-Type: text/markdown
24
+
25
+ # python-getpaid-payu
26
+
27
+ [![PyPI version](https://img.shields.io/pypi/v/python-getpaid-payu.svg)](https://pypi.org/project/python-getpaid-payu/)
28
+ [![Python versions](https://img.shields.io/pypi/pyversions/python-getpaid-payu.svg)](https://pypi.org/project/python-getpaid-payu/)
29
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
30
+
31
+ PayU payment processor plugin for the [python-getpaid](https://github.com/django-getpaid/python-getpaid-core) ecosystem.
32
+
33
+ Provides a fully async HTTP client (`PayUClient`) and a payment processor (`PayUProcessor`) implementing the [getpaid-core](https://github.com/django-getpaid/python-getpaid-core) `BaseProcessor` interface. Communicates with PayU via their REST API v2.1 using OAuth2 authentication.
34
+
35
+ ## Features
36
+
37
+ - **Full Payment Lifecycle**: Supports prepared, locked, paid, failed, and refunded states.
38
+ - **Pre-authorization**: Reserve funds on customer's card (lock) and capture them later (charge).
39
+ - **Refunds**: Full and partial refund support via API.
40
+ - **Multiple Currencies**: Support for 15 currencies across Europe and beyond.
41
+ - **Asynchronous**: Built with `httpx` for non-blocking API communication.
42
+ - **Security**: Robust callback signature verification (SHA-256 and MD5).
43
+ - **Comprehensive API**: Wraps every PayU REST API v2.1 endpoint.
44
+
45
+ ## Supported Currencies
46
+
47
+ The following 15 currencies are supported:
48
+ BGN, CHF, CZK, DKK, EUR, GBP, HRK, HUF, NOK, PLN, RON, RUB, SEK, UAH, USD.
49
+
50
+ ## Installation
51
+
52
+ ```bash
53
+ pip install python-getpaid-payu
54
+ ```
55
+
56
+ ## Configuration
57
+
58
+ To use the PayU backend, register it in your `getpaid` configuration and provide the following settings:
59
+
60
+ | Key | Type | Default | Description |
61
+ |-----|------|---------|-------------|
62
+ | `pos_id` | `int` | — | PayU POS (point of sale) identifier |
63
+ | `second_key` | `str` | — | Second key (MD5) from PayU panel, used for signature verification |
64
+ | `oauth_id` | `int` | — | OAuth client ID from PayU panel |
65
+ | `oauth_secret` | `str` | — | OAuth client secret from PayU panel |
66
+ | `sandbox` | `bool` | `True` | Use sandbox (`secure.snd.payu.com`) or production (`secure.payu.com`) |
67
+ | `notify_url` | `str` | `None` | Notification callback URL template, e.g. `https://example.com/payments/{payment_id}/notify` |
68
+ | `continue_url` | `str` | `None` | Redirect URL template after payment, e.g. `https://example.com/payments/{payment_id}/continue` |
69
+
70
+ Example configuration:
71
+
72
+ ```python
73
+ GETPAID_BACKENDS = {
74
+ "payu": {
75
+ "pos_id": "300746",
76
+ "second_key": "b6ca15b0d1020e8094d9b5f8d163db54",
77
+ "oauth_id": "300746",
78
+ "oauth_secret": "2ee86a66e5d97e3fadc400c9f19b065d",
79
+ "notify_url": "https://your-domain.com/payments/payu/callback/",
80
+ "continue_url": "https://your-domain.com/payments/payu/success/",
81
+ "sandbox": True,
82
+ }
83
+ }
84
+ ```
85
+
86
+ ### Sandbox Mode
87
+
88
+ PayU provides a sandbox environment for testing. You can use the example keys provided above for testing in PLN.
89
+
90
+ ## Ecosystem
91
+
92
+ `python-getpaid-payu` is part of the larger `python-getpaid` ecosystem. Use it with one of our web framework wrappers:
93
+
94
+ - [django-getpaid](https://github.com/django-getpaid/django-getpaid)
95
+ - [litestar-getpaid](https://github.com/django-getpaid/litestar-getpaid)
96
+ - [fastapi-getpaid](https://github.com/django-getpaid/fastapi-getpaid)
97
+
98
+ ## Requirements
99
+
100
+ - Python 3.12+
101
+ - `python-getpaid-core >= 3.0.0a3`
102
+ - `httpx >= 0.27.0`
103
+
104
+ ## License
105
+
106
+ MIT
107
+
108
+ ## Credits
109
+
110
+ Created by [Dominik Kozaczko](https://github.com/dekoza).
@@ -0,0 +1,86 @@
1
+ # python-getpaid-payu
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/python-getpaid-payu.svg)](https://pypi.org/project/python-getpaid-payu/)
4
+ [![Python versions](https://img.shields.io/pypi/pyversions/python-getpaid-payu.svg)](https://pypi.org/project/python-getpaid-payu/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ PayU payment processor plugin for the [python-getpaid](https://github.com/django-getpaid/python-getpaid-core) ecosystem.
8
+
9
+ Provides a fully async HTTP client (`PayUClient`) and a payment processor (`PayUProcessor`) implementing the [getpaid-core](https://github.com/django-getpaid/python-getpaid-core) `BaseProcessor` interface. Communicates with PayU via their REST API v2.1 using OAuth2 authentication.
10
+
11
+ ## Features
12
+
13
+ - **Full Payment Lifecycle**: Supports prepared, locked, paid, failed, and refunded states.
14
+ - **Pre-authorization**: Reserve funds on customer's card (lock) and capture them later (charge).
15
+ - **Refunds**: Full and partial refund support via API.
16
+ - **Multiple Currencies**: Support for 15 currencies across Europe and beyond.
17
+ - **Asynchronous**: Built with `httpx` for non-blocking API communication.
18
+ - **Security**: Robust callback signature verification (SHA-256 and MD5).
19
+ - **Comprehensive API**: Wraps every PayU REST API v2.1 endpoint.
20
+
21
+ ## Supported Currencies
22
+
23
+ The following 15 currencies are supported:
24
+ BGN, CHF, CZK, DKK, EUR, GBP, HRK, HUF, NOK, PLN, RON, RUB, SEK, UAH, USD.
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ pip install python-getpaid-payu
30
+ ```
31
+
32
+ ## Configuration
33
+
34
+ To use the PayU backend, register it in your `getpaid` configuration and provide the following settings:
35
+
36
+ | Key | Type | Default | Description |
37
+ |-----|------|---------|-------------|
38
+ | `pos_id` | `int` | — | PayU POS (point of sale) identifier |
39
+ | `second_key` | `str` | — | Second key (MD5) from PayU panel, used for signature verification |
40
+ | `oauth_id` | `int` | — | OAuth client ID from PayU panel |
41
+ | `oauth_secret` | `str` | — | OAuth client secret from PayU panel |
42
+ | `sandbox` | `bool` | `True` | Use sandbox (`secure.snd.payu.com`) or production (`secure.payu.com`) |
43
+ | `notify_url` | `str` | `None` | Notification callback URL template, e.g. `https://example.com/payments/{payment_id}/notify` |
44
+ | `continue_url` | `str` | `None` | Redirect URL template after payment, e.g. `https://example.com/payments/{payment_id}/continue` |
45
+
46
+ Example configuration:
47
+
48
+ ```python
49
+ GETPAID_BACKENDS = {
50
+ "payu": {
51
+ "pos_id": "300746",
52
+ "second_key": "b6ca15b0d1020e8094d9b5f8d163db54",
53
+ "oauth_id": "300746",
54
+ "oauth_secret": "2ee86a66e5d97e3fadc400c9f19b065d",
55
+ "notify_url": "https://your-domain.com/payments/payu/callback/",
56
+ "continue_url": "https://your-domain.com/payments/payu/success/",
57
+ "sandbox": True,
58
+ }
59
+ }
60
+ ```
61
+
62
+ ### Sandbox Mode
63
+
64
+ PayU provides a sandbox environment for testing. You can use the example keys provided above for testing in PLN.
65
+
66
+ ## Ecosystem
67
+
68
+ `python-getpaid-payu` is part of the larger `python-getpaid` ecosystem. Use it with one of our web framework wrappers:
69
+
70
+ - [django-getpaid](https://github.com/django-getpaid/django-getpaid)
71
+ - [litestar-getpaid](https://github.com/django-getpaid/litestar-getpaid)
72
+ - [fastapi-getpaid](https://github.com/django-getpaid/fastapi-getpaid)
73
+
74
+ ## Requirements
75
+
76
+ - Python 3.12+
77
+ - `python-getpaid-core >= 3.0.0a3`
78
+ - `httpx >= 0.27.0`
79
+
80
+ ## License
81
+
82
+ MIT
83
+
84
+ ## Credits
85
+
86
+ Created by [Dominik Kozaczko](https://github.com/dekoza).
@@ -17,6 +17,6 @@ Initial release.
17
17
  - Token deletion
18
18
  - Automatic amount centification/normalization
19
19
  - Signature verification (MD5 and SHA-256)
20
- - PUSH callback handling with FSM integration
20
+ - PUSH callback handling with semantic payment updates
21
21
  - PULL status polling
22
22
  - Full pre-authorization support (lock, charge, release)
@@ -17,9 +17,9 @@ The standard payment flow with PayU:
17
17
  └── PayUProcessor.verify_callback()
18
18
  └── Signature verification
19
19
  └── PayUProcessor.handle_callback()
20
- └── FSM transitions:
21
- COMPLETED → confirm_payment → mark_as_paid
22
- CANCELED → fail
20
+ └── semantic updates:
21
+ COMPLETED → payment_captured
22
+ CANCELED → failed
23
23
  ```
24
24
 
25
25
  ### Step by Step
@@ -33,11 +33,11 @@ The standard payment flow with PayU:
33
33
 
34
34
  3. **Notification** — PayU sends a PUSH notification (HTTP POST) to the
35
35
  `notify_url` with the order status. The framework adapter passes this to
36
- `verify_callback()` (signature check) and then `handle_callback()` (FSM
37
- state transitions).
36
+ `verify_callback()` (signature check) and then `handle_callback()` (semantic
37
+ update generation).
38
38
 
39
- 4. **Status update** — The payment status is updated via FSM transitions
40
- based on the PayU order status.
39
+ 4. **Status update** — The payment status is updated by applying semantic
40
+ payment events based on the PayU order status.
41
41
 
42
42
  ## Pre-authorization Flow
43
43
 
@@ -49,7 +49,7 @@ locked on the buyer's account first, then charged or released later:
49
49
  └── PayU returns WAITING_FOR_CONFIRMATION status
50
50
 
51
51
  2. PayU callback handle_callback()
52
- └── WAITING_FOR_CONFIRMATION → confirm_lock
52
+ └── WAITING_FOR_CONFIRMATION → locked
53
53
 
54
54
  3a. Capture (charge) PayUProcessor.charge()
55
55
  └── PayUClient.capture()
@@ -73,9 +73,9 @@ Refunds can be full or partial:
73
73
 
74
74
  3. PayU callback handle_callback()
75
75
  └── refund.status == FINALIZED
76
- confirm_refund → mark_as_refunded
76
+ refund_confirmed
77
77
  └── refund.status == CANCELED
78
- cancel_refund → mark_as_paid
78
+ refund_cancelled
79
79
  ```
80
80
 
81
81
  ## OAuth2 Authentication
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = 'python-getpaid-payu'
3
- version = '0.1.0'
3
+ dynamic = ["version"]
4
4
  description = 'PayU payment gateway integration for python-getpaid ecosystem.'
5
5
  readme = 'README.md'
6
6
  license = {text = 'MIT'}
@@ -19,7 +19,7 @@ classifiers = [
19
19
  'Typing :: Typed',
20
20
  ]
21
21
  dependencies = [
22
- 'python-getpaid-core>=0.1.0',
22
+ 'python-getpaid-core>=3.0.0a3',
23
23
  'httpx>=0.27.0',
24
24
  ]
25
25
 
@@ -45,6 +45,9 @@ Repository = 'https://github.com/django-getpaid/python-getpaid-payu'
45
45
  Documentation = 'https://getpaid-payu.readthedocs.io/'
46
46
  Changelog = 'https://github.com/django-getpaid/python-getpaid-payu/releases'
47
47
 
48
+ [project.entry-points."getpaid.backends"]
49
+ payu = 'getpaid_payu.processor:PayUProcessor'
50
+
48
51
  [build-system]
49
52
  requires = ['hatchling']
50
53
  build-backend = 'hatchling.build'
@@ -52,6 +55,9 @@ build-backend = 'hatchling.build'
52
55
  [tool.hatch.build.targets.wheel]
53
56
  packages = ['src/getpaid_payu']
54
57
 
58
+ [tool.hatch.version]
59
+ path = "src/getpaid_payu/__init__.py"
60
+
55
61
  [tool.pytest.ini_options]
56
62
  testpaths = ['tests']
57
63
  asyncio_mode = 'auto'
@@ -0,0 +1,17 @@
1
+ *** PLN Sandbox Keys ***
2
+ POS ID (pos_id): 300746
3
+ Second key (MD5): b6ca15b0d1020e8094d9b5f8d163db54
4
+ OAuth protocol - client_id: 300746
5
+ OAuth protocol - client_secret: 2ee86a66e5d97e3fadc400c9f19b065d
6
+
7
+ *** BGN Sandbox Keys ***
8
+ POS ID (pos_id): 404815
9
+ Second key (MD5): 87f410056e1ec5ff64f6bea777a0e694
10
+ OAuth protocol - client_id: 404815
11
+ OAuth protocol - client_secret: 89e263df5657cccfe7d1d2a0f50b6e41
12
+
13
+ *** RON Sandbox Keys ***
14
+ POS ID (pos_id): 491057
15
+ Second key (MD5): bac30a8686d9a31cbc9f3a25553e2f62
16
+ OAuth protocol - client_id: 491057
17
+ OAuth protocol - client_secret: d807005b11ca38eea8a3c1a794635b4f
@@ -9,4 +9,4 @@ __all__ = [
9
9
  "PayUProcessor",
10
10
  ]
11
11
 
12
- __version__ = "0.1.0"
12
+ __version__ = "3.0.0a3"