paytechuz 0.2.3__py3-none-any.whl → 0.2.5__py3-none-any.whl
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 paytechuz might be problematic. Click here for more details.
- paytechuz/integrations/django/views.py +2 -2
- {paytechuz-0.2.3.dist-info → paytechuz-0.2.5.dist-info}/METADATA +17 -4
- {paytechuz-0.2.3.dist-info → paytechuz-0.2.5.dist-info}/RECORD +5 -5
- {paytechuz-0.2.3.dist-info → paytechuz-0.2.5.dist-info}/WHEEL +0 -0
- {paytechuz-0.2.3.dist-info → paytechuz-0.2.5.dist-info}/top_level.txt +0 -0
|
@@ -10,7 +10,7 @@ from .webhooks import PaymeWebhook, ClickWebhook
|
|
|
10
10
|
logger = logging.getLogger(__name__)
|
|
11
11
|
|
|
12
12
|
@method_decorator(csrf_exempt, name='dispatch')
|
|
13
|
-
class
|
|
13
|
+
class BasePaymeWebhookView(PaymeWebhook):
|
|
14
14
|
"""
|
|
15
15
|
Default Payme webhook view.
|
|
16
16
|
|
|
@@ -55,7 +55,7 @@ class PaymeWebhookView(PaymeWebhook):
|
|
|
55
55
|
logger.info(f"Payme payment cancelled: {transaction.transaction_id}")
|
|
56
56
|
|
|
57
57
|
@method_decorator(csrf_exempt, name='dispatch')
|
|
58
|
-
class
|
|
58
|
+
class BaseClickWebhookView(ClickWebhook):
|
|
59
59
|
"""
|
|
60
60
|
Default Click webhook view.
|
|
61
61
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: paytechuz
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.5
|
|
4
4
|
Summary: Unified Python package for Uzbekistan payment gateways
|
|
5
5
|
Home-page: https://github.com/Muhammadali-Akbarov/paytechuz
|
|
6
6
|
Author: Muhammadali Akbarov
|
|
@@ -66,8 +66,8 @@ payme_link = payme.create_payment(
|
|
|
66
66
|
)
|
|
67
67
|
|
|
68
68
|
click_link = click.create_payment(
|
|
69
|
+
id="order_123",
|
|
69
70
|
amount=150000, # amount in UZS
|
|
70
|
-
account_id="order_123",
|
|
71
71
|
description="Test payment",
|
|
72
72
|
return_url="https://example.com/return"
|
|
73
73
|
)
|
|
@@ -102,10 +102,10 @@ CLICK_COMMISSION_PERCENT = 0.0
|
|
|
102
102
|
|
|
103
103
|
```python
|
|
104
104
|
# views.py
|
|
105
|
-
from paytechuz.integrations.django.views import
|
|
105
|
+
from paytechuz.integrations.django.views import BasePaymeWebhookView
|
|
106
106
|
from .models import Order
|
|
107
107
|
|
|
108
|
-
class PaymeWebhookView(
|
|
108
|
+
class PaymeWebhookView(BasePaymeWebhookView):
|
|
109
109
|
def successfully_payment(self, params, transaction):
|
|
110
110
|
order = Order.objects.get(id=transaction.account_id)
|
|
111
111
|
order.status = 'paid'
|
|
@@ -117,6 +117,19 @@ class PaymeWebhookView(PaymeWebhookView):
|
|
|
117
117
|
order.save()
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
+
3. Add webhook URLs to `urls.py`:
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
# urls.py
|
|
124
|
+
from django.urls import path
|
|
125
|
+
from .views import PaymeWebhookView
|
|
126
|
+
|
|
127
|
+
urlpatterns = [
|
|
128
|
+
# ...
|
|
129
|
+
path('payments/webhook/payme/', PaymeWebhookView.as_view(), name='payme_webhook'),
|
|
130
|
+
]
|
|
131
|
+
```
|
|
132
|
+
|
|
120
133
|
### FastAPI Integration
|
|
121
134
|
|
|
122
135
|
1. Create webhook handler:
|
|
@@ -22,7 +22,7 @@ paytechuz/integrations/django/admin.py,sha256=6fs6GiKcdc-hGlLxJ0BthY7TFo_2RVVJRh
|
|
|
22
22
|
paytechuz/integrations/django/apps.py,sha256=Q9wG2osL7_Ip2BcAkq7lmmhu4UKJAg6UtSsSq_RgHlc,640
|
|
23
23
|
paytechuz/integrations/django/models.py,sha256=x3cVLY812Xts5oNk4VmCzK3zjb0FXQON9WV41PCtxaw,5696
|
|
24
24
|
paytechuz/integrations/django/signals.py,sha256=VtNYEAnu13wi9PqadEaCU9LY_k2tY26AS4bnPIAqw7M,1319
|
|
25
|
-
paytechuz/integrations/django/views.py,sha256=
|
|
25
|
+
paytechuz/integrations/django/views.py,sha256=TL-LNbwrLvYjoBvGxm_yZjMVLBqelorgKjr4l3sKH1Y,3037
|
|
26
26
|
paytechuz/integrations/django/webhooks.py,sha256=cP_Jc3VlyyvyzDbBd2yEVHikw60th1_-L9_vtsRfwgs,31335
|
|
27
27
|
paytechuz/integrations/django/migrations/0001_initial.py,sha256=SWHIUuwq91crzaxa9v1UK0kay8CxsjUo6t4bqg7j0Gw,1896
|
|
28
28
|
paytechuz/integrations/django/migrations/__init__.py,sha256=KLQ5NdjOMLDS21-u3b_g08G1MjPMMhG95XI_N8m4FSo,41
|
|
@@ -30,7 +30,7 @@ paytechuz/integrations/fastapi/__init__.py,sha256=DLnhAZQZf2ghu8BuFFfE7FzbNKWQQ2
|
|
|
30
30
|
paytechuz/integrations/fastapi/models.py,sha256=eWGUpiKufj47AK8Hld4A91jRDj0ZKQzAf95CyUozmvo,4638
|
|
31
31
|
paytechuz/integrations/fastapi/routes.py,sha256=D17QeyY4-aX6tCNmk5h3UiavukvVrE5e6JOFCy4t_n8,36629
|
|
32
32
|
paytechuz/integrations/fastapi/schemas.py,sha256=CkNohj22mQQje8Pu_IkTQwUPAoYHNOKXlGjqaRX_SGQ,3784
|
|
33
|
-
paytechuz-0.2.
|
|
34
|
-
paytechuz-0.2.
|
|
35
|
-
paytechuz-0.2.
|
|
36
|
-
paytechuz-0.2.
|
|
33
|
+
paytechuz-0.2.5.dist-info/METADATA,sha256=7mdAIIZfMprRMXd1nIGW4dcrYi2WvL6RuvYIhMTU3Qs,4390
|
|
34
|
+
paytechuz-0.2.5.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
35
|
+
paytechuz-0.2.5.dist-info/top_level.txt,sha256=oloyKGNVj9Z2h3wpKG5yPyTlpdpWW0-CWr-j-asCWBc,10
|
|
36
|
+
paytechuz-0.2.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|