payme-pkg 3.0.7__tar.gz → 3.0.9__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 (36) hide show
  1. payme_pkg-3.0.9/PKG-INFO +143 -0
  2. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/classes/client.py +1 -1
  3. payme_pkg-3.0.9/payme_pkg.egg-info/PKG-INFO +143 -0
  4. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/setup.py +7 -1
  5. payme_pkg-3.0.7/PKG-INFO +0 -12
  6. payme_pkg-3.0.7/payme_pkg.egg-info/PKG-INFO +0 -12
  7. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/LICENSE.txt +0 -0
  8. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/README.md +0 -0
  9. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/__init__.py +0 -0
  10. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/admin.py +0 -0
  11. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/apps.py +0 -0
  12. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/classes/__init__.py +0 -0
  13. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/classes/cards.py +0 -0
  14. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/classes/http.py +0 -0
  15. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/classes/initializer.py +0 -0
  16. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/classes/receipts.py +0 -0
  17. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/const.py +0 -0
  18. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/exceptions/__init__.py +0 -0
  19. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/exceptions/general.py +0 -0
  20. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/exceptions/webhook.py +0 -0
  21. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/migrations/__init__.py +0 -0
  22. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/models.py +0 -0
  23. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/types/__init__.py +0 -0
  24. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/types/request/__init__.py +0 -0
  25. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/types/response/__init__.py +0 -0
  26. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/types/response/cards.py +0 -0
  27. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/types/response/receipts.py +0 -0
  28. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/types/response/webhook.py +0 -0
  29. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/urls.py +0 -0
  30. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/util.py +0 -0
  31. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme/views.py +0 -0
  32. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme_pkg.egg-info/SOURCES.txt +0 -0
  33. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme_pkg.egg-info/dependency_links.txt +0 -0
  34. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme_pkg.egg-info/requires.txt +0 -0
  35. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/payme_pkg.egg-info/top_level.txt +0 -0
  36. {payme_pkg-3.0.7 → payme_pkg-3.0.9}/setup.cfg +0 -0
@@ -0,0 +1,143 @@
1
+ Metadata-Version: 2.1
2
+ Name: payme-pkg
3
+ Version: 3.0.9
4
+ Home-page: https://github.com/Muhammadali-Akbarov/payme-pkg
5
+ Author: Muhammadali Akbarov
6
+ Author-email: muhammadali17abc@gmail.com
7
+ License: MIT
8
+ Keywords: paymeuz paycomuz payme-merchant merchant-api subscribe-api payme-pkg payme-api
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE.txt
11
+ Requires-Dist: requests==2.*
12
+ Requires-Dist: dataclasses==0.*; python_version < "3.7"
13
+ Requires-Dist: djangorestframework==3.*
14
+
15
+ <h1 align="center">Payme PKG</h1>
16
+
17
+
18
+ <p align="center">
19
+ <a href="https://docs.pay-tech.uz"><img src="https://img.shields.io/static/v1?message=Documented%20on%20GitBook&logo=gitbook&logoColor=ffffff&label=%20&labelColor=5c5c5c&color=3F89A1"></a>
20
+ <a href="https://github.com/PayTechUz/payme-pkg"><img src="https://img.shields.io/badge/Open_Source-❤️-FDA599?"/></a>
21
+ <a href="t.me/+DK7n7lKx8GY5ZDZi"><img src="https://img.shields.io/badge/Community-Join%20Us-blueviolet"/></a>
22
+ <a href="https://github.com/PayTechUz/payme-pkg/issues"><img src="https://img.shields.io/github/issues/gitbookIO/gitbook"/></a>
23
+ </p>
24
+
25
+ <p align="center">Welcome to payme-pkg, the open source payme sdk for python.</p>
26
+
27
+ <p align="center">You can use for test and production mode. Join our community and ask everything you need.
28
+ </p>
29
+ <a href="https://docs.pay-tech.uz">
30
+ <p align="center">Visit to full documentation for Merchant and Subcribe Api</p>
31
+ </a>
32
+ <p align="center">
33
+ <img style="width: 60%;" src="https://i.postimg.cc/WbD32bHC/payme-pkg-demo-m4a.gif">
34
+ </p>
35
+
36
+ ## Installation
37
+
38
+ ```shell
39
+ pip install payme-pkg
40
+ ```
41
+
42
+ ## Installation to Django
43
+
44
+ Add `'payme'` in to your settings.py
45
+
46
+ ```python
47
+ INSTALLED_APPS = [
48
+ ...
49
+ 'payme',
50
+ ...
51
+ ]
52
+ ```
53
+
54
+ Add `'payme'` credentials inside to settings.py
55
+
56
+ One time payment (Однаразовый платеж) configuration settings.py
57
+
58
+ Example project: https://github.com/PayTechUz/shop-backend
59
+ ```python
60
+ PAYME_ID = "your-payme-id"
61
+ PAYME_KEY = "your-payme-key"
62
+ PAYME_ACCOUNT_FIELD = "order_id"
63
+ PAYME_AMOUNT_FIELD = "total_amount"
64
+ PAYME_ACCOUNT_MODEL = "orders.models.Orders"
65
+ PAYME_ONE_TIME_PAYMENT = True
66
+ ```
67
+
68
+ Multi payment (Накопительный) configuration settings.py
69
+
70
+ Example project: Coming soon
71
+ ```python
72
+ PAYME_ID = "your-payme-id"
73
+ PAYME_KEY = "your-payme-key"
74
+ PAYME_ACCOUNT_FIELD = "id"
75
+ PAYME_ACCOUNT_MODEL = "clients.models.Client"
76
+ PAYME_ONE_TIME_PAYMENT = False
77
+ ```
78
+
79
+ Create a new View that about handling call backs
80
+ ```python
81
+ from payme.views import PaymeWebHookAPIView
82
+
83
+
84
+ class PaymeCallBackAPIView(PaymeWebHookAPIView):
85
+ def handle_created_payment(self, params, result, *args, **kwargs):
86
+ """
87
+ Handle the successful payment. You can override this method
88
+ """
89
+ print(f"Transaction created for this params: {params} and cr_result: {result}")
90
+
91
+ def handle_successfully_payment(self, params, result, *args, **kwargs):
92
+ """
93
+ Handle the successful payment. You can override this method
94
+ """
95
+ print(f"Transaction successfully performed for this params: {params} and performed_result: {result}")
96
+
97
+ def handle_cancelled_payment(self, params, result, *args, **kwargs):
98
+ """
99
+ Handle the cancelled payment. You can override this method
100
+ """
101
+ print(f"Transaction cancelled for this params: {params} and cancelled_result: {result}")
102
+ ```
103
+
104
+ Add a `payme` path to core of urlpatterns:
105
+
106
+ ```python
107
+ from django.urls import path
108
+ from django.urls import include
109
+
110
+ from your_app.views import PaymeCallBackAPIView
111
+
112
+ urlpatterns = [
113
+ ...
114
+ path("payment/update/", PaymeCallBackAPIView.as_view()),
115
+ ...
116
+ ]
117
+ ```
118
+
119
+ Run migrations
120
+ ```shell
121
+ python3 manage.py makemigrations && python manage.py migrate
122
+ ```
123
+ 🎉 Congratulations you have been integrated merchant api methods with django, keep reading docs. After successfull migrations check your admin panel and see results what happened.
124
+
125
+ ## Generate Pay Link
126
+
127
+ Example to generate link:
128
+
129
+ - Input
130
+
131
+ ```python
132
+ from payme import Payme
133
+
134
+ payme = Payme(payme_id="your-payme-id")
135
+ pay_link = payme.initializer.generate_pay_link(id=123456, amount=5000, return_url="https://example.com")
136
+ print(pay_link)
137
+ ```
138
+
139
+ - Output
140
+
141
+ ```
142
+ https://checkout.paycom.uz/bT15b3VyLXBheW1lLWlkO2FjLmlkPTEyMzQ1NjthPTUwMDAwMDtjPWh0dHBzOi8vZXhhbXBsZS5jb20=
143
+ ```
@@ -19,7 +19,7 @@ class Payme:
19
19
  ):
20
20
 
21
21
  # initialize payme network
22
- url = Networks.PROD_NET
22
+ url = Networks.PROD_NET.value
23
23
 
24
24
  if is_test_mode is True:
25
25
  url = Networks.TEST_NET.value
@@ -0,0 +1,143 @@
1
+ Metadata-Version: 2.1
2
+ Name: payme-pkg
3
+ Version: 3.0.9
4
+ Home-page: https://github.com/Muhammadali-Akbarov/payme-pkg
5
+ Author: Muhammadali Akbarov
6
+ Author-email: muhammadali17abc@gmail.com
7
+ License: MIT
8
+ Keywords: paymeuz paycomuz payme-merchant merchant-api subscribe-api payme-pkg payme-api
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE.txt
11
+ Requires-Dist: requests==2.*
12
+ Requires-Dist: dataclasses==0.*; python_version < "3.7"
13
+ Requires-Dist: djangorestframework==3.*
14
+
15
+ <h1 align="center">Payme PKG</h1>
16
+
17
+
18
+ <p align="center">
19
+ <a href="https://docs.pay-tech.uz"><img src="https://img.shields.io/static/v1?message=Documented%20on%20GitBook&logo=gitbook&logoColor=ffffff&label=%20&labelColor=5c5c5c&color=3F89A1"></a>
20
+ <a href="https://github.com/PayTechUz/payme-pkg"><img src="https://img.shields.io/badge/Open_Source-❤️-FDA599?"/></a>
21
+ <a href="t.me/+DK7n7lKx8GY5ZDZi"><img src="https://img.shields.io/badge/Community-Join%20Us-blueviolet"/></a>
22
+ <a href="https://github.com/PayTechUz/payme-pkg/issues"><img src="https://img.shields.io/github/issues/gitbookIO/gitbook"/></a>
23
+ </p>
24
+
25
+ <p align="center">Welcome to payme-pkg, the open source payme sdk for python.</p>
26
+
27
+ <p align="center">You can use for test and production mode. Join our community and ask everything you need.
28
+ </p>
29
+ <a href="https://docs.pay-tech.uz">
30
+ <p align="center">Visit to full documentation for Merchant and Subcribe Api</p>
31
+ </a>
32
+ <p align="center">
33
+ <img style="width: 60%;" src="https://i.postimg.cc/WbD32bHC/payme-pkg-demo-m4a.gif">
34
+ </p>
35
+
36
+ ## Installation
37
+
38
+ ```shell
39
+ pip install payme-pkg
40
+ ```
41
+
42
+ ## Installation to Django
43
+
44
+ Add `'payme'` in to your settings.py
45
+
46
+ ```python
47
+ INSTALLED_APPS = [
48
+ ...
49
+ 'payme',
50
+ ...
51
+ ]
52
+ ```
53
+
54
+ Add `'payme'` credentials inside to settings.py
55
+
56
+ One time payment (Однаразовый платеж) configuration settings.py
57
+
58
+ Example project: https://github.com/PayTechUz/shop-backend
59
+ ```python
60
+ PAYME_ID = "your-payme-id"
61
+ PAYME_KEY = "your-payme-key"
62
+ PAYME_ACCOUNT_FIELD = "order_id"
63
+ PAYME_AMOUNT_FIELD = "total_amount"
64
+ PAYME_ACCOUNT_MODEL = "orders.models.Orders"
65
+ PAYME_ONE_TIME_PAYMENT = True
66
+ ```
67
+
68
+ Multi payment (Накопительный) configuration settings.py
69
+
70
+ Example project: Coming soon
71
+ ```python
72
+ PAYME_ID = "your-payme-id"
73
+ PAYME_KEY = "your-payme-key"
74
+ PAYME_ACCOUNT_FIELD = "id"
75
+ PAYME_ACCOUNT_MODEL = "clients.models.Client"
76
+ PAYME_ONE_TIME_PAYMENT = False
77
+ ```
78
+
79
+ Create a new View that about handling call backs
80
+ ```python
81
+ from payme.views import PaymeWebHookAPIView
82
+
83
+
84
+ class PaymeCallBackAPIView(PaymeWebHookAPIView):
85
+ def handle_created_payment(self, params, result, *args, **kwargs):
86
+ """
87
+ Handle the successful payment. You can override this method
88
+ """
89
+ print(f"Transaction created for this params: {params} and cr_result: {result}")
90
+
91
+ def handle_successfully_payment(self, params, result, *args, **kwargs):
92
+ """
93
+ Handle the successful payment. You can override this method
94
+ """
95
+ print(f"Transaction successfully performed for this params: {params} and performed_result: {result}")
96
+
97
+ def handle_cancelled_payment(self, params, result, *args, **kwargs):
98
+ """
99
+ Handle the cancelled payment. You can override this method
100
+ """
101
+ print(f"Transaction cancelled for this params: {params} and cancelled_result: {result}")
102
+ ```
103
+
104
+ Add a `payme` path to core of urlpatterns:
105
+
106
+ ```python
107
+ from django.urls import path
108
+ from django.urls import include
109
+
110
+ from your_app.views import PaymeCallBackAPIView
111
+
112
+ urlpatterns = [
113
+ ...
114
+ path("payment/update/", PaymeCallBackAPIView.as_view()),
115
+ ...
116
+ ]
117
+ ```
118
+
119
+ Run migrations
120
+ ```shell
121
+ python3 manage.py makemigrations && python manage.py migrate
122
+ ```
123
+ 🎉 Congratulations you have been integrated merchant api methods with django, keep reading docs. After successfull migrations check your admin panel and see results what happened.
124
+
125
+ ## Generate Pay Link
126
+
127
+ Example to generate link:
128
+
129
+ - Input
130
+
131
+ ```python
132
+ from payme import Payme
133
+
134
+ payme = Payme(payme_id="your-payme-id")
135
+ pay_link = payme.initializer.generate_pay_link(id=123456, amount=5000, return_url="https://example.com")
136
+ print(pay_link)
137
+ ```
138
+
139
+ - Output
140
+
141
+ ```
142
+ https://checkout.paycom.uz/bT15b3VyLXBheW1lLWlkO2FjLmlkPTEyMzQ1NjthPTUwMDAwMDtjPWh0dHBzOi8vZXhhbXBsZS5jb20=
143
+ ```
@@ -1,9 +1,13 @@
1
+ import pathlib
1
2
  from setuptools import setup, find_packages
2
3
 
4
+ here = pathlib.Path(__file__).parent.resolve()
5
+
6
+ long_description = (here / "README.md").read_text(encoding="utf-8")
3
7
 
4
8
  setup(
5
9
  name='payme-pkg',
6
- version='3.0.7',
10
+ version='3.0.9',
7
11
  license='MIT',
8
12
  author="Muhammadali Akbarov",
9
13
  author_email='muhammadali17abc@gmail.com',
@@ -15,4 +19,6 @@ setup(
15
19
  "dataclasses==0.*;python_version<'3.7'", # will only install on py3.6
16
20
  'djangorestframework==3.*'
17
21
  ],
22
+ long_description=long_description,
23
+ long_description_content_type="text/markdown",
18
24
  )
payme_pkg-3.0.7/PKG-INFO DELETED
@@ -1,12 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: payme-pkg
3
- Version: 3.0.7
4
- Home-page: https://github.com/Muhammadali-Akbarov/payme-pkg
5
- Author: Muhammadali Akbarov
6
- Author-email: muhammadali17abc@gmail.com
7
- License: MIT
8
- Keywords: paymeuz paycomuz payme-merchant merchant-api subscribe-api payme-pkg payme-api
9
- License-File: LICENSE.txt
10
- Requires-Dist: requests==2.*
11
- Requires-Dist: dataclasses==0.*; python_version < "3.7"
12
- Requires-Dist: djangorestframework==3.*
@@ -1,12 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: payme-pkg
3
- Version: 3.0.7
4
- Home-page: https://github.com/Muhammadali-Akbarov/payme-pkg
5
- Author: Muhammadali Akbarov
6
- Author-email: muhammadali17abc@gmail.com
7
- License: MIT
8
- Keywords: paymeuz paycomuz payme-merchant merchant-api subscribe-api payme-pkg payme-api
9
- License-File: LICENSE.txt
10
- Requires-Dist: requests==2.*
11
- Requires-Dist: dataclasses==0.*; python_version < "3.7"
12
- Requires-Dist: djangorestframework==3.*
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