payme-pkg 3.0.20__tar.gz → 3.0.21__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.
Potentially problematic release.
This version of payme-pkg might be problematic. Click here for more details.
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/PKG-INFO +1 -1
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/classes/client.py +1 -1
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/classes/initializer.py +6 -2
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme_pkg.egg-info/PKG-INFO +1 -1
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/setup.py +1 -1
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/LICENSE.txt +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/README.md +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/__init__.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/admin.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/apps.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/classes/__init__.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/classes/cards.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/classes/http.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/classes/receipts.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/const.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/exceptions/__init__.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/exceptions/general.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/exceptions/webhook.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/migrations/0001_initial.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/migrations/__init__.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/models.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/types/__init__.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/types/request/__init__.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/types/response/__init__.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/types/response/cards.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/types/response/receipts.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/types/response/webhook.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/urls.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/util.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme/views.py +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme_pkg.egg-info/SOURCES.txt +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme_pkg.egg-info/dependency_links.txt +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme_pkg.egg-info/requires.txt +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/payme_pkg.egg-info/top_level.txt +0 -0
- {payme_pkg-3.0.20 → payme_pkg-3.0.21}/setup.cfg +0 -0
|
@@ -26,5 +26,5 @@ class Payme:
|
|
|
26
26
|
url = Networks.TEST_NET.value
|
|
27
27
|
|
|
28
28
|
self.cards = Cards(url=url, payme_id=payme_id)
|
|
29
|
-
self.initializer = Initializer(payme_id=payme_id, fallback_id=fallback_id)
|
|
29
|
+
self.initializer = Initializer(payme_id=payme_id, fallback_id=fallback_id, is_test_mode=is_test_mode)
|
|
30
30
|
self.receipts = Receipts(url=url, payme_id=payme_id, payme_key=payme_key) # noqa
|
|
@@ -13,10 +13,10 @@ class Initializer:
|
|
|
13
13
|
The Payme ID associated with your account
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
|
-
def __init__(self, payme_id: str = None, fallback_id: str = None):
|
|
16
|
+
def __init__(self, payme_id: str = None, fallback_id: str = None, is_test_mode: bool = False):
|
|
17
17
|
self.payme_id = payme_id
|
|
18
18
|
self.fallback_id = fallback_id
|
|
19
|
-
|
|
19
|
+
self.is_test_mode = is_test_mode
|
|
20
20
|
|
|
21
21
|
def generate_pay_link(
|
|
22
22
|
self,
|
|
@@ -56,6 +56,10 @@ class Initializer:
|
|
|
56
56
|
f'm={self.payme_id};ac.{settings.PAYME_ACCOUNT_FIELD}={id};a={amount};c={return_url}'
|
|
57
57
|
)
|
|
58
58
|
params = base64.b64encode(params.encode("utf-8")).decode("utf-8")
|
|
59
|
+
|
|
60
|
+
if self.is_test_mode is True:
|
|
61
|
+
return f"https://test.paycom.uz/{params}"
|
|
62
|
+
|
|
59
63
|
return f"https://checkout.paycom.uz/{params}"
|
|
60
64
|
|
|
61
65
|
def generate_fallback_link(self, form_fields: dict = None):
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|