payme-pkg 2.1__tar.gz → 2.5.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.

Potentially problematic release.


This version of payme-pkg might be problematic. Click here for more details.

Files changed (51) hide show
  1. {payme-pkg-2.1 → payme-pkg-2.5.3}/PKG-INFO +1 -1
  2. {payme-pkg-2.1 → payme-pkg-2.5.3}/README.md +233 -106
  3. payme-pkg-2.5.3/lib/payme/admin.py +11 -0
  4. {payme-pkg-2.1 → payme-pkg-2.5.3}/lib/payme/apps.py +4 -0
  5. payme-pkg-2.5.3/lib/payme/cards/__init__.py +1 -0
  6. payme-pkg-2.5.3/lib/payme/cards/subscribe_cards.py +166 -0
  7. payme-pkg-2.5.3/lib/payme/decorators/decorators.py +34 -0
  8. {payme-pkg-2.1 → payme-pkg-2.5.3}/lib/payme/errors/exceptions.py +30 -0
  9. {payme-pkg-2.1 → payme-pkg-2.5.3}/lib/payme/methods/cancel_transaction.py +17 -10
  10. {payme-pkg-2.1 → payme-pkg-2.5.3}/lib/payme/methods/check_perform_transaction.py +9 -2
  11. {payme-pkg-2.1 → payme-pkg-2.5.3}/lib/payme/methods/check_transaction.py +16 -20
  12. {payme-pkg-2.1 → payme-pkg-2.5.3}/lib/payme/methods/create_transaction.py +13 -4
  13. {payme-pkg-2.1 → payme-pkg-2.5.3}/lib/payme/methods/generate_link.py +38 -16
  14. payme-pkg-2.5.3/lib/payme/methods/get_statement.py +65 -0
  15. {payme-pkg-2.1 → payme-pkg-2.5.3}/lib/payme/methods/perform_transaction.py +14 -14
  16. {payme-pkg-2.1 → payme-pkg-2.5.3}/lib/payme/migrations/0001_initial.py +15 -8
  17. payme-pkg-2.5.3/lib/payme/models.py +61 -0
  18. payme-pkg-2.5.3/lib/payme/receipts/__init__.py +1 -0
  19. payme-pkg-2.5.3/lib/payme/receipts/subscribe_receipts.py +217 -0
  20. payme-pkg-2.5.3/lib/payme/serializers.py +88 -0
  21. payme-pkg-2.5.3/lib/payme/utils/__init__.py +0 -0
  22. {payme-pkg-2.1 → payme-pkg-2.5.3}/lib/payme/utils/get_params.py +3 -2
  23. payme-pkg-2.5.3/lib/payme/utils/logging.py +9 -0
  24. payme-pkg-2.5.3/lib/payme/utils/make_aware_datetime.py +21 -0
  25. payme-pkg-2.5.3/lib/payme/utils/to_json.py +12 -0
  26. payme-pkg-2.5.3/lib/payme/views.py +163 -0
  27. {payme-pkg-2.1 → payme-pkg-2.5.3}/lib/payme_pkg.egg-info/PKG-INFO +1 -1
  28. {payme-pkg-2.1 → payme-pkg-2.5.3}/lib/payme_pkg.egg-info/SOURCES.txt +6 -1
  29. payme-pkg-2.5.3/lib/payme_pkg.egg-info/requires.txt +3 -0
  30. {payme-pkg-2.1 → payme-pkg-2.5.3}/setup.py +3 -2
  31. payme-pkg-2.1/lib/payme/admin.py +0 -7
  32. payme-pkg-2.1/lib/payme/cards/__init__.py +0 -1
  33. payme-pkg-2.1/lib/payme/cards/subscribe_cards.py +0 -139
  34. payme-pkg-2.1/lib/payme/models.py +0 -30
  35. payme-pkg-2.1/lib/payme/receipts/__init__.py +0 -1
  36. payme-pkg-2.1/lib/payme/receipts/subscribe_receipts.py +0 -180
  37. payme-pkg-2.1/lib/payme/serializers.py +0 -56
  38. payme-pkg-2.1/lib/payme/utils/logger.py +0 -26
  39. payme-pkg-2.1/lib/payme/views.py +0 -127
  40. payme-pkg-2.1/lib/payme_pkg.egg-info/requires.txt +0 -2
  41. {payme-pkg-2.1 → payme-pkg-2.5.3}/LICENSE.txt +0 -0
  42. {payme-pkg-2.1 → payme-pkg-2.5.3}/lib/payme/__init__.py +0 -0
  43. {payme-pkg-2.1/lib/payme/errors → payme-pkg-2.5.3/lib/payme/decorators}/__init__.py +0 -0
  44. {payme-pkg-2.1/lib/payme/methods → payme-pkg-2.5.3/lib/payme/errors}/__init__.py +0 -0
  45. {payme-pkg-2.1/lib/payme/migrations → payme-pkg-2.5.3/lib/payme/methods}/__init__.py +0 -0
  46. {payme-pkg-2.1/lib/payme/utils → payme-pkg-2.5.3/lib/payme/migrations}/__init__.py +0 -0
  47. {payme-pkg-2.1 → payme-pkg-2.5.3}/lib/payme/urls.py +0 -0
  48. {payme-pkg-2.1 → payme-pkg-2.5.3}/lib/payme/utils/support.py +0 -0
  49. {payme-pkg-2.1 → payme-pkg-2.5.3}/lib/payme_pkg.egg-info/dependency_links.txt +0 -0
  50. {payme-pkg-2.1 → payme-pkg-2.5.3}/lib/payme_pkg.egg-info/top_level.txt +0 -0
  51. {payme-pkg-2.1 → payme-pkg-2.5.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: payme-pkg
3
- Version: 2.1
3
+ Version: 2.5.3
4
4
  Summary: UNKNOWN
5
5
  Home-page: https://github.com/Muhammadali-Akbarov/payme-pkg
6
6
  Author: Muhammadali Akbarov
@@ -1,43 +1,54 @@
1
1
  # Payme Uzbekistan Integration Uzcard and Humo
2
2
  <p align="center">
3
- <img style="width: 70%;" src="https://www.gazeta.uz/media/img/2019/07/GDpmEM15631750293941_b.jpg"></img>
3
+ <a href="https://youtu.be/r2RO3kJVP7g">
4
+ <img style="width: 60%;" src="https://i.postimg.cc/WbD32bHC/payme-pkg-demo-m4a.gif">
5
+ </a>
4
6
  </p>
5
-
7
+ Support Group - <a href="https://t.me/+Ng1axYLNyBAyYTRi">Telegram</a> <br/>
8
+ YouTube - <a href="https://youtu.be/sJORIyykHcw">Watch Video</a><br/>
9
+ Implementation Sample - https://github.com/PayTechUz/payme-sample
6
10
 
7
11
  ## Installation
8
12
 
13
+ ```shell
14
+ pip install payme-pkg
9
15
  ```
10
- $ pip install payme-pkg
11
- ```
16
+
12
17
  ### Test-Credentials
18
+
13
19
  ```
14
- Card Numer: 8600 4954 7331 6478 Expire Date: 03/99 SMS Code: 666666
15
- Card Numer: 8600 0691 9540 6311 Expire Date: 03/99 SMS Code: 666666
20
+ Card Numer: 8600 4954 7331 6478 Expire Date: 03/99 SMS Code: 666666
21
+ Card Numer: 8600 0691 9540 6311 Expire Date: 03/99 SMS Code: 666666
16
22
  ```
17
23
 
18
24
  ## Documentation
19
- * [Merchant API](#merchant-api)
20
- * Subscribe Cards
21
- * [Cards Create](#cards-create)
22
- * [Cards Get Verify Code](#cards-get-verify-code)
23
- * [Cards Verify](#cards-verify)
24
- * [Cards Check](#cards-check)
25
- * [Cards Remove](#cards-remove)
26
-
27
- * Subscribe Receipts
28
- * [Receipts Create](#receipts-create)
29
- * [Receipts Pay](#receipts-pay)
30
- * [Receipts Send](#receipts-send)
31
- * [Receipts Cancel](#receipts-cancel)
32
- * [Receipts Check](#receipts-check)
33
- * [Receipts Get](#receipts-get)
34
- * [Receipts Get All ](#receipts-get-all)
25
+
26
+ - [Merchant API](#merchant-api)
27
+ - [Generate Pay Link](#generate-pay-link)
28
+
29
+ - Subscribe Cards
30
+
31
+ - [Cards Create](#cards-create)
32
+ - [Cards Get Verify Code](#cards-get-verify-code)
33
+ - [Cards Verify](#cards-verify)
34
+ - [Cards Check](#cards-check)
35
+ - [Cards Remove](#cards-remove)
36
+
37
+ - Subscribe Receipts
38
+ - [Receipts Create](#receipts-create)
39
+ - [Receipts Pay](#receipts-pay)
40
+ - [Receipts Send](#receipts-send)
41
+ - [Receipts Cancel](#receipts-cancel)
42
+ - [Receipts Check](#receipts-check)
43
+ - [Receipts Get](#receipts-get)
44
+ - [Receipts Get All ](#receipts-get-all)
35
45
 
36
46
  # Merchant API
37
47
 
38
48
  ## Installation to Django
39
49
 
40
50
  Add `'payme'` in to your settings.
51
+
41
52
  ```python
42
53
  INSTALLED_APPS = [
43
54
  ...
@@ -45,7 +56,9 @@ INSTALLED_APPS = [
45
56
  ...
46
57
  ]
47
58
  ```
59
+
48
60
  Add `'payme'` credentials inside to settings.
61
+
49
62
  ```python
50
63
  PAYME: dict = {
51
64
  'PAYME_ID': 'payme-id',
@@ -55,51 +68,102 @@ PAYME: dict = {
55
68
  'PAYME_MIN_AMOUNT': 'payme-min-amount', # integer field
56
69
  'PAYME_ACCOUNT': 'order-id',
57
70
  }
71
+
72
+ ORDER_MODEL = 'your_app.models.Your_Order_Model'
58
73
  ```
74
+
75
+ Create a new View that about handling call backs
76
+ ```python
77
+ from payme.views import MerchantAPIView
78
+
79
+
80
+ class PaymeCallBackAPIView(MerchantAPIView):
81
+ def create_transaction(self, order_id, action, *args, **kwargs) -> None:
82
+ print(f"create_transaction for order_id: {order_id}, response: {action}")
83
+
84
+ def perform_transaction(self, order_id, action, *args, **kwargs) -> None:
85
+ print(f"perform_transaction for order_id: {order_id}, response: {action}")
86
+
87
+ def cancel_transaction(self, order_id, action, *args, **kwargs) -> None:
88
+ print(f"cancel_transaction for order_id: {order_id}, response: {action}")
89
+ ```
90
+
59
91
  Add a `payme` path to core of urlpatterns:
92
+
60
93
  ```python
61
94
  from django.urls import path
62
95
  from django.urls import include
63
96
 
97
+ from your_app.views import PaymeCallBackAPIView
98
+
64
99
  urlpatterns = [
65
100
  ...
66
- path("payments/", include("payme.urls"))
101
+ path("payments/merchant/", PaymeCallBackAPIView.as_view()),
67
102
  ...
68
103
  ]
69
104
  ```
105
+
70
106
  Run migrations
107
+
108
+ ```shell
109
+ python manage.py migrate
110
+ ```
111
+
112
+ 🎉 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.
113
+
114
+ ## Generate Pay Link
115
+
116
+ Example to generate link:
117
+
118
+ - Input
119
+
120
+ ```python
121
+ from pprint import pprint
122
+
123
+ from payme.methods.generate_link import GeneratePayLink
124
+
125
+ pay_link = GeneratePayLink(
126
+ order_id=999,
127
+ amount=9999
128
+ ).generate_link()
129
+
130
+ pprint(pay_link)
71
131
  ```
72
- $ python manage.py migrate
132
+
133
+ - Output
134
+
135
+ ```
136
+ Link: https://checkout.paycom.uz/bT01ZTczMGU4ZTBiODUyYTQxN2FhNDljZWI7YWMub3JkZXItaWQ9OTk5O2E9OTk5OTtjPXlvdXItY2FsbGJhY2stdXJs
73
137
  ```
74
- 🎉 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.
75
138
 
76
139
  ## Cards Create
140
+
77
141
  Example for cards create method for to generate token from card:
78
142
 
79
- * Request
143
+ - Request
80
144
 
81
- ```
145
+ ```python
82
146
  from pprint import pprint
83
147
 
84
148
  from payme.cards.subscribe_cards import PaymeSubscribeCards
85
149
 
86
-
87
150
  client = PaymeSubscribeCards(
88
151
  base_url="https://checkout.test.paycom.uz/api/",
89
- paycom_id="5e730e8e0b852a417aa49ceb"
152
+ paycom_id=$paycom_id
90
153
  )
91
154
 
92
- resp = client._cards_create(
155
+ resp = client.cards_create(
93
156
  number="8600069195406311",
94
157
  expire="0399",
95
- save=True,
158
+ save=True
96
159
  )
97
160
 
98
161
  pprint(resp)
99
162
  ```
100
- * Response
101
163
 
102
- ```
164
+ - Response
165
+
166
+ ```json
103
167
  {
104
168
  "jsonrpc": "2.0",
105
169
  "result": {
@@ -116,9 +180,12 @@ pprint(resp)
116
180
  ```
117
181
 
118
182
  ## Cards Get Verify Code
183
+
119
184
  Example for cards get verify:
120
- * Request
121
- ```
185
+
186
+ - Request
187
+
188
+ ```python
122
189
  from pprint import pprint
123
190
 
124
191
  from payme.cards.subscribe_cards import PaymeSubscribeCards
@@ -126,17 +193,19 @@ from payme.cards.subscribe_cards import PaymeSubscribeCards
126
193
 
127
194
  client = PaymeSubscribeCards(
128
195
  base_url="https://checkout.test.paycom.uz/api/",
129
- paycom_id="5e730e8e0b852a417aa49ceb"
196
+ paycom_id=$paycom_id
130
197
  )
131
198
 
132
- resp = client._card_get_verify_code(
199
+ resp = client.card_get_verify_code(
133
200
  token="630e5ffdd15d8d8d093b379b_2fsaoABWafecn20kofV4PFafFZjeGDWS9adM1PmboQaEZbbaxMcnaskctMbU9Iv8qgrOuKGz8SnjvZvYXDK64m1eS9gA5jZ7BBRaQybMXrDPtFPJ1fwek5B1KoIv5cMiCWYXj7ezpYEdJAKTIQw0Np9HsTXjqco4gQG3m8MOfeH9ovkdm66O6yj45oKXRmJyAK5i0SchXNNomACH3Oq80KyoRE1VoBRxvoKyMkOx0xcepXovxK9d3v26a8z7UtyokwY33N8MupviM3A5WHB5Xh35WZJJyFnxTSi1vvnYnG7uVd6Bb1GjV2yAHnimss8aEZGW5V7ZiPrhf8r6WJAeHciYDGK3msRKZJBQTfjgOdE9tGrEnMezVkxr1JXX0xSn5qqec2"
134
201
  )
135
202
 
136
203
  pprint(resp)
137
204
  ```
138
- * Response
139
- ```
205
+
206
+ - Response
207
+
208
+ ```json
140
209
  {
141
210
  "jsonrpc": "2.0",
142
211
  "result": {
@@ -148,9 +217,12 @@ pprint(resp)
148
217
  ```
149
218
 
150
219
  ## Cards Verify
220
+
151
221
  Example for cards verify method:
152
- * Request
153
- ```
222
+
223
+ - Request
224
+
225
+ ```python
154
226
  from pprint import pprint
155
227
 
156
228
  from payme.cards.subscribe_cards import PaymeSubscribeCards
@@ -158,18 +230,20 @@ from payme.cards.subscribe_cards import PaymeSubscribeCards
158
230
 
159
231
  client = PaymeSubscribeCards(
160
232
  base_url="https://checkout.test.paycom.uz/api/",
161
- paycom_id="5e730e8e0b852a417aa49ceb"
233
+ paycom_id=$paycom_id
162
234
  )
163
235
 
164
- resp = client._cards_verify(
236
+ resp = client.cards_verify(
165
237
  verify_code="666666",
166
238
  token="630e691fd15d8d8d093b379c_70mKyzqS8d1wTWzovIGjt9dKmjpn1KI8Y9XakPrfpbUASTBaZYbC1DjDcjYRmuNJep9gZrTRtHyEGBQYmBaPufuozF51bv4qEPsQnodq1VcD7tYyREwUXjMXXZUeu7Ek0REQCekCvVHX6rtNBpb4vtViJoNVjp94XpTqu0Bn3yYYb0CHu951wFydzRsieGxjGNrvx1oKyBcq0CdOUwoffRIt2VPvx5R2aVmc6ahwyhn387FEEcpO1PnjIJkWKTBWdI35ZPQnb1u1oss5aPg06E279THXRkoTThixbeqiD2JkWSXweNVGGDhTS30V4j61G3NWEPO2H3k4uFmCjjIQSzx4TxKzUgHg1i2q953PRUGjT4JZBRHMDxaN5tWuctEMNmY06p"
167
239
  )
168
240
 
169
241
  pprint(resp)
170
242
  ```
171
- * Response
172
- ```
243
+
244
+ - Response
245
+
246
+ ```json
173
247
  {
174
248
  "jsonrpc": "2.0",
175
249
  "result": {
@@ -186,9 +260,12 @@ pprint(resp)
186
260
  ```
187
261
 
188
262
  ## Cards Check
263
+
189
264
  Example for cards check:
190
- * Request
191
- ```
265
+
266
+ - Request
267
+
268
+ ```python
192
269
  from pprint import pprint
193
270
 
194
271
  from payme.cards.subscribe_cards import PaymeSubscribeCards
@@ -196,17 +273,19 @@ from payme.cards.subscribe_cards import PaymeSubscribeCards
196
273
 
197
274
  client = PaymeSubscribeCards(
198
275
  base_url="https://checkout.test.paycom.uz/api/",
199
- paycom_id="5e730e8e0b852a417aa49ceb"
276
+ paycom_id=$paycom_id
200
277
  )
201
278
 
202
- resp = client._cards_check(
279
+ resp = client.cards_check(
203
280
  token="630e691fd15d8d8d093b379c_70mKyzqS8d1wTWzovIGjt9dKmjpn1KI8Y9XakPrfpbUASTBaZYbC1DjDcjYRmuNJep9gZrTRtHyEGBQYmBaPufuozF51bv4qEPsQnodq1VcD7tYyREwUXjMXXZUeu7Ek0REQCekCvVHX6rtNBpb4vtViJoNVjp94XpTqu0Bn3yYYb0CHu951wFydzRsieGxjGNrvx1oKyBcq0CdOUwoffRIt2VPvx5R2aVmc6ahwyhn387FEEcpO1PnjIJkWKTBWdI35ZPQnb1u1oss5aPg06E279THXRkoTThixbeqiD2JkWSXweNVGGDhTS30V4j61G3NWEPO2H3k4uFmCjjIQSzx4TxKzUgHg1i2q953PRUGjT4JZBRHMDxaN5tWuctEMNmY06p"
204
281
  )
205
282
 
206
283
  pprint(resp)
207
284
  ```
208
- * Response
209
- ```
285
+
286
+ - Response
287
+
288
+ ```json
210
289
  {
211
290
  "jsonrpc": "2.0",
212
291
  "result": {
@@ -221,10 +300,14 @@ pprint(resp)
221
300
  }
222
301
  }
223
302
  ```
303
+
224
304
  ## Cards Remove
305
+
225
306
  Example for cards create method for to generate token from card:
226
- * Request
227
- ```
307
+
308
+ - Request
309
+
310
+ ```python
228
311
  from pprint import pprint
229
312
 
230
313
  from payme.cards.subscribe_cards import PaymeSubscribeCards
@@ -232,17 +315,19 @@ from payme.cards.subscribe_cards import PaymeSubscribeCards
232
315
 
233
316
  client = PaymeSubscribeCards(
234
317
  base_url="https://checkout.test.paycom.uz/api/",
235
- paycom_id="5e730e8e0b852a417aa49ceb"
318
+ paycom_id=$paycom_id
236
319
  )
237
320
 
238
- resp = client._cards_check(
321
+ resp = client.cards_remove(
239
322
  token="630e691fd15d8d8d093b379c_70mKyzqS8d1wTWzovIGjt9dKmjpn1KI8Y9XakPrfpbUASTBaZYbC1DjDcjYRmuNJep9gZrTRtHyEGBQYmBaPufuozF51bv4qEPsQnodq1VcD7tYyREwUXjMXXZUeu7Ek0REQCekCvVHX6rtNBpb4vtViJoNVjp94XpTqu0Bn3yYYb0CHu951wFydzRsieGxjGNrvx1oKyBcq0CdOUwoffRIt2VPvx5R2aVmc6ahwyhn387FEEcpO1PnjIJkWKTBWdI35ZPQnb1u1oss5aPg06E279THXRkoTThixbeqiD2JkWSXweNVGGDhTS30V4j61G3NWEPO2H3k4uFmCjjIQSzx4TxKzUgHg1i2q953PRUGjT4JZBRHMDxaN5tWuctEMNmY06p"
240
323
  )
241
324
 
242
325
  pprint(resp)
243
326
  ```
244
- * Response
245
- ```
327
+
328
+ - Response
329
+
330
+ ```json
246
331
  {
247
332
  "jsonrpc": "2.0",
248
333
  "result": {
@@ -250,10 +335,14 @@ pprint(resp)
250
335
  }
251
336
  }
252
337
  ```
338
+
253
339
  ## Receipts Create
340
+
254
341
  Example for receipts create method:
255
- * Request
256
- ```
342
+
343
+ - Request
344
+
345
+ ```python
257
346
  from pprint import pprint
258
347
 
259
348
  from payme.receipts.subscribe_receipts import PaymeSubscribeReceipts
@@ -261,19 +350,21 @@ from payme.receipts.subscribe_receipts import PaymeSubscribeReceipts
261
350
 
262
351
  rclient = PaymeSubscribeReceipts(
263
352
  base_url="https://checkout.test.paycom.uz/api/",
264
- paycom_id="5e730e8e0b852a417aa49ceb",
265
- paycom_key="#MWnwHNYATJo%W@XvO5nISiY&mG7PEuzDX18"
353
+ paycom_id=$paycom_id,
354
+ paycom_key=$paycom_key
266
355
  )
267
356
 
268
- resp = rclient._receipts_create(
357
+ resp = rclient.receipts_create(
269
358
  amount=10000,
270
359
  order_id="1"
271
360
  )
272
361
 
273
362
  pprint(resp)
274
363
  ```
275
- * Response
276
- ```
364
+
365
+ - Response
366
+
367
+ ```json
277
368
  {
278
369
  "jsonrpc": "2.0",
279
370
  "result": {
@@ -326,10 +417,14 @@ pprint(resp)
326
417
  }
327
418
  }
328
419
  ```
420
+
329
421
  ## Receipts Pay
422
+
330
423
  Example for receipts pay method:
331
- * Request
332
- ```
424
+
425
+ - Request
426
+
427
+ ```python
333
428
  from pprint import pprint
334
429
 
335
430
  from payme.receipts.subscribe_receipts import PaymeSubscribeReceipts
@@ -337,11 +432,11 @@ from payme.receipts.subscribe_receipts import PaymeSubscribeReceipts
337
432
 
338
433
  rclient = PaymeSubscribeReceipts(
339
434
  base_url="https://checkout.test.paycom.uz/api/",
340
- paycom_id="5e730e8e0b852a417aa49ceb",
341
- paycom_key="#MWnwHNYATJo%W@XvO5nISiY&mG7PEuzDX18"
435
+ paycom_id=$paycom_id,
436
+ paycom_key=$paycom_key
342
437
  )
343
438
 
344
- resp = rclient._receipts_pay(
439
+ resp = rclient.receipts_pay(
345
440
  invoice_id="631186b6c4420cbf2712a243",
346
441
  token="63118a5dd15d8d8d093b37b7_X2j34OIJPnROfsgzYZCZ0w7OcC50zzwiowTsotEVO1uUbxkzaDrvdOno6jicQTrcRmxvibxrye4vUS3AynTNPaPCTGpfk3RCKmT9NaOAyyTmctAjWsjwvqGR5XUzAP1Xcx12GkhuQi6VJ4BeaIXOokSRu06rRjaivmJQ8HTiJiR9b3OmZtrhkIRNcNXnnp9zYm1mFP4BuqGpS8BMnY0ASIE6ffxWykjgBcDTAfWBFt4mg7O9Dsvx0aj3IB8z3RIbZYtDZJnUVhCZrwW7ONVI9uEAdxNthorjO6PbV7TQ8XCjrztgGf6uCtOwwxasiIUVZN6tCVDk8A8NvVSUzUHXQHVkaPn5heJNa3K4WsffIckq7SwMbiw3UbawipeZKyD3iwk1Km",
347
442
  phone="998901304527"
@@ -349,8 +444,10 @@ resp = rclient._receipts_pay(
349
444
 
350
445
  pprint(resp)
351
446
  ```
352
- * Response
353
- ```
447
+
448
+ - Response
449
+
450
+ ```json
354
451
  {
355
452
  "jsonrpc": "2.0",
356
453
  "id": 123,
@@ -407,10 +504,14 @@ pprint(resp)
407
504
  }
408
505
  }
409
506
  ```
507
+
410
508
  ## Receipts Send
509
+
411
510
  Example for receipts send method:
412
- * Request
413
- ```
511
+
512
+ - Request
513
+
514
+ ```python
414
515
  from pprint import pprint
415
516
 
416
517
  from payme.receipts.subscribe_receipts import PaymeSubscribeReceipts
@@ -418,19 +519,21 @@ from payme.receipts.subscribe_receipts import PaymeSubscribeReceipts
418
519
 
419
520
  rclient = PaymeSubscribeReceipts(
420
521
  base_url="https://checkout.test.paycom.uz/api/",
421
- paycom_id="5e730e8e0b852a417aa49ceb",
422
- paycom_key="#MWnwHNYATJo%W@XvO5nISiY&mG7PEuzDX18"
522
+ paycom_id=$paycom_id,
523
+ paycom_key=$paycom_key
423
524
  )
424
525
 
425
- resp = rclient._receipts_send(
526
+ resp = rclient.receipts_send(
426
527
  invoice_id="631186b6c4420cbf2712a243",
427
528
  phone="998901304527"
428
529
  )
429
530
 
430
531
  pprint(resp)
431
532
  ```
432
- * Response
433
- ```
533
+
534
+ - Response
535
+
536
+ ```json
434
537
  {
435
538
  "jsonrpc": "2.0",
436
539
  "id": 123,
@@ -439,10 +542,14 @@ pprint(resp)
439
542
  }
440
543
  }
441
544
  ```
545
+
442
546
  ## Receipts Cancel
547
+
443
548
  Example for receipts cancel method:
444
- * Request
445
- ```
549
+
550
+ - Request
551
+
552
+ ```python
446
553
  from pprint import pprint
447
554
 
448
555
  from payme.receipts.subscribe_receipts import PaymeSubscribeReceipts
@@ -450,18 +557,20 @@ from payme.receipts.subscribe_receipts import PaymeSubscribeReceipts
450
557
 
451
558
  rclient = PaymeSubscribeReceipts(
452
559
  base_url="https://checkout.test.paycom.uz/api/",
453
- paycom_id="5e730e8e0b852a417aa49ceb",
454
- paycom_key="#MWnwHNYATJo%W@XvO5nISiY&mG7PEuzDX18"
560
+ paycom_id=$paycom_id,
561
+ paycom_key=$paycom_key
455
562
  )
456
563
 
457
- resp = rclient._receipts_cancel(
564
+ resp = rclient.receipts_cancel(
458
565
  invoice_id="63119303c4420cbf2712a245"
459
566
  )
460
567
 
461
568
  pprint(resp)
462
569
  ```
463
- * Response
464
- ```
570
+
571
+ - Response
572
+
573
+ ```json
465
574
  {
466
575
  "jsonrpc": "2.0",
467
576
  "id": 123,
@@ -519,10 +628,14 @@ pprint(resp)
519
628
  }
520
629
  }
521
630
  ```
631
+
522
632
  ## Receipts Check
633
+
523
634
  Example for receipts check method:
524
- * Request
525
- ```
635
+
636
+ - Request
637
+
638
+ ```python
526
639
  from pprint import pprint
527
640
 
528
641
  from payme.receipts.subscribe_receipts import PaymeSubscribeReceipts
@@ -530,18 +643,20 @@ from payme.receipts.subscribe_receipts import PaymeSubscribeReceipts
530
643
 
531
644
  rclient = PaymeSubscribeReceipts(
532
645
  base_url="https://checkout.test.paycom.uz/api/",
533
- paycom_id="5e730e8e0b852a417aa49ceb",
534
- paycom_key="#MWnwHNYATJo%W@XvO5nISiY&mG7PEuzDX18"
646
+ paycom_id=$paycom_id,
647
+ paycom_key=$paycom_key
535
648
  )
536
649
 
537
- resp = rclient._receipts_check(
650
+ resp = rclient.receipts_check(
538
651
  invoice_id="63119303c4420cbf2712a245"
539
652
  )
540
653
 
541
654
  pprint(resp)
542
655
  ```
543
- * Response
544
- ```
656
+
657
+ - Response
658
+
659
+ ```json
545
660
  {
546
661
  "jsonrpc": "2.0",
547
662
  "id": 123,
@@ -550,10 +665,14 @@ pprint(resp)
550
665
  }
551
666
  }
552
667
  ```
668
+
553
669
  ## Receipts Get
670
+
554
671
  Example for receipts get method:
555
- * Request
556
- ```
672
+
673
+ - Request
674
+
675
+ ```python
557
676
  from pprint import pprint
558
677
 
559
678
  from payme.receipts.subscribe_receipts import PaymeSubscribeReceipts
@@ -561,18 +680,20 @@ from payme.receipts.subscribe_receipts import PaymeSubscribeReceipts
561
680
 
562
681
  rclient = PaymeSubscribeReceipts(
563
682
  base_url="https://checkout.test.paycom.uz/api/",
564
- paycom_id="5e730e8e0b852a417aa49ceb",
565
- paycom_key="#MWnwHNYATJo%W@XvO5nISiY&mG7PEuzDX18"
683
+ paycom_id=$paycom_id,
684
+ paycom_key=$paycom_key
566
685
  )
567
686
 
568
- resp = rclient._reciepts_get(
687
+ resp = rclient.reciepts_get(
569
688
  invoice_id="6311946bc4420cbf2712a247"
570
689
  )
571
690
 
572
691
  pprint(resp)
573
692
  ```
574
- * Response
575
- ```
693
+
694
+ - Response
695
+
696
+ ```json
576
697
  {
577
698
  "jsonrpc": "2.0",
578
699
  "id": 123,
@@ -626,10 +747,14 @@ pprint(resp)
626
747
  }
627
748
  }
628
749
  ```
750
+
629
751
  ## Receipts Get All
752
+
630
753
  Example for receipts get all method:
631
- * Request
632
- ```
754
+
755
+ - Request
756
+
757
+ ```python
633
758
  from pprint import pprint
634
759
 
635
760
  from payme.receipts.subscribe_receipts import PaymeSubscribeReceipts
@@ -637,11 +762,11 @@ from payme.receipts.subscribe_receipts import PaymeSubscribeReceipts
637
762
 
638
763
  rclient = PaymeSubscribeReceipts(
639
764
  base_url="https://checkout.test.paycom.uz/api/",
640
- paycom_id="5e730e8e0b852a417aa49ceb",
641
- paycom_key="#MWnwHNYATJo%W@XvO5nISiY&mG7PEuzDX18"
765
+ paycom_id=$paycom_id,
766
+ paycom_key=$paycom_key
642
767
  )
643
768
 
644
- resp = rclient._reciepts_get_all(
769
+ resp = rclient.reciepts_get_all(
645
770
  count=2,
646
771
  _from=1636398000000,
647
772
  to=1636398000000,
@@ -650,8 +775,10 @@ resp = rclient._reciepts_get_all(
650
775
 
651
776
  pprint(resp)
652
777
  ```
653
- * Response
654
- ```
778
+
779
+ - Response
780
+
781
+ ```json
655
782
  {
656
783
  "jsonrpc": "2.0",
657
784
  "id": 123,
@@ -0,0 +1,11 @@
1
+ from django.contrib import admin
2
+
3
+ from payme.models import CUSTOM_ORDER
4
+ from payme.models import Order as DefaultOrderModel
5
+
6
+ from payme.models import MerchatTransactionsModel
7
+
8
+ if not CUSTOM_ORDER:
9
+ admin.site.register(DefaultOrderModel)
10
+
11
+ admin.site.register(MerchatTransactionsModel)
@@ -2,5 +2,9 @@ from django.apps import AppConfig
2
2
 
3
3
 
4
4
  class PaymeConfig(AppConfig):
5
+ """
6
+ PaymeConfig AppConfig \
7
+ That is used to configure the payme application with django settings.
8
+ """
5
9
  default_auto_field = 'django.db.models.BigAutoField'
6
10
  name = 'payme'
@@ -0,0 +1 @@
1
+ from .import subscribe_cards