xync-bot 0.3.24.dev7__tar.gz → 0.3.24.dev9__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 xync-bot might be problematic. Click here for more details.
- {xync_bot-0.3.24.dev7/xync_bot.egg-info → xync_bot-0.3.24.dev9}/PKG-INFO +1 -1
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot/routers/__init__.py +7 -1
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot/routers/pay/dep.py +1 -1
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot/routers/pay/handler.py +3 -7
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot/routers/pay/window.py +9 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9/xync_bot.egg-info}/PKG-INFO +1 -1
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/.env.dist +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/.gitignore +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/.pre-commit-config.yaml +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/makefile +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/pyproject.toml +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/setup.cfg +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/test_main.http +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot/__init__.py +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot/loader.py +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot/routers/cond/__init__.py +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot/routers/cond/func.py +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot/routers/main.py +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot/routers/order.py +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot/routers/pay/cd.py +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot/routers/photo.py +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot/routers/vpn.py +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot/routers/xicon.png +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot/shared.py +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot/typs.py +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot.egg-info/SOURCES.txt +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot.egg-info/dependency_links.txt +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot.egg-info/requires.txt +0 -0
- {xync_bot-0.3.24.dev7 → xync_bot-0.3.24.dev9}/xync_bot.egg-info/top_level.txt +0 -0
|
@@ -67,7 +67,7 @@ class Store:
|
|
|
67
67
|
cur_creds: dict[int, list[int]] = None # pmcur_id:[cred_ids]
|
|
68
68
|
|
|
69
69
|
class Current:
|
|
70
|
-
is_target: bool =
|
|
70
|
+
is_target: bool = True
|
|
71
71
|
is_fiat: bool = None
|
|
72
72
|
msg_to_del: Message = None
|
|
73
73
|
|
|
@@ -86,7 +86,13 @@ class Store:
|
|
|
86
86
|
cred_dtl: str = None
|
|
87
87
|
cred_id: int = None
|
|
88
88
|
|
|
89
|
+
class Payreq:
|
|
90
|
+
id: int = None
|
|
91
|
+
created_at: int = None
|
|
92
|
+
payed_at: int = None
|
|
93
|
+
|
|
89
94
|
glob: Global
|
|
90
95
|
perm: Permanent = Permanent()
|
|
91
96
|
pay: Payment = Payment()
|
|
97
|
+
pr: Payreq = Payreq()
|
|
92
98
|
curr: Current = Current()
|
|
@@ -8,7 +8,6 @@ from aiogram.types import Message, CallbackQuery
|
|
|
8
8
|
from aiogram.fsm.context import FSMContext
|
|
9
9
|
from xync_bot.routers.pay.dep import fill_creds, fill_actors, dlt, ans
|
|
10
10
|
from xync_schema import models
|
|
11
|
-
from aiogram.utils.keyboard import InlineKeyboardBuilder
|
|
12
11
|
|
|
13
12
|
from xync_bot import Store
|
|
14
13
|
from xync_bot.routers.pay import cd, dep, window
|
|
@@ -163,8 +162,8 @@ async def process_time_selection(query: CallbackQuery, callback_data: cd.Time, s
|
|
|
163
162
|
cred_id=store.pay.cred_id,
|
|
164
163
|
user=store.perm.user,
|
|
165
164
|
)
|
|
166
|
-
pay_req,
|
|
167
|
-
models.PayReq.
|
|
165
|
+
(pay_req, _), *__ = await gather(
|
|
166
|
+
models.PayReq.update_or_create(**pr_data), ans(query, None), state.set_state(dep.PaymentState.timer)
|
|
168
167
|
)
|
|
169
168
|
|
|
170
169
|
await state.update_data(
|
|
@@ -187,11 +186,8 @@ async def payment_confirmed(query: CallbackQuery, state: FSMContext):
|
|
|
187
186
|
pay_req = await models.PayReq.get(id=data["pay_req_id"])
|
|
188
187
|
pay_req.payed_at = payed_at
|
|
189
188
|
await pay_req.save()
|
|
190
|
-
|
|
191
|
-
builder = InlineKeyboardBuilder()
|
|
192
|
-
builder.button(text="Новый платеж💸", callback_data=cd.PayNav(to=cd.PayStep.t_type))
|
|
193
|
-
await query.message.answer("✅ Платеж успешно подтвержден", reply_markup=builder.as_markup())
|
|
194
189
|
await state.clear()
|
|
190
|
+
await window.success(query.message)
|
|
195
191
|
|
|
196
192
|
|
|
197
193
|
@pay.callback_query(cd.Action.filter(F.act.__eq__(cd.ActionType.not_received)))
|
|
@@ -215,3 +215,12 @@ async def run_timer(message, state: FSMContext):
|
|
|
215
215
|
await message.edit_text("⏳ Время вышло!", reply_markup=builder.as_markup())
|
|
216
216
|
except Exception:
|
|
217
217
|
pass
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
async def success(msg: Message):
|
|
221
|
+
rm = InlineKeyboardMarkup(
|
|
222
|
+
inline_keyboard=[
|
|
223
|
+
[InlineKeyboardButton(text="Новый платеж💸", callback_data=cd.PayNav(to=cd.PayStep.t_type).pack())]
|
|
224
|
+
]
|
|
225
|
+
)
|
|
226
|
+
await msg.edit_text("✅ Платеж успешно подтвержден", reply_markup=rm)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|