paytechuz 0.2.19__py3-none-any.whl → 0.2.20__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.

@@ -0,0 +1,116 @@
1
+ """
2
+ FastAPI schemas for PayTechUZ.
3
+ """
4
+ from datetime import datetime
5
+ from typing import Dict, Any, Optional, List
6
+
7
+ from pydantic import BaseModel, Field, ConfigDict
8
+
9
+
10
+ class PaymentTransactionBase(BaseModel):
11
+ """
12
+ Base schema for payment transaction.
13
+ """
14
+ gateway: str = Field(
15
+ ..., description="Payment gateway (payme or click)"
16
+ )
17
+ transaction_id: str = Field(
18
+ ..., description="Transaction ID from the payment system"
19
+ )
20
+ account_id: str = Field(..., description="Account or order ID")
21
+ amount: float = Field(..., description="Payment amount")
22
+ state: int = Field(0, description="Transaction state")
23
+
24
+
25
+ class PaymentTransactionCreate(PaymentTransactionBase):
26
+ """
27
+ Schema for creating a payment transaction.
28
+ """
29
+ extra_data: Optional[Dict[str, Any]] = Field(
30
+ None, description="Additional data for the transaction"
31
+ )
32
+
33
+
34
+ class PaymentTransaction(PaymentTransactionBase):
35
+ """
36
+ Schema for payment transaction.
37
+ """
38
+ id: int = Field(..., description="Transaction ID")
39
+ extra_data: Dict[str, Any] = Field(
40
+ {}, description="Additional data for the transaction"
41
+ )
42
+ created_at: datetime = Field(..., description="Creation timestamp")
43
+ updated_at: datetime = Field(..., description="Last update timestamp")
44
+ performed_at: Optional[datetime] = Field(
45
+ None, description="Payment timestamp"
46
+ )
47
+ cancelled_at: Optional[datetime] = Field(
48
+ None, description="Cancellation timestamp"
49
+ )
50
+
51
+ model_config = ConfigDict(from_attributes=True)
52
+
53
+
54
+ class PaymentTransactionList(BaseModel):
55
+ """
56
+ Schema for a list of payment transactions.
57
+ """
58
+ transactions: List[PaymentTransaction] = Field(
59
+ ..., description="List of transactions"
60
+ )
61
+ total: int = Field(..., description="Total number of transactions")
62
+
63
+
64
+ class PaymeWebhookRequest(BaseModel):
65
+ """
66
+ Schema for Payme webhook request.
67
+ """
68
+ method: str = Field(..., description="Method name")
69
+ params: Dict[str, Any] = Field(..., description="Method parameters")
70
+ id: int = Field(..., description="Request ID")
71
+
72
+
73
+ class PaymeWebhookResponse(BaseModel):
74
+ """
75
+ Schema for Payme webhook response.
76
+ """
77
+ jsonrpc: str = Field("2.0", description="JSON-RPC version")
78
+ id: int = Field(..., description="Request ID")
79
+ result: Dict[str, Any] = Field(..., description="Response result")
80
+
81
+
82
+ class PaymeWebhookErrorResponse(BaseModel):
83
+ """
84
+ Schema for Payme webhook error response.
85
+ """
86
+ jsonrpc: str = Field("2.0", description="JSON-RPC version")
87
+ id: int = Field(..., description="Request ID")
88
+ error: Dict[str, Any] = Field(..., description="Error details")
89
+
90
+
91
+ class ClickWebhookRequest(BaseModel):
92
+ """
93
+ Schema for Click webhook request.
94
+ """
95
+ click_trans_id: str = Field(..., description="Click transaction ID")
96
+ service_id: str = Field(..., description="Service ID")
97
+ merchant_trans_id: str = Field(..., description="Merchant transaction ID")
98
+ amount: str = Field(..., description="Payment amount")
99
+ action: str = Field(..., description="Action (0 - prepare, 1 - complete)")
100
+ sign_time: str = Field(..., description="Signature timestamp")
101
+ sign_string: str = Field(..., description="Signature string")
102
+ error: Optional[str] = Field(None, description="Error code")
103
+ error_note: Optional[str] = Field(None, description="Error note")
104
+
105
+
106
+ class ClickWebhookResponse(BaseModel):
107
+ """
108
+ Schema for Click webhook response.
109
+ """
110
+ click_trans_id: str = Field(..., description="Click transaction ID")
111
+ merchant_trans_id: str = Field(..., description="Merchant transaction ID")
112
+ merchant_prepare_id: Optional[int] = Field(
113
+ None, description="Merchant prepare ID"
114
+ )
115
+ error: int = Field(0, description="Error code")
116
+ error_note: str = Field("Success", description="Error note")
@@ -1,17 +1,42 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.1
2
2
  Name: paytechuz
3
- Version: 0.2.19
3
+ Version: 0.2.20
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
7
7
  Author-email: muhammadali17abc@gmail.com
8
8
  License: MIT
9
+ Keywords: paytechuz,payme,click,uzbekistan,payment,gateway,payment-gateway,payment-processing,django,flask,fastapi
10
+ Platform: UNKNOWN
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.6
15
+ Classifier: Programming Language :: Python :: 3.7
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: License :: OSI Approved :: MIT License
22
+ Classifier: Operating System :: OS Independent
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
9
24
  Requires-Python: >=3.6
10
25
  Description-Content-Type: text/markdown
11
- Dynamic: author
12
- Dynamic: author-email
13
- Dynamic: home-page
14
- Dynamic: requires-python
26
+ Requires-Dist: requests<3.0,>=2.0
27
+ Requires-Dist: dataclasses<1.0,>=0.6; python_version < "3.7"
28
+ Provides-Extra: django
29
+ Requires-Dist: django<5.0,>=3.0; extra == "django"
30
+ Requires-Dist: djangorestframework<4.0,>=3.0; extra == "django"
31
+ Provides-Extra: fastapi
32
+ Requires-Dist: fastapi<1.0.0,>=0.68.0; extra == "fastapi"
33
+ Requires-Dist: sqlalchemy<3.0,>=1.4; extra == "fastapi"
34
+ Requires-Dist: httpx<1.0,>=0.20; extra == "fastapi"
35
+ Requires-Dist: python-multipart==0.0.20; extra == "fastapi"
36
+ Requires-Dist: pydantic<2.0,>=1.8; extra == "fastapi"
37
+ Provides-Extra: flask
38
+ Requires-Dist: flask<3.0,>=2.0; extra == "flask"
39
+ Requires-Dist: flask-sqlalchemy<3.0,>=2.5; extra == "flask"
15
40
 
16
41
  # paytechuz
17
42
 
@@ -332,3 +357,5 @@ Contributions are welcome! Please feel free to submit a Pull Request.
332
357
  ## License
333
358
 
334
359
  This project is licensed under the MIT License - see the LICENSE file for details.
360
+
361
+
@@ -1,3 +1,34 @@
1
+ core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ core/base.py,sha256=Es6eEGNgDjQJe-kEJVAHSAh8AWbgtIuQMm0xn7qfjl4,2549
3
+ core/constants.py,sha256=P2zeZ_cfZIttdC1vqkpIngkfRFh6loWzJYEgzQb5cKA,1660
4
+ core/exceptions.py,sha256=XMJkqiponTkvhjoh3S2iFNuU3UbBdFW4130kd0hpudg,5489
5
+ core/http.py,sha256=qmLR6ujxmIPjwoTS4vvKRIvDnNcpl84sS1HmVB890b0,7686
6
+ core/utils.py,sha256=ETHMzwu7_dirc-QfBUjpSTQmyS6_vBiNq97Dq9CNZto,4718
7
+ core/payme/errors.py,sha256=CZE62MbYDMsRfNIX23Syt6of_tPMMGLnXhYMii4hw3A,542
8
+ gateways/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ gateways/click/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ gateways/click/client.py,sha256=UkzSd7FiYHoNUZayehhLn9GvTVPIdNOcmrcLCTKdWlA,6390
11
+ gateways/click/merchant.py,sha256=lav5bz7E-saiKHqEFHL2GQ-UVZkUduXkx8thZ2X5y2Q,7183
12
+ gateways/click/webhook.py,sha256=rph-NmjjnBKMW4rcxQTXrHHdK-uMrU39kXnbqK56leo,7936
13
+ gateways/payme/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
+ gateways/payme/cards.py,sha256=aL6su_ZTCBPU8qmrz2Jcw_Wn7Zf9RwIu8k10o4AWFTs,5420
15
+ gateways/payme/client.py,sha256=78NUHz4X6M5YIbWOYgKY4TKd-LOUYzFODaDPLFmgUCU,7839
16
+ gateways/payme/receipts.py,sha256=DdrZMPeDvQmGyqAEOTmtUorfcIVVb3t2tg31l7TXqHo,8904
17
+ gateways/payme/webhook.py,sha256=-0O8vzMtiu4U8FWFKDA6EfyoX4NEGqcEq-T0yNtVhM4,12374
18
+ integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
+ integrations/django/__init__.py,sha256=YDgD1Ux1E3CJxQMT-9tulhXmuLOEaUSv320LeaVgJ00,116
20
+ integrations/django/admin.py,sha256=6fs6GiKcdc-hGlLxJ0BthY7TFo_2RVVJRhQwhxMroCY,2664
21
+ integrations/django/apps.py,sha256=57svd2aqSuoASWMI3Jnh70ZXrYN1oQ8EnvLl_5LNyl0,473
22
+ integrations/django/models.py,sha256=83PjBnombavEjfPm2EcVFo2R5BO6VRIjp0MlNCp-fbg,5819
23
+ integrations/django/signals.py,sha256=VtNYEAnu13wi9PqadEaCU9LY_k2tY26AS4bnPIAqw7M,1319
24
+ integrations/django/views.py,sha256=r9DnbV2IBkFm18SBtan4lgrluaULLViKJIWGFTlHJH0,3031
25
+ integrations/django/webhooks.py,sha256=dslVnFMl6QRI1wQVgMRjlIoFFJ4yEt9Nbs1sClbfjPw,31464
26
+ integrations/django/migrations/0001_initial.py,sha256=YLDUp1w0V3Zvuz5TssQDrx3PlccduoHqdLD109Hg8Z4,2326
27
+ integrations/django/migrations/__init__.py,sha256=KLQ5NdjOMLDS21-u3b_g08G1MjPMMhG95XI_N8m4FSo,41
28
+ integrations/fastapi/__init__.py,sha256=DLnhAZQZf2ghu8BuFFfE7FzbNKWQQ2SLG8qxldRuwR4,565
29
+ integrations/fastapi/models.py,sha256=qZe_Pz3qfL3fjRL99WVQfxGIW1Mt2JAPMQ98k86pUxU,5526
30
+ integrations/fastapi/routes.py,sha256=dLInbxXrhzW7uFMA-TUmAE5v6nBX3RwAj8VMDrLmfAE,36876
31
+ integrations/fastapi/schemas.py,sha256=uGuIcgsJ7eh5EHmdSjCxxBJC51WONA1OwPLPf_mpgHc,3867
1
32
  paytechuz/__init__.py,sha256=d-9AjWthchZAE_ykEjoBZ79o32gzqM1jZkkAQd-jB8s,1754
2
33
  paytechuz/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
34
  paytechuz/core/base.py,sha256=Es6eEGNgDjQJe-kEJVAHSAh8AWbgtIuQMm0xn7qfjl4,2549
@@ -30,7 +61,7 @@ paytechuz/integrations/fastapi/__init__.py,sha256=DLnhAZQZf2ghu8BuFFfE7FzbNKWQQ2
30
61
  paytechuz/integrations/fastapi/models.py,sha256=9IqrsndIVuIDwDbijZ89biJxEWQASXRBfWVShxgerAc,5113
31
62
  paytechuz/integrations/fastapi/routes.py,sha256=61jsHsgGJZ_-ISfG2J1MSOCqIOLQ18C1boc9MVddkvg,37652
32
63
  paytechuz/integrations/fastapi/schemas.py,sha256=PgRqviJiD4-u3_CIkUOX8R7L8Yqn8L44WLte7968G0E,3887
33
- paytechuz-0.2.19.dist-info/METADATA,sha256=2BRx62AJ4fQCTR_95kilPV-HI7aCRt1oEVZmOC-NoLU,10084
34
- paytechuz-0.2.19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
35
- paytechuz-0.2.19.dist-info/top_level.txt,sha256=oloyKGNVj9Z2h3wpKG5yPyTlpdpWW0-CWr-j-asCWBc,10
36
- paytechuz-0.2.19.dist-info/RECORD,,
64
+ paytechuz-0.2.20.dist-info/METADATA,sha256=_MGqOZihEdgBfy_F3IWzM5uSbYS6KMiNJHaqIQH1Bkk,11464
65
+ paytechuz-0.2.20.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
66
+ paytechuz-0.2.20.dist-info/top_level.txt,sha256=v03IobsNVIGSgCareObqCsEwLgXOpwBvBTWy3y8-G_M,37
67
+ paytechuz-0.2.20.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: bdist_wheel (0.45.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -0,0 +1,4 @@
1
+ core
2
+ gateways
3
+ integrations
4
+ paytechuz
@@ -1 +0,0 @@
1
- paytechuz