clickpesa-python-sdk 0.1.2__tar.gz → 0.1.3__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.
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/PKG-INFO +1 -1
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/pyproject.toml +1 -1
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa/__init__.py +0 -2
- clickpesa_python_sdk-0.1.3/src/clickpesa/_version.py +1 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa/security.py +7 -1
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa_python_sdk.egg-info/PKG-INFO +1 -1
- clickpesa_python_sdk-0.1.2/src/clickpesa/_version.py +0 -1
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/LICENSE +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/README.md +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/setup.cfg +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa/async_client.py +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa/client.py +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa/exceptions.py +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa/py.typed +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa/services/__init__.py +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa/services/account.py +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa/services/billpay.py +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa/services/exchange.py +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa/services/links.py +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa/services/payments.py +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa/services/payouts.py +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa/webhooks.py +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa_python_sdk.egg-info/SOURCES.txt +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa_python_sdk.egg-info/dependency_links.txt +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa_python_sdk.egg-info/requires.txt +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa_python_sdk.egg-info/top_level.txt +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/tests/test_async_client.py +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/tests/test_billpay.py +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/tests/test_client.py +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/tests/test_links.py +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/tests/test_payments.py +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/tests/test_payouts.py +0 -0
- {clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/tests/test_webhook.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clickpesa-python-sdk
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Production-grade Python SDK for the ClickPesa API — sync & async, collections, payouts, BillPay and more
|
|
5
5
|
Author-email: Jackson Linus <jacksonlinus95@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.3"
|
|
@@ -63,6 +63,11 @@ class SecurityManager:
|
|
|
63
63
|
Uses ``hmac.compare_digest`` for constant-time comparison to prevent
|
|
64
64
|
timing-based side-channel attacks.
|
|
65
65
|
|
|
66
|
+
ClickPesa only signs top-level scalar fields in webhook payloads —
|
|
67
|
+
nested dicts and lists are excluded from the signature. This mirrors
|
|
68
|
+
their signing algorithm so extra envelope fields (e.g. ``customer``,
|
|
69
|
+
``metadata``) don't cause verification to fail.
|
|
70
|
+
|
|
66
71
|
Args:
|
|
67
72
|
checksum_key: Your application's checksum secret key.
|
|
68
73
|
payload: The parsed webhook body dict.
|
|
@@ -74,7 +79,8 @@ class SecurityManager:
|
|
|
74
79
|
if not signature:
|
|
75
80
|
return False
|
|
76
81
|
|
|
77
|
-
|
|
82
|
+
flat_payload = {k: v for k, v in payload.items() if not isinstance(v, (dict, list))}
|
|
83
|
+
computed = SecurityManager.create_checksum(checksum_key, flat_payload)
|
|
78
84
|
return hmac.compare_digest(computed, signature)
|
|
79
85
|
|
|
80
86
|
|
{clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa_python_sdk.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clickpesa-python-sdk
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Production-grade Python SDK for the ClickPesa API — sync & async, collections, payouts, BillPay and more
|
|
5
5
|
Author-email: Jackson Linus <jacksonlinus95@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa/services/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa/services/exchange.py
RENAMED
|
File without changes
|
|
File without changes
|
{clickpesa_python_sdk-0.1.2 → clickpesa_python_sdk-0.1.3}/src/clickpesa/services/payments.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|