paytechuz 0.2.21__py3-none-any.whl → 0.2.22__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-0.2.21.dist-info → paytechuz-0.2.22.dist-info}/METADATA +6 -33
- {paytechuz-0.2.21.dist-info → paytechuz-0.2.22.dist-info}/RECORD +4 -35
- {paytechuz-0.2.21.dist-info → paytechuz-0.2.22.dist-info}/WHEEL +1 -1
- paytechuz-0.2.22.dist-info/top_level.txt +1 -0
- core/__init__.py +0 -0
- core/base.py +0 -97
- core/constants.py +0 -68
- core/exceptions.py +0 -190
- core/http.py +0 -268
- core/payme/errors.py +0 -25
- core/utils.py +0 -192
- gateways/__init__.py +0 -0
- gateways/click/__init__.py +0 -0
- gateways/click/client.py +0 -199
- gateways/click/merchant.py +0 -265
- gateways/click/webhook.py +0 -227
- gateways/payme/__init__.py +0 -0
- gateways/payme/cards.py +0 -222
- gateways/payme/client.py +0 -262
- gateways/payme/receipts.py +0 -336
- gateways/payme/webhook.py +0 -379
- integrations/__init__.py +0 -0
- integrations/django/__init__.py +0 -4
- integrations/django/admin.py +0 -78
- integrations/django/apps.py +0 -21
- integrations/django/migrations/0001_initial.py +0 -51
- integrations/django/migrations/__init__.py +0 -3
- integrations/django/models.py +0 -174
- integrations/django/signals.py +0 -46
- integrations/django/views.py +0 -102
- integrations/django/webhooks.py +0 -884
- integrations/fastapi/__init__.py +0 -21
- integrations/fastapi/models.py +0 -183
- integrations/fastapi/routes.py +0 -1038
- integrations/fastapi/schemas.py +0 -116
- paytechuz-0.2.21.dist-info/top_level.txt +0 -4
integrations/fastapi/schemas.py
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
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")
|