paytechuz 0.3.0__py3-none-any.whl → 0.3.1__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/__init__.py CHANGED
@@ -4,9 +4,8 @@ PayTechUZ - Unified payment library for Uzbekistan payment systems.
4
4
  This library provides a unified interface for working with Payme, Click, and Atmos
5
5
  payment systems in Uzbekistan. It supports Django, Flask, and FastAPI.
6
6
  """
7
- from typing import Any
8
7
 
9
- __version__ = '0.3.0'
8
+ __version__ = '0.3.1'
10
9
 
11
10
  # Import framework integrations - these imports are used to check availability
12
11
  # of frameworks, not for direct usage
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: paytechuz
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Unified Python package for Uzbekistan payment gateways (Payme, Click, Atmos)
5
5
  Home-page: https://github.com/Muhammadali-Akbarov/paytechuz
6
6
  Author: Muhammadali Akbarov
@@ -119,98 +119,6 @@ if status['status'] == 'pending':
119
119
  print(f"Cancellation status: {cancel_result['status']}")
120
120
  ```
121
121
 
122
- ### Complete Atmos Integration Example
123
-
124
- ```python
125
- from paytechuz.gateways.atmos import AtmosGateway
126
- from paytechuz.gateways.atmos.webhook import AtmosWebhookHandler
127
-
128
- # 1. Initialize Atmos Gateway
129
- atmos = AtmosGateway(
130
- consumer_key="your_consumer_key",
131
- consumer_secret="your_consumer_secret",
132
- store_id="your_store_id",
133
- terminal_id="your_terminal_id", # optional
134
- is_test_mode=True
135
- )
136
-
137
- # 2. Create payment
138
- def create_atmos_payment(order_id, amount):
139
- try:
140
- payment = atmos.create_payment(
141
- account_id=order_id,
142
- amount=amount
143
- )
144
-
145
- print(f"✅ Payment created successfully!")
146
- print(f"Transaction ID: {payment['transaction_id']}")
147
- print(f"Payment URL: {payment['payment_url']}")
148
- print(f"Redirect user to: {payment['payment_url']}")
149
-
150
- return payment
151
-
152
- except Exception as e:
153
- print(f"❌ Payment creation failed: {e}")
154
- return None
155
-
156
- # 3. Check payment status
157
- def check_atmos_payment(transaction_id):
158
- try:
159
- status = atmos.check_payment(transaction_id)
160
-
161
- print(f"Transaction ID: {status['transaction_id']}")
162
- print(f"Status: {status['status']}")
163
-
164
- return status
165
-
166
- except Exception as e:
167
- print(f"❌ Status check failed: {e}")
168
- return None
169
-
170
- # 4. Handle webhook (for web frameworks)
171
- def handle_atmos_webhook(webhook_data):
172
- webhook_handler = AtmosWebhookHandler(api_key="your_atmos_api_key")
173
-
174
- try:
175
- response = webhook_handler.handle_webhook(webhook_data)
176
-
177
- if response['status'] == 1:
178
- # Payment successful
179
- transaction_id = webhook_data.get('transaction_id')
180
- amount = webhook_data.get('amount')
181
- invoice = webhook_data.get('invoice')
182
-
183
- print(f"✅ Payment successful!")
184
- print(f"Transaction ID: {transaction_id}")
185
- print(f"Order ID: {invoice}")
186
- print(f"Amount: {amount}")
187
-
188
- # Update your order status here
189
- # update_order_status(invoice, 'paid')
190
-
191
- return response
192
-
193
- except Exception as e:
194
- print(f"❌ Webhook processing failed: {e}")
195
- return {
196
- 'status': 0,
197
- 'message': f'Error: {str(e)}'
198
- }
199
-
200
- # Usage example
201
- if __name__ == "__main__":
202
- # Create payment
203
- payment = create_atmos_payment("order_12345", 50000) # 500.00 UZS
204
-
205
- if payment:
206
- # Check status after some time
207
- import time
208
- time.sleep(5) # Wait 5 seconds
209
-
210
- status = check_atmos_payment(payment['transaction_id'])
211
- print(f"Current status: {status['status'] if status else 'Unknown'}")
212
- ```
213
-
214
122
  ### Django Integration
215
123
 
216
124
  1. Create Order model:
@@ -1,4 +1,4 @@
1
- paytechuz/__init__.py,sha256=Pfndm1UE44F1lgRs9wFP3OH0760ziw3EBJbN-wkRuXg,1939
1
+ paytechuz/__init__.py,sha256=te3Ao8uvuOI6bl9Uq1HsNfmztVZ9c_uvqi3gdODFkEE,1916
2
2
  paytechuz/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  paytechuz/core/base.py,sha256=Es6eEGNgDjQJe-kEJVAHSAh8AWbgtIuQMm0xn7qfjl4,2549
4
4
  paytechuz/core/constants.py,sha256=hzCy5Kc8HVSDhXxNgObbJ2e9SYcXTYL3qky_q0tlpHU,2305
@@ -34,7 +34,7 @@ paytechuz/integrations/fastapi/__init__.py,sha256=DLnhAZQZf2ghu8BuFFfE7FzbNKWQQ2
34
34
  paytechuz/integrations/fastapi/models.py,sha256=9IqrsndIVuIDwDbijZ89biJxEWQASXRBfWVShxgerAc,5113
35
35
  paytechuz/integrations/fastapi/routes.py,sha256=t8zbqhMZsaJmEvMDgmF-NoRmbqksfX_AvIrx-3kCjg8,37845
36
36
  paytechuz/integrations/fastapi/schemas.py,sha256=PgRqviJiD4-u3_CIkUOX8R7L8Yqn8L44WLte7968G0E,3887
37
- paytechuz-0.3.0.dist-info/METADATA,sha256=UsVUiMRztSPWOfzb6N3GthBY7ZdMhBBbdsSSAwp_4QQ,15730
38
- paytechuz-0.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
39
- paytechuz-0.3.0.dist-info/top_level.txt,sha256=oloyKGNVj9Z2h3wpKG5yPyTlpdpWW0-CWr-j-asCWBc,10
40
- paytechuz-0.3.0.dist-info/RECORD,,
37
+ paytechuz-0.3.1.dist-info/METADATA,sha256=5mtAMGPdOCQ9Tophk_QBPcADUCC2Pjtv5wegmPk_5JM,13096
38
+ paytechuz-0.3.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
39
+ paytechuz-0.3.1.dist-info/top_level.txt,sha256=oloyKGNVj9Z2h3wpKG5yPyTlpdpWW0-CWr-j-asCWBc,10
40
+ paytechuz-0.3.1.dist-info/RECORD,,