payme-pkg 3.0.3__tar.gz → 3.0.5__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.3/payme_pkg.egg-info → payme_pkg-3.0.5}/PKG-INFO +1 -1
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/classes/initializer.py +3 -1
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/views.py +5 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5/payme_pkg.egg-info}/PKG-INFO +1 -1
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/setup.py +1 -1
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/LICENSE.txt +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/README.md +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/__init__.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/admin.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/apps.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/classes/__init__.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/classes/cards.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/classes/client.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/classes/http.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/classes/receipts.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/const.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/exceptions/__init__.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/exceptions/general.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/exceptions/webhook.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/migrations/__init__.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/models.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/types/__init__.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/types/request/__init__.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/types/response/__init__.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/types/response/cards.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/types/response/receipts.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/types/response/webhook.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/urls.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/util.py +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme_pkg.egg-info/SOURCES.txt +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme_pkg.egg-info/dependency_links.txt +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme_pkg.egg-info/requires.txt +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme_pkg.egg-info/top_level.txt +0 -0
- {payme_pkg-3.0.3 → payme_pkg-3.0.5}/setup.cfg +0 -0
|
@@ -2,6 +2,8 @@ import base64
|
|
|
2
2
|
|
|
3
3
|
from payme.util import input_type_checker
|
|
4
4
|
|
|
5
|
+
from django.conf import settings
|
|
6
|
+
|
|
5
7
|
|
|
6
8
|
class Initializer:
|
|
7
9
|
"""
|
|
@@ -54,7 +56,7 @@ class Initializer:
|
|
|
54
56
|
"""
|
|
55
57
|
amount = amount * 100 # Convert amount to the smallest currency unit
|
|
56
58
|
params = (
|
|
57
|
-
f'm={self.payme_id};ac.
|
|
59
|
+
f'm={self.payme_id};ac.{settings.PAYME_ACCOUNT_FIELD}={id};a={amount};c={return_url}'
|
|
58
60
|
)
|
|
59
61
|
params = base64.b64encode(params.encode("utf-8")).decode("utf-8")
|
|
60
62
|
return f"https://checkout.paycom.uz/{params}"
|
|
@@ -113,10 +113,15 @@ class PaymeWebHookAPIView(views.APIView):
|
|
|
113
113
|
Fetch account based on settings and params.
|
|
114
114
|
"""
|
|
115
115
|
account_field = settings.PAYME_ACCOUNT_FIELD
|
|
116
|
+
|
|
116
117
|
account_value = params['account'].get(account_field)
|
|
117
118
|
if not account_value:
|
|
118
119
|
raise exceptions.InvalidAccount("Missing account field in parameters.")
|
|
119
120
|
|
|
121
|
+
# hard change
|
|
122
|
+
if account_field == "order_id":
|
|
123
|
+
account_field = "id"
|
|
124
|
+
|
|
120
125
|
account = AccountModel.objects.get(**{account_field: account_value})
|
|
121
126
|
|
|
122
127
|
return account
|
|
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
|