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.

Files changed (34) hide show
  1. {payme_pkg-3.0.3/payme_pkg.egg-info → payme_pkg-3.0.5}/PKG-INFO +1 -1
  2. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/classes/initializer.py +3 -1
  3. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/views.py +5 -0
  4. {payme_pkg-3.0.3 → payme_pkg-3.0.5/payme_pkg.egg-info}/PKG-INFO +1 -1
  5. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/setup.py +1 -1
  6. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/LICENSE.txt +0 -0
  7. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/README.md +0 -0
  8. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/__init__.py +0 -0
  9. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/admin.py +0 -0
  10. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/apps.py +0 -0
  11. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/classes/__init__.py +0 -0
  12. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/classes/cards.py +0 -0
  13. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/classes/client.py +0 -0
  14. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/classes/http.py +0 -0
  15. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/classes/receipts.py +0 -0
  16. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/const.py +0 -0
  17. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/exceptions/__init__.py +0 -0
  18. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/exceptions/general.py +0 -0
  19. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/exceptions/webhook.py +0 -0
  20. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/migrations/__init__.py +0 -0
  21. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/models.py +0 -0
  22. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/types/__init__.py +0 -0
  23. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/types/request/__init__.py +0 -0
  24. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/types/response/__init__.py +0 -0
  25. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/types/response/cards.py +0 -0
  26. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/types/response/receipts.py +0 -0
  27. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/types/response/webhook.py +0 -0
  28. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/urls.py +0 -0
  29. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme/util.py +0 -0
  30. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme_pkg.egg-info/SOURCES.txt +0 -0
  31. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme_pkg.egg-info/dependency_links.txt +0 -0
  32. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme_pkg.egg-info/requires.txt +0 -0
  33. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/payme_pkg.egg-info/top_level.txt +0 -0
  34. {payme_pkg-3.0.3 → payme_pkg-3.0.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: payme-pkg
3
- Version: 3.0.3
3
+ Version: 3.0.5
4
4
  Home-page: https://github.com/Muhammadali-Akbarov/payme-pkg
5
5
  Author: Muhammadali Akbarov
6
6
  Author-email: muhammadali17abc@gmail.com
@@ -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.id={id};a={amount};c={return_url}'
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: payme-pkg
3
- Version: 3.0.3
3
+ Version: 3.0.5
4
4
  Home-page: https://github.com/Muhammadali-Akbarov/payme-pkg
5
5
  Author: Muhammadali Akbarov
6
6
  Author-email: muhammadali17abc@gmail.com
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
3
3
 
4
4
  setup(
5
5
  name='payme-pkg',
6
- version='3.0.3',
6
+ version='3.0.5',
7
7
  license='MIT',
8
8
  author="Muhammadali Akbarov",
9
9
  author_email='muhammadali17abc@gmail.com',
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