diff --git a/client.py b/client.py index 816bbcf6..10953586 100644 --- a/client.py +++ b/client.py @@ -1,6 +1,6 @@ import py3xui -from config import LIMIT_IP +from config import LIMIT_IP, SUPERNODE from logger import logger @@ -15,6 +15,7 @@ async def add_client( enable: bool, flow: str, inbound_id: int, + sub_id ): """ Adds a client to the server via 3x-ui. @@ -30,7 +31,7 @@ async def add_client( expiry_time=expiry_time, enable=enable, tg_id=tg_id, - sub_id=email, + sub_id=sub_id, flow=flow, ) @@ -54,7 +55,7 @@ async def add_client( async def extend_client_key( - xui, inbound_id, email: str, new_expiry_time: int, client_id: str, total_gb: int + xui, inbound_id, email: str, new_expiry_time: int, client_id: str, total_gb: int, sub_id = str ): """ Функция для обновления срока действия ключа клиента по email. @@ -78,7 +79,7 @@ async def extend_client_key( client.id = client_id client.expiry_time = new_expiry_time client.flow = "xtls-rprx-vision" - client.sub_id = email + client.sub_id = sub_id client.total_gb = total_gb client.enable = True client.limit_ip = LIMIT_IP @@ -106,6 +107,11 @@ async def delete_client( """ await xui.login() try: + if SUPERNODE: + await xui.client.delete(inbound_id, client_id) + logger.info(f"Клиент с ID {client_id} был удален успешно (SUPERNODE).") + return True + client = await xui.client.get_by_email(email) if not client: diff --git a/handlers/admin/admin_servers.py b/handlers/admin/admin_servers.py index 973cbdf1..ba37b517 100644 --- a/handlers/admin/admin_servers.py +++ b/handlers/admin/admin_servers.py @@ -9,7 +9,7 @@ from aiogram.utils.keyboard import InlineKeyboardBuilder from py3xui import AsyncApi from backup import create_backup_and_send_to_admins -from config import ADMIN_PASSWORD, ADMIN_USERNAME, DATABASE_URL +from config import ADMIN_PASSWORD, ADMIN_USERNAME, DATABASE_URL, SUPERNODE from database import check_unique_server_name, get_servers_from_db from filters.admin import IsAdminFilter from handlers.keys.key_utils import create_key_on_cluster @@ -378,18 +378,24 @@ async def sync_cluster_handler(callback_query: types.CallbackQuery): ) return + servers = await get_servers_from_db() + cluster_servers = servers.get(cluster_name, []) + for key in keys_to_sync: - try: - await create_key_on_cluster( - cluster_name, - key["tg_id"], - key["client_id"], - key["email"], - key["expiry_time"], - ) - await asyncio.sleep(0.2) - except Exception as e: - logger.error(f"Ошибка при добавлении ключа {key['client_id']} в кластер {cluster_name}: {e}") + for server_info in cluster_servers: + server_name = server_info.get("server_name", "unknown") + email = f"{key['email']}_{server_name.lower()}" if SUPERNODE else key['email'] + try: + await create_key_on_cluster( + cluster_name, + key["tg_id"], + key["client_id"], + email, + key["expiry_time"], + ) + await asyncio.sleep(0.6) + except Exception as e: + logger.error(f"Ошибка при добавлении ключа {key['client_id']} в кластер {cluster_name}: {e}") await callback_query.message.answer( f"✅ Ключи успешно синхронизированы для кластера {cluster_name}.", diff --git a/handlers/admin/admin_user_editor.py b/handlers/admin/admin_user_editor.py index 8651d3ab..ca1ebfbc 100644 --- a/handlers/admin/admin_user_editor.py +++ b/handlers/admin/admin_user_editor.py @@ -2,6 +2,7 @@ import asyncio from datetime import datetime from typing import Any +import pytz from aiogram import Bot, F, Router, types from aiogram.fsm.context import FSMContext from aiogram.fsm.state import State, StatesGroup @@ -496,8 +497,9 @@ async def handle_expiry_time_input( try: expiry_time_str = message.text + moscow_tz = pytz.timezone("Europe/Moscow") expiry_time = int( - datetime.strptime(expiry_time_str, "%Y-%m-%d %H:%M:%S").timestamp() * 1000 + datetime.strptime(expiry_time_str, "%Y-%m-%d %H:%M:%S").replace(tzinfo=moscow_tz).timestamp() * 1000 ) client_id = await get_client_id_by_email(email) diff --git a/handlers/buttons/yookassa.py b/handlers/buttons/yookassa.py index 037be327..52401db4 100644 --- a/handlers/buttons/yookassa.py +++ b/handlers/buttons/yookassa.py @@ -1,3 +1,8 @@ PAY = "Пополнить" +PAY_2 = "Оплатить" BACK = "⬅️ Назад" CUSTOM_SUM = "💰 Ввести свою сумму" +PROFILE = "👤 Личный кабинет" +KEY_CREATION_PAYMENT_MESSAGE = "Вы выбрали пополнение на {amount} рублей для создания нового ключа. Перейдите по ссылке для оплаты:" +KEY_RENEWAL_PAYMENT_MESSAGE = "Вы выбрали пополнение на {amount} рублей для продления ключа. Перейдите по ссылке для оплаты:" +DEFAULT_PAYMENT_MESSAGE = "Вы выбрали пополнение на {amount} рублей. Перейдите по ссылке для оплаты:" diff --git a/handlers/keys/key_management.py b/handlers/keys/key_management.py index 4eab8f6b..625947b5 100644 --- a/handlers/keys/key_management.py +++ b/handlers/keys/key_management.py @@ -3,6 +3,7 @@ import uuid from datetime import datetime, timedelta from typing import Any +import pytz from aiogram import F, Router from aiogram.fsm.context import FSMContext from aiogram.fsm.state import State, StatesGroup @@ -178,6 +179,9 @@ async def create_key( message_or_query: Message | CallbackQuery | None = None, ): """Создаёт ключ с заданным сроком действия.""" + moscow_tz = pytz.timezone("Europe/Moscow") + expiry_time = expiry_time.astimezone(moscow_tz) + while True: key_name = generate_random_email() logger.info(f"Generated random key name for user {tg_id}: {key_name}") @@ -195,7 +199,7 @@ async def create_key( client_id = str(uuid.uuid4()) email = key_name.lower() - expiry_timestamp = int(expiry_time.timestamp() * 1000) + expiry_timestamp = int(expiry_time.astimezone(moscow_tz).timestamp() * 1000) public_link = f"{PUBLIC_LINK}{email}/{tg_id}" try: @@ -229,19 +233,13 @@ async def create_key( except Exception as e: logger.error(f"Error while creating the key for user {tg_id} on cluster: {e}") + error_message = "❌ Произошла ошибка при создании подписки. Пожалуйста, попробуйте снова." if isinstance(message_or_query, Message): - await message_or_query.answer( - "❌ Произошла ошибка при создании ключа. Пожалуйста, попробуйте снова." - ) + await message_or_query.answer(error_message) elif isinstance(message_or_query, CallbackQuery): - await message_or_query.message.answer( - "❌ Произошла ошибка при создании ключа. Пожалуйста, попробуйте снова." - ) + await message_or_query.message.answer(error_message) else: - await bot.send_message( - chat_id=tg_id, - text="❌ Произошла ошибка при создании ключа. Пожалуйста, попробуйте снова.", - ) + await bot.send_message(chat_id=tg_id, text=error_message) return builder = InlineKeyboardBuilder() @@ -252,9 +250,7 @@ async def create_key( ) builder.row( InlineKeyboardButton(text=IMPORT_IOS, url=f"{CONNECT_IOS}{public_link}"), - InlineKeyboardButton( - text=IMPORT_ANDROID, url=f"{CONNECT_ANDROID}{public_link}" - ), + InlineKeyboardButton(text=IMPORT_ANDROID, url=f"{CONNECT_ANDROID}{public_link}"), ) builder.row( InlineKeyboardButton(text=PC_BUTTON, callback_data=f"connect_pc|{email}"), @@ -262,20 +258,16 @@ async def create_key( ) builder.row(InlineKeyboardButton(text="👤 Личный кабинет", callback_data="profile")) - remaining_time = expiry_time - datetime.utcnow() + remaining_time = expiry_time - datetime.now(moscow_tz) days = remaining_time.days key_message = key_message_success(public_link, f"⏳ Осталось дней: {days} 📅") if isinstance(message_or_query, Message): await message_or_query.answer(key_message, reply_markup=builder.as_markup()) elif isinstance(message_or_query, CallbackQuery): - await message_or_query.message.answer( - key_message, reply_markup=builder.as_markup() - ) + await message_or_query.message.answer(key_message, reply_markup=builder.as_markup()) else: - await bot.send_message( - chat_id=tg_id, text=key_message, reply_markup=builder.as_markup() - ) + await bot.send_message(chat_id=tg_id, text=key_message, reply_markup=builder.as_markup()) if state: await state.clear() diff --git a/handlers/keys/key_utils.py b/handlers/keys/key_utils.py index 6839cc08..bbf196ba 100644 --- a/handlers/keys/key_utils.py +++ b/handlers/keys/key_utils.py @@ -3,21 +3,14 @@ import asyncio from py3xui import AsyncApi from client import add_client, delete_client, extend_client_key -from config import ADMIN_PASSWORD, ADMIN_USERNAME, LIMIT_IP, TOTAL_GB +from config import ADMIN_PASSWORD, ADMIN_USERNAME, LIMIT_IP, SUPERNODE, TOTAL_GB from database import get_servers_from_db from logger import logger async def create_key_on_cluster(cluster_id, tg_id, client_id, email, expiry_timestamp): """ - Создает ключ на всех серверах указанного кластера. - - :param cluster_id: ID кластера. - :param tg_id: Telegram ID пользователя. - :param client_id: Уникальный идентификатор клиента. - :param email: Email клиента. - :param expiry_timestamp: Время истечения ключа (timestamp в миллисекундах). - :param allow_existing: Игнорируется, ключи всегда продолжают выполнение. + Создает ключ на всех серверах указанного кластера с одинаковым sub_id и уникальным email при активном SUPERNODE. """ try: tasks = [] @@ -35,17 +28,26 @@ async def create_key_on_cluster(cluster_id, tg_id, client_id, email, expiry_time ) inbound_id = server_info.get("inbound_id") + server_name = server_info.get("server_name", "unknown") + if not inbound_id: logger.warning( - f"INBOUND_ID отсутствует для сервера {server_info.get('server_name', 'unknown')}. Пропуск." + f"INBOUND_ID отсутствует для сервера {server_name}. Пропуск." ) continue + if SUPERNODE: + unique_email = f"{email}_{server_name.lower()}" + sub_id = email + else: + unique_email = email + sub_id = unique_email + tasks.append( add_client( xui, client_id, - email, + unique_email, tg_id, limit_ip=LIMIT_IP, total_gb=TOTAL_GB, @@ -53,9 +55,13 @@ async def create_key_on_cluster(cluster_id, tg_id, client_id, email, expiry_time enable=True, flow="xtls-rprx-vision", inbound_id=int(inbound_id), + sub_id=sub_id ) ) + if SUPERNODE: + await asyncio.sleep(0.2) + await asyncio.gather(*tasks) except Exception as e: @@ -63,6 +69,7 @@ async def create_key_on_cluster(cluster_id, tg_id, client_id, email, expiry_time raise e + async def renew_key_in_cluster(cluster_id, email, client_id, new_expiry_time, total_gb): try: servers = await get_servers_from_db() @@ -80,20 +87,30 @@ async def renew_key_in_cluster(cluster_id, email, client_id, new_expiry_time, to ) inbound_id = server_info.get("inbound_id") + server_name = server_info.get("server_name", "unknown") + if not inbound_id: logger.warning( - f"INBOUND_ID отсутствует для сервера {server_info.get('server_name', 'unknown')}. Пропуск." + f"INBOUND_ID отсутствует для сервера {server_name}. Пропуск." ) continue + if SUPERNODE: + unique_email = f"{email}_{server_name.lower()}" + sub_id = email + else: + unique_email = email + sub_id = unique_email + tasks.append( extend_client_key( xui, int(inbound_id), - email, + unique_email, new_expiry_time, client_id, total_gb, + sub_id ) ) diff --git a/handlers/keys/subscriptions.py b/handlers/keys/subscriptions.py index 619e1d49..3beba804 100644 --- a/handlers/keys/subscriptions.py +++ b/handlers/keys/subscriptions.py @@ -6,7 +6,7 @@ import aiohttp import asyncpg from aiohttp import web -from config import DATABASE_URL, PROJECT_NAME, SUB_MESSAGE, TRANSITION_DATE_STR +from config import DATABASE_URL, PROJECT_NAME, SUB_MESSAGE, SUPERNODE, TRANSITION_DATE_STR from database import get_servers_from_db from logger import logger @@ -35,6 +35,11 @@ async def fetch_url_content(url, tg_id): async def combine_unique_lines(urls, tg_id, query_string): + if SUPERNODE: + logger.info(f"Режим SUPERNODE активен. Возвращаем первую ссылку для tg_id: {tg_id}") + urls_with_query = [f"{urls[0]}?{query_string}"] if urls else [] + return await fetch_url_content(urls_with_query[0], tg_id) if urls_with_query else [] + all_lines = [] logger.info( f"Начинаем объединение подписок для tg_id: {tg_id}, запрос: {query_string}" diff --git a/handlers/keys/trial_key.py b/handlers/keys/trial_key.py index 3f971ac1..9e803cf8 100644 --- a/handlers/keys/trial_key.py +++ b/handlers/keys/trial_key.py @@ -7,14 +7,7 @@ import pytz from py3xui import AsyncApi from client import add_client -from config import ( - ADMIN_PASSWORD, - ADMIN_USERNAME, - LIMIT_IP, - PUBLIC_LINK, - TOTAL_GB, - TRIAL_TIME, -) +from config import ADMIN_PASSWORD, ADMIN_USERNAME, LIMIT_IP, PUBLIC_LINK, SUPERNODE, TOTAL_GB, TRIAL_TIME from database import get_servers_from_db, store_key, use_trial from handlers.texts import INSTRUCTIONS from handlers.utils import generate_random_email, get_least_loaded_cluster @@ -26,18 +19,16 @@ async def create_trial_key(tg_id: int, session: Any): trial_status = await session.fetchval( "SELECT trial FROM connections WHERE tg_id = $1", tg_id ) - if trial_status == 1: return {"error": "Вы уже использовали пробную версию."} - except Exception as e: logger.error(f"Ошибка при проверке триала: {e}") client_id = str(uuid.uuid4()) - email = generate_random_email() - public_link = f"{PUBLIC_LINK}{email}/{tg_id}" + base_email = generate_random_email() + public_link = f"{PUBLIC_LINK}{base_email}/{tg_id}" instructions = INSTRUCTIONS - result = {"key": public_link, "instructions": instructions, "email": email} + result = {"key": public_link, "instructions": instructions, "email": base_email} moscow_tz = pytz.timezone("Europe/Moscow") current_time = datetime.now(moscow_tz) @@ -46,14 +37,18 @@ async def create_trial_key(tg_id: int, session: Any): clusters = await get_servers_from_db() least_loaded_cluster = await get_least_loaded_cluster() - if least_loaded_cluster not in clusters: raise ValueError(f"Кластер {least_loaded_cluster} не найден в базе данных.") servers_in_cluster = clusters[least_loaded_cluster] tasks = [] - for server_info in servers_in_cluster: + for index, server_info in enumerate(servers_in_cluster): + if SUPERNODE: + email = f"{base_email}{index}" + else: + email = base_email + tasks.append( add_client( AsyncApi( @@ -70,6 +65,7 @@ async def create_trial_key(tg_id: int, session: Any): enable=True, flow="xtls-rprx-vision", inbound_id=int(server_info["inbound_id"]), + sub_id=base_email ) ) @@ -78,7 +74,7 @@ async def create_trial_key(tg_id: int, session: Any): await store_key( tg_id, client_id, - email, + base_email, expiry_timestamp, public_link, server_id=least_loaded_cluster, @@ -86,5 +82,4 @@ async def create_trial_key(tg_id: int, session: Any): ) await use_trial(tg_id, session) - return result diff --git a/handlers/payments/utils.c b/handlers/payments/utils.c index 2222d43c..65077b37 100644 --- a/handlers/payments/utils.c +++ b/handlers/payments/utils.c @@ -3667,7 +3667,7 @@ static PyObject *__pyx_gb_8handlers_8payments_5utils_2generator(__pyx_CoroutineO * new_expiry_time = data.get("new_expiry_time") * total_gb = data.get("total_gb") # <<<<<<<<<<<<<< * cost = data.get("cost") - * email = data.get("email") # email + * email = data.get("email") */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_data, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 37, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_5); @@ -3701,7 +3701,7 @@ static PyObject *__pyx_gb_8handlers_8payments_5utils_2generator(__pyx_CoroutineO * new_expiry_time = data.get("new_expiry_time") * total_gb = data.get("total_gb") * cost = data.get("cost") # <<<<<<<<<<<<<< - * email = data.get("email") # email + * email = data.get("email") * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_data, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 38, __pyx_L13_error) @@ -3735,7 +3735,7 @@ static PyObject *__pyx_gb_8handlers_8payments_5utils_2generator(__pyx_CoroutineO /* "handlers/payments/utils.py":39 * total_gb = data.get("total_gb") * cost = data.get("cost") - * email = data.get("email") # email # <<<<<<<<<<<<<< + * email = data.get("email") # <<<<<<<<<<<<<< * * if not all([plan, client_id, new_expiry_time, email]): */ @@ -3768,7 +3768,7 @@ static PyObject *__pyx_gb_8handlers_8payments_5utils_2generator(__pyx_CoroutineO __pyx_t_9 = 0; /* "handlers/payments/utils.py":41 - * email = data.get("email") # email + * email = data.get("email") * * if not all([plan, client_id, new_expiry_time, email]): # <<<<<<<<<<<<<< * logger.error(f"[RENEW] {user_id}") @@ -3850,7 +3850,7 @@ static PyObject *__pyx_gb_8handlers_8payments_5utils_2generator(__pyx_CoroutineO goto __pyx_L12_return; /* "handlers/payments/utils.py":41 - * email = data.get("email") # email + * email = data.get("email") * * if not all([plan, client_id, new_expiry_time, email]): # <<<<<<<<<<<<<< * logger.error(f"[RENEW] {user_id}") @@ -4625,8 +4625,8 @@ static PyObject *__pyx_gb_8handlers_8payments_5utils_2generator(__pyx_CoroutineO * return * * builder.row( # <<<<<<<<<<<<<< - * InlineKeyboardButton(text=RENEW_KEY, callback_data="view_keys"), * InlineKeyboardButton(text=ADD_KEY, callback_data="create_key"), + * InlineKeyboardButton(text=RENEW_KEY, callback_data="view_keys"), */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_builder, __pyx_n_s_row); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 73, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_9); @@ -4634,19 +4634,19 @@ static PyObject *__pyx_gb_8handlers_8payments_5utils_2generator(__pyx_CoroutineO /* "handlers/payments/utils.py":74 * * builder.row( - * InlineKeyboardButton(text=RENEW_KEY, callback_data="view_keys"), # <<<<<<<<<<<<<< - * InlineKeyboardButton(text=ADD_KEY, callback_data="create_key"), + * InlineKeyboardButton(text=ADD_KEY, callback_data="create_key"), # <<<<<<<<<<<<<< + * InlineKeyboardButton(text=RENEW_KEY, callback_data="view_keys"), * ) */ __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 74, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_RENEW_KEY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L13_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ADD_KEY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_text, __pyx_t_6) < 0) __PYX_ERR(0, 74, __pyx_L13_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_callback_data, __pyx_n_u_view_keys) < 0) __PYX_ERR(0, 74, __pyx_L13_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_callback_data, __pyx_n_u_create_key) < 0) __PYX_ERR(0, 74, __pyx_L13_error) __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -4654,8 +4654,8 @@ static PyObject *__pyx_gb_8handlers_8payments_5utils_2generator(__pyx_CoroutineO /* "handlers/payments/utils.py":75 * builder.row( - * InlineKeyboardButton(text=RENEW_KEY, callback_data="view_keys"), - * InlineKeyboardButton(text=ADD_KEY, callback_data="create_key"), # <<<<<<<<<<<<<< + * InlineKeyboardButton(text=ADD_KEY, callback_data="create_key"), + * InlineKeyboardButton(text=RENEW_KEY, callback_data="view_keys"), # <<<<<<<<<<<<<< * ) * await bot.send_message( */ @@ -4663,11 +4663,11 @@ static PyObject *__pyx_gb_8handlers_8payments_5utils_2generator(__pyx_CoroutineO __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 75, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_8); - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_ADD_KEY); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 75, __pyx_L13_error) + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_RENEW_KEY); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 75, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_text, __pyx_t_12) < 0) __PYX_ERR(0, 75, __pyx_L13_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_callback_data, __pyx_n_u_create_key) < 0) __PYX_ERR(0, 75, __pyx_L13_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_callback_data, __pyx_n_u_view_keys) < 0) __PYX_ERR(0, 75, __pyx_L13_error) __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 75, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -4699,7 +4699,7 @@ static PyObject *__pyx_gb_8handlers_8payments_5utils_2generator(__pyx_CoroutineO __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "handlers/payments/utils.py":77 - * InlineKeyboardButton(text=ADD_KEY, callback_data="create_key"), + * InlineKeyboardButton(text=RENEW_KEY, callback_data="view_keys"), * ) * await bot.send_message( # <<<<<<<<<<<<<< * chat_id=user_id, @@ -4782,7 +4782,7 @@ static PyObject *__pyx_gb_8handlers_8payments_5utils_2generator(__pyx_CoroutineO __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "handlers/payments/utils.py":77 - * InlineKeyboardButton(text=ADD_KEY, callback_data="create_key"), + * InlineKeyboardButton(text=RENEW_KEY, callback_data="view_keys"), * ) * await bot.send_message( # <<<<<<<<<<<<<< * chat_id=user_id, @@ -4899,7 +4899,7 @@ static PyObject *__pyx_gb_8handlers_8payments_5utils_2generator(__pyx_CoroutineO * finally: * await conn.close() # <<<<<<<<<<<<<< * else: - * builder.row(InlineKeyboardButton(text=RENEW_KEY, callback_data="view_keys")) + * builder.row(InlineKeyboardButton(text=ADD_KEY, callback_data="create_key")) */ /*finally:*/ { /*normal exit:*/{ @@ -5241,8 +5241,8 @@ static PyObject *__pyx_gb_8handlers_8payments_5utils_2generator(__pyx_CoroutineO /* "handlers/payments/utils.py":87 * await conn.close() * else: - * builder.row(InlineKeyboardButton(text=RENEW_KEY, callback_data="view_keys")) # <<<<<<<<<<<<<< - * builder.row(InlineKeyboardButton(text=ADD_KEY, callback_data="create_key")) + * builder.row(InlineKeyboardButton(text=ADD_KEY, callback_data="create_key")) # <<<<<<<<<<<<<< + * builder.row(InlineKeyboardButton(text=RENEW_KEY, callback_data="view_keys")) * */ /*else*/ { @@ -5252,11 +5252,11 @@ static PyObject *__pyx_gb_8handlers_8payments_5utils_2generator(__pyx_CoroutineO __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 87, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_12); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_RENEW_KEY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L4_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ADD_KEY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_text, __pyx_t_6) < 0) __PYX_ERR(0, 87, __pyx_L4_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_callback_data, __pyx_n_u_view_keys) < 0) __PYX_ERR(0, 87, __pyx_L4_error) + if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_callback_data, __pyx_n_u_create_key) < 0) __PYX_ERR(0, 87, __pyx_L4_error) __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -5288,8 +5288,8 @@ static PyObject *__pyx_gb_8handlers_8payments_5utils_2generator(__pyx_CoroutineO /* "handlers/payments/utils.py":88 * else: - * builder.row(InlineKeyboardButton(text=RENEW_KEY, callback_data="view_keys")) - * builder.row(InlineKeyboardButton(text=ADD_KEY, callback_data="create_key")) # <<<<<<<<<<<<<< + * builder.row(InlineKeyboardButton(text=ADD_KEY, callback_data="create_key")) + * builder.row(InlineKeyboardButton(text=RENEW_KEY, callback_data="view_keys")) # <<<<<<<<<<<<<< * * await bot.send_message( */ @@ -5299,11 +5299,11 @@ static PyObject *__pyx_gb_8handlers_8payments_5utils_2generator(__pyx_CoroutineO __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 88, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_12); - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_ADD_KEY); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 88, __pyx_L4_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_RENEW_KEY); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 88, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_text, __pyx_t_9) < 0) __PYX_ERR(0, 88, __pyx_L4_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_callback_data, __pyx_n_u_create_key) < 0) __PYX_ERR(0, 88, __pyx_L4_error) + if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_callback_data, __pyx_n_u_view_keys) < 0) __PYX_ERR(0, 88, __pyx_L4_error) __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 88, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -5334,7 +5334,7 @@ static PyObject *__pyx_gb_8handlers_8payments_5utils_2generator(__pyx_CoroutineO __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "handlers/payments/utils.py":90 - * builder.row(InlineKeyboardButton(text=ADD_KEY, callback_data="create_key")) + * builder.row(InlineKeyboardButton(text=RENEW_KEY, callback_data="view_keys")) * * await bot.send_message( # <<<<<<<<<<<<<< * chat_id=user_id, @@ -5417,7 +5417,7 @@ static PyObject *__pyx_gb_8handlers_8payments_5utils_2generator(__pyx_CoroutineO __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "handlers/payments/utils.py":90 - * builder.row(InlineKeyboardButton(text=ADD_KEY, callback_data="create_key")) + * builder.row(InlineKeyboardButton(text=RENEW_KEY, callback_data="view_keys")) * * await bot.send_message( # <<<<<<<<<<<<<< * chat_id=user_id, diff --git a/handlers/payments/utils.cpython-312-x86_64-linux-gnu.so b/handlers/payments/utils.cpython-312-x86_64-linux-gnu.so index f32899ff..19c9418c 100755 Binary files a/handlers/payments/utils.cpython-312-x86_64-linux-gnu.so and b/handlers/payments/utils.cpython-312-x86_64-linux-gnu.so differ diff --git a/handlers/payments/yookassa_pay.c b/handlers/payments/yookassa_pay.c index 89e94d2a..cf9b24d1 100644 --- a/handlers/payments/yookassa_pay.c +++ b/handlers/payments/yookassa_pay.c @@ -1497,7 +1497,7 @@ struct __pyx_obj_8handlers_8payments_12yookassa_pay___pyx_scope_struct_3_process struct __pyx_obj_8handlers_8payments_12yookassa_pay___pyx_scope_struct_4_process_custom_amount_input; struct __pyx_obj_8handlers_8payments_12yookassa_pay___pyx_scope_struct_5__send_message; -/* "handlers/payments/yookassa_pay.py":52 +/* "handlers/payments/yookassa_pay.py":62 * * * @router.callback_query(F.data == "pay_yookassa") # <<<<<<<<<<<<<< @@ -1518,7 +1518,7 @@ struct __pyx_obj_8handlers_8payments_12yookassa_pay___pyx_scope_struct__process_ }; -/* "handlers/payments/yookassa_pay.py":110 +/* "handlers/payments/yookassa_pay.py":120 * * * @router.callback_query(F.data.startswith("yookassa_amount|")) # <<<<<<<<<<<<<< @@ -1541,7 +1541,7 @@ struct __pyx_obj_8handlers_8payments_12yookassa_pay___pyx_scope_struct_1_process }; -/* "handlers/payments/yookassa_pay.py":184 +/* "handlers/payments/yookassa_pay.py":194 * * * async def yookassa_webhook(request): # <<<<<<<<<<<<<< @@ -1569,7 +1569,7 @@ struct __pyx_obj_8handlers_8payments_12yookassa_pay___pyx_scope_struct_2_yookass }; -/* "handlers/payments/yookassa_pay.py":228 +/* "handlers/payments/yookassa_pay.py":238 * * * @router.callback_query(F.data == "enter_custom_amount_yookassa") # <<<<<<<<<<<<<< @@ -1584,7 +1584,7 @@ struct __pyx_obj_8handlers_8payments_12yookassa_pay___pyx_scope_struct_3_process }; -/* "handlers/payments/yookassa_pay.py":244 +/* "handlers/payments/yookassa_pay.py":254 * * * @router.message(ReplenishBalanceState.entering_custom_amount_yookassa) # <<<<<<<<<<<<<< @@ -1618,7 +1618,7 @@ struct __pyx_obj_8handlers_8payments_12yookassa_pay___pyx_scope_struct_4_process }; -/* "handlers/payments/yookassa_pay.py":346 +/* "handlers/payments/yookassa_pay.py":356 * * * async def _send_message(callback_query: types.CallbackQuery | types.Message, text: str, reply_markup=None): # <<<<<<<<<<<<<< @@ -2688,38 +2688,30 @@ static const char __pyx_k_e[] = "e"; static const char __pyx_k_i[] = "i"; static const char __pyx_k_ID[] = "\320\236\321\202\321\201\321\203\321\202\321\201\321\202\320\262\321\203\320\265\321\202 ID \320\277\320\273\320\260\321\202\320\265\320\266\320\260 \320\262 \320\267\320\260\320\277\321\200\320\276\321\201\320\265"; static const char __pyx_k__2[] = "\320\235\320\260\321\200\321\203\321\210\320\265\320\275\320\260 \321\206\320\265\320\273\320\276\321\201\321\202\320\275\320\276\321\201\321\202\321\214 \321\204\320\260\320\271\320\273\320\276\320\262! \320\236\320\261\320\275\320\276\320\262\320\270\321\202\320\265\321\201\321\214 \321\201 \320\277\320\276\320\273\320\275\320\276\320\271 \320\267\320\260\320\274\320\265\320\275\320\276\320\271 \320\277\320\260\320\277\320\272\320\270!"; -static const char __pyx_k__3[] = "\360\237\222\260 \320\222\320\262\320\265\321\201\321\202\320\270 \321\201\320\262\320\276\321\216 \321\201\321\203\320\274\320\274\321\203"; -static const char __pyx_k__4[] = "\342\254\205\357\270\217 \320\235\320\260\320\267\320\260\320\264"; -static const char __pyx_k__5[] = "\320\222\321\213\320\261\320\265\321\200\320\270\321\202\320\265 \321\201\321\203\320\274\320\274\321\203 \320\277\320\276\320\277\320\276\320\273\320\275\320\265\320\275\320\270\321\217:"; -static const char __pyx_k__7[] = "|"; -static const char __pyx_k__9[] = "@"; +static const char __pyx_k__3[] = "\320\222\321\213\320\261\320\265\321\200\320\270\321\202\320\265 \321\201\321\203\320\274\320\274\321\203 \320\277\320\276\320\277\320\276\320\273\320\275\320\265\320\275\320\270\321\217:"; +static const char __pyx_k__5[] = "|"; +static const char __pyx_k__7[] = "@"; +static const char __pyx_k__8[] = "\320\237\320\276\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\261\320\260\320\273\320\260\320\275\321\201\320\260 "; +static const char __pyx_k__9[] = "\320\222\321\213 \320\262\321\213\320\261\321\200\320\260\320\273\320\270 \320\277\320\276\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\275\320\260 "; static const char __pyx_k_gc[] = "gc"; static const char __pyx_k_id[] = "id"; static const char __pyx_k_Any[] = "Any"; +static const char __pyx_k_PAY[] = "PAY"; static const char __pyx_k_RUB[] = "RUB"; -static const char __pyx_k__10[] = "\320\237\320\276\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\261\320\260\320\273\320\260\320\275\321\201\320\260 "; -static const char __pyx_k__11[] = "\320\237\320\276\320\277\320\276\320\273\320\275\320\270\321\202\321\214"; -static const char __pyx_k__12[] = "\320\222\321\213 \320\262\321\213\320\261\321\200\320\260\320\273\320\270 \320\277\320\276\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\275\320\260 "; -static const char __pyx_k__13[] = " \321\200\321\203\320\261\320\273\320\265\320\271."; -static const char __pyx_k__14[] = "\320\236\321\210\320\270\320\261\320\272\320\260 \320\277\321\200\320\270 \321\201\320\276\320\267\320\264\320\260\320\275\320\270\320\270 \320\277\320\273\320\260\321\202\320\265\320\266\320\260."; -static const char __pyx_k__16[] = " \320\275\320\265 \320\267\320\260\320\262\320\265\321\200\321\210\321\221\320\275 \320\270\320\273\320\270 \320\275\320\265 \320\276\320\277\320\273\320\260\321\207\320\265\320\275"; -static const char __pyx_k__17[] = "\320\236\321\210\320\270\320\261\320\272\320\260 \320\277\321\200\320\270 \320\277\321\200\320\276\320\262\320\265\321\200\320\272\320\265 \320\277\320\273\320\260\321\202\320\265\320\266\320\260: "; -static const char __pyx_k__19[] = "\360\237\224\231 \320\235\320\260\320\267\320\260\320\264"; -static const char __pyx_k__20[] = "\320\237\320\276\320\266\320\260\320\273\321\203\320\271\321\201\321\202\320\260, \320\262\320\262\320\265\320\264\320\270\321\202\320\265 \321\201\321\203\320\274\320\274\321\203 \320\277\320\276\320\277\320\276\320\273\320\275\320\265\320\275\320\270\321\217."; -static const char __pyx_k__23[] = "\320\224\320\260\320\275\320\275\321\213\320\265 \320\264\320\273\321\217 \320\276\320\277\320\273\320\260\321\202\321\213 \320\275\320\265 \320\275\320\260\320\271\320\264\320\265\320\275\321\213. \320\237\320\276\320\277\321\200\320\276\320\261\321\203\320\271\321\202\320\265 \321\201\320\275\320\276\320\262\320\260."; -static const char __pyx_k__25[] = "\320\235\320\265\320\272\320\276\321\200\321\200\320\265\320\272\321\202\320\275\320\260\321\217 \321\201\321\203\320\274\320\274\320\260. \320\237\320\276\320\266\320\260\320\273\321\203\320\271\321\201\321\202\320\260, \320\262\320\262\320\265\320\264\320\270\321\202\320\265 \321\201\321\203\320\274\320\274\321\203 \320\265\321\211\320\265 \321\200\320\260\320\267."; -static const char __pyx_k__26[] = "\320\235\320\265\320\272\320\276\321\200\321\200\320\265\320\272\321\202\320\275\321\213\320\271 \320\267\320\260\320\277\321\200\320\276\321\201."; -static const char __pyx_k__27[] = "\320\241\321\203\320\274\320\274\320\260 \320\264\320\276\320\273\320\266\320\275\320\260 \320\261\321\213\321\202\321\214 \320\261\320\276\320\273\321\214\321\210\320\265 \320\275\321\203\320\273\321\217."; -static const char __pyx_k__28[] = " \321\200\321\203\320\261\320\273\320\265\320\271 \320\264\320\273\321\217 \321\201\320\276\320\267\320\264\320\260\320\275\320\270\321\217 \320\275\320\276\320\262\320\276\320\263\320\276 \320\272\320\273\321\216\321\207\320\260. \320\237\320\265\321\200\320\265\320\271\320\264\320\270\321\202\320\265 \320\277\320\276 \321\201\321\201\321\213\320\273\320\272\320\265 \320\264\320\273\321\217 \320\276\320\277\320\273\320\260\321\202\321\213:"; -static const char __pyx_k__29[] = " \321\200\321\203\320\261\320\273\320\265\320\271 \320\264\320\273\321\217 \320\277\321\200\320\276\320\264\320\273\320\265\320\275\320\270\321\217 \320\272\320\273\321\216\321\207\320\260. \320\237\320\265\321\200\320\265\320\271\320\264\320\270\321\202\320\265 \320\277\320\276 \321\201\321\201\321\213\320\273\320\272\320\265 \320\264\320\273\321\217 \320\276\320\277\320\273\320\260\321\202\321\213:"; -static const char __pyx_k__30[] = " \321\200\321\203\320\261\320\273\320\265\320\271. \320\237\320\265\321\200\320\265\320\271\320\264\320\270\321\202\320\265 \320\277\320\276 \321\201\321\201\321\213\320\273\320\272\320\265 \320\264\320\273\321\217 \320\276\320\277\320\273\320\260\321\202\321\213:"; -static const char __pyx_k__31[] = "\320\236\320\277\320\273\320\260\321\202\320\270\321\202\321\214"; -static const char __pyx_k__32[] = "\360\237\221\244 \320\233\320\270\321\207\320\275\321\213\320\271 \320\272\320\260\320\261\320\270\320\275\320\265\321\202"; -static const char __pyx_k__33[] = "\320\236\321\210\320\270\320\261\320\272\320\260 \320\277\321\200\320\270 \321\201\320\276\320\267\320\264\320\260\320\275\320\270\320\270 \320\277\320\273\320\260\321\202\320\265\320\266\320\260: "; -static const char __pyx_k__34[] = "\320\237\321\200\320\276\320\270\320\267\320\276\321\210\320\273\320\260 \320\276\321\210\320\270\320\261\320\272\320\260 \320\277\321\200\320\270 \321\201\320\276\320\267\320\264\320\260\320\275\320\270\320\270 \320\277\320\273\320\260\321\202\320\265\320\266\320\260."; -static const char __pyx_k__36[] = "*"; -static const char __pyx_k__37[] = "."; -static const char __pyx_k__46[] = "?"; +static const char __pyx_k__10[] = " \321\200\321\203\320\261\320\273\320\265\320\271."; +static const char __pyx_k__11[] = "\320\236\321\210\320\270\320\261\320\272\320\260 \320\277\321\200\320\270 \321\201\320\276\320\267\320\264\320\260\320\275\320\270\320\270 \320\277\320\273\320\260\321\202\320\265\320\266\320\260."; +static const char __pyx_k__13[] = " \320\275\320\265 \320\267\320\260\320\262\320\265\321\200\321\210\321\221\320\275 \320\270\320\273\320\270 \320\275\320\265 \320\276\320\277\320\273\320\260\321\207\320\265\320\275"; +static const char __pyx_k__14[] = "\320\236\321\210\320\270\320\261\320\272\320\260 \320\277\321\200\320\270 \320\277\321\200\320\276\320\262\320\265\321\200\320\272\320\265 \320\277\320\273\320\260\321\202\320\265\320\266\320\260: "; +static const char __pyx_k__16[] = "\320\237\320\276\320\266\320\260\320\273\321\203\320\271\321\201\321\202\320\260, \320\262\320\262\320\265\320\264\320\270\321\202\320\265 \321\201\321\203\320\274\320\274\321\203 \320\277\320\276\320\277\320\276\320\273\320\275\320\265\320\275\320\270\321\217."; +static const char __pyx_k__19[] = "\320\224\320\260\320\275\320\275\321\213\320\265 \320\264\320\273\321\217 \320\276\320\277\320\273\320\260\321\202\321\213 \320\275\320\265 \320\275\320\260\320\271\320\264\320\265\320\275\321\213. \320\237\320\276\320\277\321\200\320\276\320\261\321\203\320\271\321\202\320\265 \321\201\320\275\320\276\320\262\320\260."; +static const char __pyx_k__21[] = "\320\235\320\265\320\272\320\276\321\200\321\200\320\265\320\272\321\202\320\275\320\260\321\217 \321\201\321\203\320\274\320\274\320\260. \320\237\320\276\320\266\320\260\320\273\321\203\320\271\321\201\321\202\320\260, \320\262\320\262\320\265\320\264\320\270\321\202\320\265 \321\201\321\203\320\274\320\274\321\203 \320\265\321\211\320\265 \321\200\320\260\320\267."; +static const char __pyx_k__22[] = "\320\235\320\265\320\272\320\276\321\200\321\200\320\265\320\272\321\202\320\275\321\213\320\271 \320\267\320\260\320\277\321\200\320\276\321\201."; +static const char __pyx_k__23[] = "\320\241\321\203\320\274\320\274\320\260 \320\264\320\276\320\273\320\266\320\275\320\260 \320\261\321\213\321\202\321\214 \320\261\320\276\320\273\321\214\321\210\320\265 \320\275\321\203\320\273\321\217."; +static const char __pyx_k__24[] = "\320\236\321\210\320\270\320\261\320\272\320\260 \320\277\321\200\320\270 \321\201\320\276\320\267\320\264\320\260\320\275\320\270\320\270 \320\277\320\273\320\260\321\202\320\265\320\266\320\260: "; +static const char __pyx_k__25[] = "\320\237\321\200\320\276\320\270\320\267\320\276\321\210\320\273\320\260 \320\276\321\210\320\270\320\261\320\272\320\260 \320\277\321\200\320\270 \321\201\320\276\320\267\320\264\320\260\320\275\320\270\320\270 \320\277\320\273\320\260\321\202\320\265\320\266\320\260."; +static const char __pyx_k__27[] = "*"; +static const char __pyx_k__28[] = "."; +static const char __pyx_k__37[] = "?"; static const char __pyx_k_doc[] = "__doc__"; static const char __pyx_k_get[] = "get"; static const char __pyx_k_pay[] = "pay"; @@ -2728,6 +2720,7 @@ static const char __pyx_k_str[] = "str"; static const char __pyx_k_url[] = "url"; static const char __pyx_k_web[] = "web"; static const char __pyx_k_1_00[] = "1.00"; +static const char __pyx_k_BACK[] = "BACK"; static const char __pyx_k_ID_2[] = "\320\237\320\273\320\260\321\202\320\265\320\266 \321\201 ID "; static const char __pyx_k_args[] = "args"; static const char __pyx_k_chat[] = "chat"; @@ -2746,6 +2739,7 @@ static const char __pyx_k_text[] = "text"; static const char __pyx_k_type[] = "type"; static const char __pyx_k_uuid[] = "uuid"; static const char __pyx_k_EMAIL[] = "EMAIL"; +static const char __pyx_k_PAY_2[] = "PAY_2"; static const char __pyx_k_State[] = "State"; static const char __pyx_k_await[] = "__await__"; static const char __pyx_k_close[] = "close"; @@ -2772,6 +2766,7 @@ static const char __pyx_k_config[] = "config"; static const char __pyx_k_create[] = "create"; static const char __pyx_k_enable[] = "enable"; static const char __pyx_k_exists[] = "exists"; +static const char __pyx_k_format[] = "format"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_logger[] = "logger"; static const char __pyx_k_module[] = "__module__"; @@ -2780,6 +2775,7 @@ static const char __pyx_k_router[] = "router"; static const char __pyx_k_status[] = "status"; static const char __pyx_k_typing[] = "typing"; static const char __pyx_k_Message[] = "Message"; +static const char __pyx_k_PROFILE[] = "PROFILE"; static const char __pyx_k_Payment[] = "Payment"; static const char __pyx_k_aiogram[] = "aiogram"; static const char __pyx_k_aiohttp[] = "aiohttp"; @@ -2823,6 +2819,7 @@ static const char __pyx_k_set_state[] = "set_state"; static const char __pyx_k_succeeded[] = "succeeded"; static const char __pyx_k_user_data[] = "user_data"; static const char __pyx_k_Account_ID[] = "Account ID: "; +static const char __pyx_k_CUSTOM_SUM[] = "CUSTOM_SUM"; static const char __pyx_k_FSMContext[] = "FSMContext"; static const char __pyx_k_Secret_Key[] = "Secret Key: "; static const char __pyx_k_ValueError[] = "ValueError"; @@ -2901,13 +2898,17 @@ static const char __pyx_k_ReplenishBalanceState[] = "ReplenishBalanceState"; static const char __pyx_k_Webhook_event_received[] = "Webhook event received: "; static const char __pyx_k_aiogram_utils_keyboard[] = "aiogram.utils.keyboard"; static const char __pyx_k_handlers_payments_gift[] = "handlers.payments.gift"; +static const char __pyx_k_DEFAULT_PAYMENT_MESSAGE[] = "DEFAULT_PAYMENT_MESSAGE"; static const char __pyx_k_check_connection_exists[] = "check_connection_exists"; static const char __pyx_k_handlers_payments_utils[] = "handlers.payments.utils"; static const char __pyx_k_choosing_amount_yookassa[] = "choosing_amount_yookassa"; static const char __pyx_k_process_amount_selection[] = "process_amount_selection"; +static const char __pyx_k_handlers_buttons_yookassa[] = "handlers.buttons.yookassa"; +static const char __pyx_k_KEY_RENEWAL_PAYMENT_MESSAGE[] = "KEY_RENEWAL_PAYMENT_MESSAGE"; static const char __pyx_k_process_custom_amount_input[] = "process_custom_amount_input"; static const char __pyx_k_process_enter_custom_amount[] = "process_enter_custom_amount"; static const char __pyx_k_waiting_for_renewal_payment[] = "waiting_for_renewal_payment"; +static const char __pyx_k_KEY_CREATION_PAYMENT_MESSAGE[] = "KEY_CREATION_PAYMENT_MESSAGE"; static const char __pyx_k_enter_custom_amount_yookassa[] = "enter_custom_amount_yookassa"; static const char __pyx_k_Payment_succeeded_for_user_id[] = "Payment succeeded for user_id: "; static const char __pyx_k_process_callback_pay_yookassa[] = "process_callback_pay_yookassa"; @@ -2976,9 +2977,12 @@ typedef struct { PyObject *__pyx_kp_u_API_Yookassa; PyObject *__pyx_kp_u_Account_ID; PyObject *__pyx_n_s_Any; + PyObject *__pyx_n_s_BACK; + PyObject *__pyx_n_s_CUSTOM_SUM; PyObject *__pyx_n_s_CallbackQuery; PyObject *__pyx_n_s_Configuration; PyObject *__pyx_n_s_DATABASE_URL; + PyObject *__pyx_n_s_DEFAULT_PAYMENT_MESSAGE; PyObject *__pyx_n_s_EMAIL; PyObject *__pyx_n_s_F; PyObject *__pyx_n_s_FSMContext; @@ -2988,10 +2992,15 @@ typedef struct { PyObject *__pyx_n_s_InlineKeyboardBuilder; PyObject *__pyx_n_s_InlineKeyboardButton; PyObject *__pyx_n_s_InlineKeyboardMarkup; + PyObject *__pyx_n_s_KEY_CREATION_PAYMENT_MESSAGE; + PyObject *__pyx_n_s_KEY_RENEWAL_PAYMENT_MESSAGE; PyObject *__pyx_n_s_MAIN_SECRET; PyObject *__pyx_n_s_Message; + PyObject *__pyx_n_s_PAY; PyObject *__pyx_n_s_PAYMENT_OPTIONS; + PyObject *__pyx_n_s_PAY_2; PyObject *__pyx_n_u_PIRAT0ETO7DLYA9TEBYA; + PyObject *__pyx_n_s_PROFILE; PyObject *__pyx_n_s_Payment; PyObject *__pyx_kp_u_Payment_succeeded_for_user_id; PyObject *__pyx_n_s_REDIRECT_LINK; @@ -3009,33 +3018,24 @@ typedef struct { PyObject *__pyx_n_s_YOOKASSA_SECRET_KEY; PyObject *__pyx_n_s_YOOKASSA_SHOP_ID; PyObject *__pyx_kp_u__10; - PyObject *__pyx_n_u__11; - PyObject *__pyx_kp_u__12; + PyObject *__pyx_kp_u__11; PyObject *__pyx_kp_u__13; PyObject *__pyx_kp_u__14; PyObject *__pyx_kp_u__16; - PyObject *__pyx_kp_u__17; PyObject *__pyx_kp_u__19; PyObject *__pyx_kp_u__2; - PyObject *__pyx_kp_u__20; + PyObject *__pyx_kp_u__21; + PyObject *__pyx_kp_u__22; PyObject *__pyx_kp_u__23; + PyObject *__pyx_kp_u__24; PyObject *__pyx_kp_u__25; - PyObject *__pyx_kp_u__26; - PyObject *__pyx_kp_u__27; + PyObject *__pyx_n_s__27; PyObject *__pyx_kp_u__28; - PyObject *__pyx_kp_u__29; PyObject *__pyx_kp_u__3; - PyObject *__pyx_kp_u__30; - PyObject *__pyx_n_u__31; - PyObject *__pyx_kp_u__32; - PyObject *__pyx_kp_u__33; - PyObject *__pyx_kp_u__34; - PyObject *__pyx_n_s__36; - PyObject *__pyx_kp_u__37; - PyObject *__pyx_kp_u__4; - PyObject *__pyx_n_s__46; + PyObject *__pyx_n_s__37; PyObject *__pyx_kp_u__5; PyObject *__pyx_kp_u__7; + PyObject *__pyx_kp_u__8; PyObject *__pyx_kp_u__9; PyObject *__pyx_n_s_account_id; PyObject *__pyx_n_s_add_connection; @@ -3098,6 +3098,7 @@ typedef struct { PyObject *__pyx_n_s_exists; PyObject *__pyx_n_s_expected_hash; PyObject *__pyx_n_s_find_one; + PyObject *__pyx_n_s_format; PyObject *__pyx_n_s_from_user; PyObject *__pyx_n_s_full_name; PyObject *__pyx_n_u_full_name; @@ -3106,6 +3107,7 @@ typedef struct { PyObject *__pyx_n_s_get; PyObject *__pyx_n_s_get_key_count; PyObject *__pyx_n_s_get_temporary_data; + PyObject *__pyx_n_s_handlers_buttons_yookassa; PyObject *__pyx_n_s_handlers_payments_gift; PyObject *__pyx_n_s_handlers_payments_utils; PyObject *__pyx_n_s_handlers_payments_yookassa_pay; @@ -3225,22 +3227,22 @@ typedef struct { PyObject *__pyx_int_400; PyObject *__pyx_int_500; PyObject *__pyx_codeobj_; - PyObject *__pyx_tuple__8; - PyObject *__pyx_tuple__21; - PyObject *__pyx_tuple__24; - PyObject *__pyx_tuple__38; - PyObject *__pyx_tuple__39; - PyObject *__pyx_tuple__40; - PyObject *__pyx_tuple__41; - PyObject *__pyx_tuple__42; - PyObject *__pyx_tuple__43; - PyObject *__pyx_tuple__44; - PyObject *__pyx_tuple__45; - PyObject *__pyx_codeobj__6; + PyObject *__pyx_tuple__6; + PyObject *__pyx_tuple__17; + PyObject *__pyx_tuple__20; + PyObject *__pyx_tuple__29; + PyObject *__pyx_tuple__30; + PyObject *__pyx_tuple__31; + PyObject *__pyx_tuple__32; + PyObject *__pyx_tuple__33; + PyObject *__pyx_tuple__34; + PyObject *__pyx_tuple__35; + PyObject *__pyx_tuple__36; + PyObject *__pyx_codeobj__4; + PyObject *__pyx_codeobj__12; PyObject *__pyx_codeobj__15; PyObject *__pyx_codeobj__18; - PyObject *__pyx_codeobj__22; - PyObject *__pyx_codeobj__35; + PyObject *__pyx_codeobj__26; } __pyx_mstate; #if CYTHON_USE_MODULE_STATE @@ -3300,9 +3302,12 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_kp_u_API_Yookassa); Py_CLEAR(clear_module_state->__pyx_kp_u_Account_ID); Py_CLEAR(clear_module_state->__pyx_n_s_Any); + Py_CLEAR(clear_module_state->__pyx_n_s_BACK); + Py_CLEAR(clear_module_state->__pyx_n_s_CUSTOM_SUM); Py_CLEAR(clear_module_state->__pyx_n_s_CallbackQuery); Py_CLEAR(clear_module_state->__pyx_n_s_Configuration); Py_CLEAR(clear_module_state->__pyx_n_s_DATABASE_URL); + Py_CLEAR(clear_module_state->__pyx_n_s_DEFAULT_PAYMENT_MESSAGE); Py_CLEAR(clear_module_state->__pyx_n_s_EMAIL); Py_CLEAR(clear_module_state->__pyx_n_s_F); Py_CLEAR(clear_module_state->__pyx_n_s_FSMContext); @@ -3312,10 +3317,15 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_InlineKeyboardBuilder); Py_CLEAR(clear_module_state->__pyx_n_s_InlineKeyboardButton); Py_CLEAR(clear_module_state->__pyx_n_s_InlineKeyboardMarkup); + Py_CLEAR(clear_module_state->__pyx_n_s_KEY_CREATION_PAYMENT_MESSAGE); + Py_CLEAR(clear_module_state->__pyx_n_s_KEY_RENEWAL_PAYMENT_MESSAGE); Py_CLEAR(clear_module_state->__pyx_n_s_MAIN_SECRET); Py_CLEAR(clear_module_state->__pyx_n_s_Message); + Py_CLEAR(clear_module_state->__pyx_n_s_PAY); Py_CLEAR(clear_module_state->__pyx_n_s_PAYMENT_OPTIONS); + Py_CLEAR(clear_module_state->__pyx_n_s_PAY_2); Py_CLEAR(clear_module_state->__pyx_n_u_PIRAT0ETO7DLYA9TEBYA); + Py_CLEAR(clear_module_state->__pyx_n_s_PROFILE); Py_CLEAR(clear_module_state->__pyx_n_s_Payment); Py_CLEAR(clear_module_state->__pyx_kp_u_Payment_succeeded_for_user_id); Py_CLEAR(clear_module_state->__pyx_n_s_REDIRECT_LINK); @@ -3333,33 +3343,24 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_YOOKASSA_SECRET_KEY); Py_CLEAR(clear_module_state->__pyx_n_s_YOOKASSA_SHOP_ID); Py_CLEAR(clear_module_state->__pyx_kp_u__10); - Py_CLEAR(clear_module_state->__pyx_n_u__11); - Py_CLEAR(clear_module_state->__pyx_kp_u__12); + Py_CLEAR(clear_module_state->__pyx_kp_u__11); Py_CLEAR(clear_module_state->__pyx_kp_u__13); Py_CLEAR(clear_module_state->__pyx_kp_u__14); Py_CLEAR(clear_module_state->__pyx_kp_u__16); - Py_CLEAR(clear_module_state->__pyx_kp_u__17); Py_CLEAR(clear_module_state->__pyx_kp_u__19); Py_CLEAR(clear_module_state->__pyx_kp_u__2); - Py_CLEAR(clear_module_state->__pyx_kp_u__20); + Py_CLEAR(clear_module_state->__pyx_kp_u__21); + Py_CLEAR(clear_module_state->__pyx_kp_u__22); Py_CLEAR(clear_module_state->__pyx_kp_u__23); + Py_CLEAR(clear_module_state->__pyx_kp_u__24); Py_CLEAR(clear_module_state->__pyx_kp_u__25); - Py_CLEAR(clear_module_state->__pyx_kp_u__26); - Py_CLEAR(clear_module_state->__pyx_kp_u__27); + Py_CLEAR(clear_module_state->__pyx_n_s__27); Py_CLEAR(clear_module_state->__pyx_kp_u__28); - Py_CLEAR(clear_module_state->__pyx_kp_u__29); Py_CLEAR(clear_module_state->__pyx_kp_u__3); - Py_CLEAR(clear_module_state->__pyx_kp_u__30); - Py_CLEAR(clear_module_state->__pyx_n_u__31); - Py_CLEAR(clear_module_state->__pyx_kp_u__32); - Py_CLEAR(clear_module_state->__pyx_kp_u__33); - Py_CLEAR(clear_module_state->__pyx_kp_u__34); - Py_CLEAR(clear_module_state->__pyx_n_s__36); - Py_CLEAR(clear_module_state->__pyx_kp_u__37); - Py_CLEAR(clear_module_state->__pyx_kp_u__4); - Py_CLEAR(clear_module_state->__pyx_n_s__46); + Py_CLEAR(clear_module_state->__pyx_n_s__37); Py_CLEAR(clear_module_state->__pyx_kp_u__5); Py_CLEAR(clear_module_state->__pyx_kp_u__7); + Py_CLEAR(clear_module_state->__pyx_kp_u__8); Py_CLEAR(clear_module_state->__pyx_kp_u__9); Py_CLEAR(clear_module_state->__pyx_n_s_account_id); Py_CLEAR(clear_module_state->__pyx_n_s_add_connection); @@ -3422,6 +3423,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_exists); Py_CLEAR(clear_module_state->__pyx_n_s_expected_hash); Py_CLEAR(clear_module_state->__pyx_n_s_find_one); + Py_CLEAR(clear_module_state->__pyx_n_s_format); Py_CLEAR(clear_module_state->__pyx_n_s_from_user); Py_CLEAR(clear_module_state->__pyx_n_s_full_name); Py_CLEAR(clear_module_state->__pyx_n_u_full_name); @@ -3430,6 +3432,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_get); Py_CLEAR(clear_module_state->__pyx_n_s_get_key_count); Py_CLEAR(clear_module_state->__pyx_n_s_get_temporary_data); + Py_CLEAR(clear_module_state->__pyx_n_s_handlers_buttons_yookassa); Py_CLEAR(clear_module_state->__pyx_n_s_handlers_payments_gift); Py_CLEAR(clear_module_state->__pyx_n_s_handlers_payments_utils); Py_CLEAR(clear_module_state->__pyx_n_s_handlers_payments_yookassa_pay); @@ -3549,22 +3552,22 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_int_400); Py_CLEAR(clear_module_state->__pyx_int_500); Py_CLEAR(clear_module_state->__pyx_codeobj_); - Py_CLEAR(clear_module_state->__pyx_tuple__8); - Py_CLEAR(clear_module_state->__pyx_tuple__21); - Py_CLEAR(clear_module_state->__pyx_tuple__24); - Py_CLEAR(clear_module_state->__pyx_tuple__38); - Py_CLEAR(clear_module_state->__pyx_tuple__39); - Py_CLEAR(clear_module_state->__pyx_tuple__40); - Py_CLEAR(clear_module_state->__pyx_tuple__41); - Py_CLEAR(clear_module_state->__pyx_tuple__42); - Py_CLEAR(clear_module_state->__pyx_tuple__43); - Py_CLEAR(clear_module_state->__pyx_tuple__44); - Py_CLEAR(clear_module_state->__pyx_tuple__45); - Py_CLEAR(clear_module_state->__pyx_codeobj__6); + Py_CLEAR(clear_module_state->__pyx_tuple__6); + Py_CLEAR(clear_module_state->__pyx_tuple__17); + Py_CLEAR(clear_module_state->__pyx_tuple__20); + Py_CLEAR(clear_module_state->__pyx_tuple__29); + Py_CLEAR(clear_module_state->__pyx_tuple__30); + Py_CLEAR(clear_module_state->__pyx_tuple__31); + Py_CLEAR(clear_module_state->__pyx_tuple__32); + Py_CLEAR(clear_module_state->__pyx_tuple__33); + Py_CLEAR(clear_module_state->__pyx_tuple__34); + Py_CLEAR(clear_module_state->__pyx_tuple__35); + Py_CLEAR(clear_module_state->__pyx_tuple__36); + Py_CLEAR(clear_module_state->__pyx_codeobj__4); + Py_CLEAR(clear_module_state->__pyx_codeobj__12); Py_CLEAR(clear_module_state->__pyx_codeobj__15); Py_CLEAR(clear_module_state->__pyx_codeobj__18); - Py_CLEAR(clear_module_state->__pyx_codeobj__22); - Py_CLEAR(clear_module_state->__pyx_codeobj__35); + Py_CLEAR(clear_module_state->__pyx_codeobj__26); return 0; } #endif @@ -3602,9 +3605,12 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_kp_u_API_Yookassa); Py_VISIT(traverse_module_state->__pyx_kp_u_Account_ID); Py_VISIT(traverse_module_state->__pyx_n_s_Any); + Py_VISIT(traverse_module_state->__pyx_n_s_BACK); + Py_VISIT(traverse_module_state->__pyx_n_s_CUSTOM_SUM); Py_VISIT(traverse_module_state->__pyx_n_s_CallbackQuery); Py_VISIT(traverse_module_state->__pyx_n_s_Configuration); Py_VISIT(traverse_module_state->__pyx_n_s_DATABASE_URL); + Py_VISIT(traverse_module_state->__pyx_n_s_DEFAULT_PAYMENT_MESSAGE); Py_VISIT(traverse_module_state->__pyx_n_s_EMAIL); Py_VISIT(traverse_module_state->__pyx_n_s_F); Py_VISIT(traverse_module_state->__pyx_n_s_FSMContext); @@ -3614,10 +3620,15 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_InlineKeyboardBuilder); Py_VISIT(traverse_module_state->__pyx_n_s_InlineKeyboardButton); Py_VISIT(traverse_module_state->__pyx_n_s_InlineKeyboardMarkup); + Py_VISIT(traverse_module_state->__pyx_n_s_KEY_CREATION_PAYMENT_MESSAGE); + Py_VISIT(traverse_module_state->__pyx_n_s_KEY_RENEWAL_PAYMENT_MESSAGE); Py_VISIT(traverse_module_state->__pyx_n_s_MAIN_SECRET); Py_VISIT(traverse_module_state->__pyx_n_s_Message); + Py_VISIT(traverse_module_state->__pyx_n_s_PAY); Py_VISIT(traverse_module_state->__pyx_n_s_PAYMENT_OPTIONS); + Py_VISIT(traverse_module_state->__pyx_n_s_PAY_2); Py_VISIT(traverse_module_state->__pyx_n_u_PIRAT0ETO7DLYA9TEBYA); + Py_VISIT(traverse_module_state->__pyx_n_s_PROFILE); Py_VISIT(traverse_module_state->__pyx_n_s_Payment); Py_VISIT(traverse_module_state->__pyx_kp_u_Payment_succeeded_for_user_id); Py_VISIT(traverse_module_state->__pyx_n_s_REDIRECT_LINK); @@ -3635,33 +3646,24 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_YOOKASSA_SECRET_KEY); Py_VISIT(traverse_module_state->__pyx_n_s_YOOKASSA_SHOP_ID); Py_VISIT(traverse_module_state->__pyx_kp_u__10); - Py_VISIT(traverse_module_state->__pyx_n_u__11); - Py_VISIT(traverse_module_state->__pyx_kp_u__12); + Py_VISIT(traverse_module_state->__pyx_kp_u__11); Py_VISIT(traverse_module_state->__pyx_kp_u__13); Py_VISIT(traverse_module_state->__pyx_kp_u__14); Py_VISIT(traverse_module_state->__pyx_kp_u__16); - Py_VISIT(traverse_module_state->__pyx_kp_u__17); Py_VISIT(traverse_module_state->__pyx_kp_u__19); Py_VISIT(traverse_module_state->__pyx_kp_u__2); - Py_VISIT(traverse_module_state->__pyx_kp_u__20); + Py_VISIT(traverse_module_state->__pyx_kp_u__21); + Py_VISIT(traverse_module_state->__pyx_kp_u__22); Py_VISIT(traverse_module_state->__pyx_kp_u__23); + Py_VISIT(traverse_module_state->__pyx_kp_u__24); Py_VISIT(traverse_module_state->__pyx_kp_u__25); - Py_VISIT(traverse_module_state->__pyx_kp_u__26); - Py_VISIT(traverse_module_state->__pyx_kp_u__27); + Py_VISIT(traverse_module_state->__pyx_n_s__27); Py_VISIT(traverse_module_state->__pyx_kp_u__28); - Py_VISIT(traverse_module_state->__pyx_kp_u__29); Py_VISIT(traverse_module_state->__pyx_kp_u__3); - Py_VISIT(traverse_module_state->__pyx_kp_u__30); - Py_VISIT(traverse_module_state->__pyx_n_u__31); - Py_VISIT(traverse_module_state->__pyx_kp_u__32); - Py_VISIT(traverse_module_state->__pyx_kp_u__33); - Py_VISIT(traverse_module_state->__pyx_kp_u__34); - Py_VISIT(traverse_module_state->__pyx_n_s__36); - Py_VISIT(traverse_module_state->__pyx_kp_u__37); - Py_VISIT(traverse_module_state->__pyx_kp_u__4); - Py_VISIT(traverse_module_state->__pyx_n_s__46); + Py_VISIT(traverse_module_state->__pyx_n_s__37); Py_VISIT(traverse_module_state->__pyx_kp_u__5); Py_VISIT(traverse_module_state->__pyx_kp_u__7); + Py_VISIT(traverse_module_state->__pyx_kp_u__8); Py_VISIT(traverse_module_state->__pyx_kp_u__9); Py_VISIT(traverse_module_state->__pyx_n_s_account_id); Py_VISIT(traverse_module_state->__pyx_n_s_add_connection); @@ -3724,6 +3726,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_exists); Py_VISIT(traverse_module_state->__pyx_n_s_expected_hash); Py_VISIT(traverse_module_state->__pyx_n_s_find_one); + Py_VISIT(traverse_module_state->__pyx_n_s_format); Py_VISIT(traverse_module_state->__pyx_n_s_from_user); Py_VISIT(traverse_module_state->__pyx_n_s_full_name); Py_VISIT(traverse_module_state->__pyx_n_u_full_name); @@ -3732,6 +3735,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_get); Py_VISIT(traverse_module_state->__pyx_n_s_get_key_count); Py_VISIT(traverse_module_state->__pyx_n_s_get_temporary_data); + Py_VISIT(traverse_module_state->__pyx_n_s_handlers_buttons_yookassa); Py_VISIT(traverse_module_state->__pyx_n_s_handlers_payments_gift); Py_VISIT(traverse_module_state->__pyx_n_s_handlers_payments_utils); Py_VISIT(traverse_module_state->__pyx_n_s_handlers_payments_yookassa_pay); @@ -3851,22 +3855,22 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_int_400); Py_VISIT(traverse_module_state->__pyx_int_500); Py_VISIT(traverse_module_state->__pyx_codeobj_); - Py_VISIT(traverse_module_state->__pyx_tuple__8); - Py_VISIT(traverse_module_state->__pyx_tuple__21); - Py_VISIT(traverse_module_state->__pyx_tuple__24); - Py_VISIT(traverse_module_state->__pyx_tuple__38); - Py_VISIT(traverse_module_state->__pyx_tuple__39); - Py_VISIT(traverse_module_state->__pyx_tuple__40); - Py_VISIT(traverse_module_state->__pyx_tuple__41); - Py_VISIT(traverse_module_state->__pyx_tuple__42); - Py_VISIT(traverse_module_state->__pyx_tuple__43); - Py_VISIT(traverse_module_state->__pyx_tuple__44); - Py_VISIT(traverse_module_state->__pyx_tuple__45); - Py_VISIT(traverse_module_state->__pyx_codeobj__6); + Py_VISIT(traverse_module_state->__pyx_tuple__6); + Py_VISIT(traverse_module_state->__pyx_tuple__17); + Py_VISIT(traverse_module_state->__pyx_tuple__20); + Py_VISIT(traverse_module_state->__pyx_tuple__29); + Py_VISIT(traverse_module_state->__pyx_tuple__30); + Py_VISIT(traverse_module_state->__pyx_tuple__31); + Py_VISIT(traverse_module_state->__pyx_tuple__32); + Py_VISIT(traverse_module_state->__pyx_tuple__33); + Py_VISIT(traverse_module_state->__pyx_tuple__34); + Py_VISIT(traverse_module_state->__pyx_tuple__35); + Py_VISIT(traverse_module_state->__pyx_tuple__36); + Py_VISIT(traverse_module_state->__pyx_codeobj__4); + Py_VISIT(traverse_module_state->__pyx_codeobj__12); Py_VISIT(traverse_module_state->__pyx_codeobj__15); Py_VISIT(traverse_module_state->__pyx_codeobj__18); - Py_VISIT(traverse_module_state->__pyx_codeobj__22); - Py_VISIT(traverse_module_state->__pyx_codeobj__35); + Py_VISIT(traverse_module_state->__pyx_codeobj__26); return 0; } #endif @@ -3914,9 +3918,12 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_kp_u_API_Yookassa __pyx_mstate_global->__pyx_kp_u_API_Yookassa #define __pyx_kp_u_Account_ID __pyx_mstate_global->__pyx_kp_u_Account_ID #define __pyx_n_s_Any __pyx_mstate_global->__pyx_n_s_Any +#define __pyx_n_s_BACK __pyx_mstate_global->__pyx_n_s_BACK +#define __pyx_n_s_CUSTOM_SUM __pyx_mstate_global->__pyx_n_s_CUSTOM_SUM #define __pyx_n_s_CallbackQuery __pyx_mstate_global->__pyx_n_s_CallbackQuery #define __pyx_n_s_Configuration __pyx_mstate_global->__pyx_n_s_Configuration #define __pyx_n_s_DATABASE_URL __pyx_mstate_global->__pyx_n_s_DATABASE_URL +#define __pyx_n_s_DEFAULT_PAYMENT_MESSAGE __pyx_mstate_global->__pyx_n_s_DEFAULT_PAYMENT_MESSAGE #define __pyx_n_s_EMAIL __pyx_mstate_global->__pyx_n_s_EMAIL #define __pyx_n_s_F __pyx_mstate_global->__pyx_n_s_F #define __pyx_n_s_FSMContext __pyx_mstate_global->__pyx_n_s_FSMContext @@ -3926,10 +3933,15 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_InlineKeyboardBuilder __pyx_mstate_global->__pyx_n_s_InlineKeyboardBuilder #define __pyx_n_s_InlineKeyboardButton __pyx_mstate_global->__pyx_n_s_InlineKeyboardButton #define __pyx_n_s_InlineKeyboardMarkup __pyx_mstate_global->__pyx_n_s_InlineKeyboardMarkup +#define __pyx_n_s_KEY_CREATION_PAYMENT_MESSAGE __pyx_mstate_global->__pyx_n_s_KEY_CREATION_PAYMENT_MESSAGE +#define __pyx_n_s_KEY_RENEWAL_PAYMENT_MESSAGE __pyx_mstate_global->__pyx_n_s_KEY_RENEWAL_PAYMENT_MESSAGE #define __pyx_n_s_MAIN_SECRET __pyx_mstate_global->__pyx_n_s_MAIN_SECRET #define __pyx_n_s_Message __pyx_mstate_global->__pyx_n_s_Message +#define __pyx_n_s_PAY __pyx_mstate_global->__pyx_n_s_PAY #define __pyx_n_s_PAYMENT_OPTIONS __pyx_mstate_global->__pyx_n_s_PAYMENT_OPTIONS +#define __pyx_n_s_PAY_2 __pyx_mstate_global->__pyx_n_s_PAY_2 #define __pyx_n_u_PIRAT0ETO7DLYA9TEBYA __pyx_mstate_global->__pyx_n_u_PIRAT0ETO7DLYA9TEBYA +#define __pyx_n_s_PROFILE __pyx_mstate_global->__pyx_n_s_PROFILE #define __pyx_n_s_Payment __pyx_mstate_global->__pyx_n_s_Payment #define __pyx_kp_u_Payment_succeeded_for_user_id __pyx_mstate_global->__pyx_kp_u_Payment_succeeded_for_user_id #define __pyx_n_s_REDIRECT_LINK __pyx_mstate_global->__pyx_n_s_REDIRECT_LINK @@ -3947,33 +3959,24 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_YOOKASSA_SECRET_KEY __pyx_mstate_global->__pyx_n_s_YOOKASSA_SECRET_KEY #define __pyx_n_s_YOOKASSA_SHOP_ID __pyx_mstate_global->__pyx_n_s_YOOKASSA_SHOP_ID #define __pyx_kp_u__10 __pyx_mstate_global->__pyx_kp_u__10 -#define __pyx_n_u__11 __pyx_mstate_global->__pyx_n_u__11 -#define __pyx_kp_u__12 __pyx_mstate_global->__pyx_kp_u__12 +#define __pyx_kp_u__11 __pyx_mstate_global->__pyx_kp_u__11 #define __pyx_kp_u__13 __pyx_mstate_global->__pyx_kp_u__13 #define __pyx_kp_u__14 __pyx_mstate_global->__pyx_kp_u__14 #define __pyx_kp_u__16 __pyx_mstate_global->__pyx_kp_u__16 -#define __pyx_kp_u__17 __pyx_mstate_global->__pyx_kp_u__17 #define __pyx_kp_u__19 __pyx_mstate_global->__pyx_kp_u__19 #define __pyx_kp_u__2 __pyx_mstate_global->__pyx_kp_u__2 -#define __pyx_kp_u__20 __pyx_mstate_global->__pyx_kp_u__20 +#define __pyx_kp_u__21 __pyx_mstate_global->__pyx_kp_u__21 +#define __pyx_kp_u__22 __pyx_mstate_global->__pyx_kp_u__22 #define __pyx_kp_u__23 __pyx_mstate_global->__pyx_kp_u__23 +#define __pyx_kp_u__24 __pyx_mstate_global->__pyx_kp_u__24 #define __pyx_kp_u__25 __pyx_mstate_global->__pyx_kp_u__25 -#define __pyx_kp_u__26 __pyx_mstate_global->__pyx_kp_u__26 -#define __pyx_kp_u__27 __pyx_mstate_global->__pyx_kp_u__27 +#define __pyx_n_s__27 __pyx_mstate_global->__pyx_n_s__27 #define __pyx_kp_u__28 __pyx_mstate_global->__pyx_kp_u__28 -#define __pyx_kp_u__29 __pyx_mstate_global->__pyx_kp_u__29 #define __pyx_kp_u__3 __pyx_mstate_global->__pyx_kp_u__3 -#define __pyx_kp_u__30 __pyx_mstate_global->__pyx_kp_u__30 -#define __pyx_n_u__31 __pyx_mstate_global->__pyx_n_u__31 -#define __pyx_kp_u__32 __pyx_mstate_global->__pyx_kp_u__32 -#define __pyx_kp_u__33 __pyx_mstate_global->__pyx_kp_u__33 -#define __pyx_kp_u__34 __pyx_mstate_global->__pyx_kp_u__34 -#define __pyx_n_s__36 __pyx_mstate_global->__pyx_n_s__36 -#define __pyx_kp_u__37 __pyx_mstate_global->__pyx_kp_u__37 -#define __pyx_kp_u__4 __pyx_mstate_global->__pyx_kp_u__4 -#define __pyx_n_s__46 __pyx_mstate_global->__pyx_n_s__46 +#define __pyx_n_s__37 __pyx_mstate_global->__pyx_n_s__37 #define __pyx_kp_u__5 __pyx_mstate_global->__pyx_kp_u__5 #define __pyx_kp_u__7 __pyx_mstate_global->__pyx_kp_u__7 +#define __pyx_kp_u__8 __pyx_mstate_global->__pyx_kp_u__8 #define __pyx_kp_u__9 __pyx_mstate_global->__pyx_kp_u__9 #define __pyx_n_s_account_id __pyx_mstate_global->__pyx_n_s_account_id #define __pyx_n_s_add_connection __pyx_mstate_global->__pyx_n_s_add_connection @@ -4036,6 +4039,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_exists __pyx_mstate_global->__pyx_n_s_exists #define __pyx_n_s_expected_hash __pyx_mstate_global->__pyx_n_s_expected_hash #define __pyx_n_s_find_one __pyx_mstate_global->__pyx_n_s_find_one +#define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format #define __pyx_n_s_from_user __pyx_mstate_global->__pyx_n_s_from_user #define __pyx_n_s_full_name __pyx_mstate_global->__pyx_n_s_full_name #define __pyx_n_u_full_name __pyx_mstate_global->__pyx_n_u_full_name @@ -4044,6 +4048,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_get __pyx_mstate_global->__pyx_n_s_get #define __pyx_n_s_get_key_count __pyx_mstate_global->__pyx_n_s_get_key_count #define __pyx_n_s_get_temporary_data __pyx_mstate_global->__pyx_n_s_get_temporary_data +#define __pyx_n_s_handlers_buttons_yookassa __pyx_mstate_global->__pyx_n_s_handlers_buttons_yookassa #define __pyx_n_s_handlers_payments_gift __pyx_mstate_global->__pyx_n_s_handlers_payments_gift #define __pyx_n_s_handlers_payments_utils __pyx_mstate_global->__pyx_n_s_handlers_payments_utils #define __pyx_n_s_handlers_payments_yookassa_pay __pyx_mstate_global->__pyx_n_s_handlers_payments_yookassa_pay @@ -4163,26 +4168,26 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_int_400 __pyx_mstate_global->__pyx_int_400 #define __pyx_int_500 __pyx_mstate_global->__pyx_int_500 #define __pyx_codeobj_ __pyx_mstate_global->__pyx_codeobj_ -#define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8 -#define __pyx_tuple__21 __pyx_mstate_global->__pyx_tuple__21 -#define __pyx_tuple__24 __pyx_mstate_global->__pyx_tuple__24 -#define __pyx_tuple__38 __pyx_mstate_global->__pyx_tuple__38 -#define __pyx_tuple__39 __pyx_mstate_global->__pyx_tuple__39 -#define __pyx_tuple__40 __pyx_mstate_global->__pyx_tuple__40 -#define __pyx_tuple__41 __pyx_mstate_global->__pyx_tuple__41 -#define __pyx_tuple__42 __pyx_mstate_global->__pyx_tuple__42 -#define __pyx_tuple__43 __pyx_mstate_global->__pyx_tuple__43 -#define __pyx_tuple__44 __pyx_mstate_global->__pyx_tuple__44 -#define __pyx_tuple__45 __pyx_mstate_global->__pyx_tuple__45 -#define __pyx_codeobj__6 __pyx_mstate_global->__pyx_codeobj__6 +#define __pyx_tuple__6 __pyx_mstate_global->__pyx_tuple__6 +#define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17 +#define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20 +#define __pyx_tuple__29 __pyx_mstate_global->__pyx_tuple__29 +#define __pyx_tuple__30 __pyx_mstate_global->__pyx_tuple__30 +#define __pyx_tuple__31 __pyx_mstate_global->__pyx_tuple__31 +#define __pyx_tuple__32 __pyx_mstate_global->__pyx_tuple__32 +#define __pyx_tuple__33 __pyx_mstate_global->__pyx_tuple__33 +#define __pyx_tuple__34 __pyx_mstate_global->__pyx_tuple__34 +#define __pyx_tuple__35 __pyx_mstate_global->__pyx_tuple__35 +#define __pyx_tuple__36 __pyx_mstate_global->__pyx_tuple__36 +#define __pyx_codeobj__4 __pyx_mstate_global->__pyx_codeobj__4 +#define __pyx_codeobj__12 __pyx_mstate_global->__pyx_codeobj__12 #define __pyx_codeobj__15 __pyx_mstate_global->__pyx_codeobj__15 #define __pyx_codeobj__18 __pyx_mstate_global->__pyx_codeobj__18 -#define __pyx_codeobj__22 __pyx_mstate_global->__pyx_codeobj__22 -#define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35 +#define __pyx_codeobj__26 __pyx_mstate_global->__pyx_codeobj__26 /* #### Code section: module_code ### */ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "handlers/payments/yookassa_pay.py":52 +/* "handlers/payments/yookassa_pay.py":62 * * * @router.callback_query(F.data == "pay_yookassa") # <<<<<<<<<<<<<< @@ -4249,7 +4254,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 52, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 62, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -4257,9 +4262,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 52, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 62, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("process_callback_pay_yookassa", 1, 3, 3, 1); __PYX_ERR(0, 52, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("process_callback_pay_yookassa", 1, 3, 3, 1); __PYX_ERR(0, 62, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -4267,14 +4272,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 52, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 62, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("process_callback_pay_yookassa", 1, 3, 3, 2); __PYX_ERR(0, 52, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("process_callback_pay_yookassa", 1, 3, 3, 2); __PYX_ERR(0, 62, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "process_callback_pay_yookassa") < 0)) __PYX_ERR(0, 52, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "process_callback_pay_yookassa") < 0)) __PYX_ERR(0, 62, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; @@ -4289,7 +4294,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("process_callback_pay_yookassa", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 52, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("process_callback_pay_yookassa", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 62, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -4328,7 +4333,7 @@ static PyObject *__pyx_pf_8handlers_8payments_12yookassa_pay_process_callback_pa if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_8handlers_8payments_12yookassa_pay___pyx_scope_struct__process_callback_pay_yookassa *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 52, __pyx_L1_error) + __PYX_ERR(0, 62, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -4342,7 +4347,7 @@ static PyObject *__pyx_pf_8handlers_8payments_12yookassa_pay_process_callback_pa __Pyx_INCREF(__pyx_cur_scope->__pyx_v_session); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_session); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_8handlers_8payments_12yookassa_pay_2generator, __pyx_codeobj_, (PyObject *) __pyx_cur_scope, __pyx_n_s_process_callback_pay_yookassa, __pyx_n_s_process_callback_pay_yookassa, __pyx_n_s_handlers_payments_yookassa_pay); if (unlikely(!gen)) __PYX_ERR(0, 52, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_8handlers_8payments_12yookassa_pay_2generator, __pyx_codeobj_, (PyObject *) __pyx_cur_scope, __pyx_n_s_process_callback_pay_yookassa, __pyx_n_s_process_callback_pay_yookassa, __pyx_n_s_handlers_payments_yookassa_pay); if (unlikely(!gen)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -4395,9 +4400,9 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 52, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 62, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":57 + /* "handlers/payments/yookassa_pay.py":67 * ): * * expected_hash = "HASHHASHYOOKASSA" # <<<<<<<<<<<<<< @@ -4408,29 +4413,29 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co __Pyx_GIVEREF(__pyx_n_u_HASHHASHYOOKASSA); __pyx_cur_scope->__pyx_v_expected_hash = __pyx_n_u_HASHHASHYOOKASSA; - /* "handlers/payments/yookassa_pay.py":58 + /* "handlers/payments/yookassa_pay.py":68 * * expected_hash = "HASHHASHYOOKASSA" * if YOOKASSA_HASH != expected_hash: # <<<<<<<<<<<<<< * logger.error(" ! !") * await callback_query.message.answer( */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_YOOKASSA_HASH); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_YOOKASSA_HASH); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_cur_scope->__pyx_v_expected_hash, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 58, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_cur_scope->__pyx_v_expected_hash, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "handlers/payments/yookassa_pay.py":59 + /* "handlers/payments/yookassa_pay.py":69 * expected_hash = "HASHHASHYOOKASSA" * if YOOKASSA_HASH != expected_hash: * logger.error(" ! !") # <<<<<<<<<<<<<< * await callback_query.message.answer( * text=" , @solonet_sup." */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -4451,44 +4456,44 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__2}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":60 + /* "handlers/payments/yookassa_pay.py":70 * if YOOKASSA_HASH != expected_hash: * logger.error(" ! !") * await callback_query.message.answer( # <<<<<<<<<<<<<< * text=" , @solonet_sup." * ) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_answer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_answer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":61 + /* "handlers/payments/yookassa_pay.py":71 * logger.error(" ! !") * await callback_query.message.answer( * text=" , @solonet_sup." # <<<<<<<<<<<<<< * ) * return */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_text, __pyx_kp_u_solonet_sup) < 0) __PYX_ERR(0, 61, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_text, __pyx_kp_u_solonet_sup) < 0) __PYX_ERR(0, 71, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":60 + /* "handlers/payments/yookassa_pay.py":70 * if YOOKASSA_HASH != expected_hash: * logger.error(" ! !") * await callback_query.message.answer( # <<<<<<<<<<<<<< * text=" , @solonet_sup." * ) */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -4503,16 +4508,16 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L5_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 60, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 70, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 60, __pyx_L1_error) + else __PYX_ERR(0, 70, __pyx_L1_error) } } - /* "handlers/payments/yookassa_pay.py":63 + /* "handlers/payments/yookassa_pay.py":73 * text=" , @solonet_sup." * ) * return # <<<<<<<<<<<<<< @@ -4523,7 +4528,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co __pyx_r = NULL; goto __pyx_L0; - /* "handlers/payments/yookassa_pay.py":58 + /* "handlers/payments/yookassa_pay.py":68 * * expected_hash = "HASHHASHYOOKASSA" * if YOOKASSA_HASH != expected_hash: # <<<<<<<<<<<<<< @@ -4532,33 +4537,33 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co */ } - /* "handlers/payments/yookassa_pay.py":64 + /* "handlers/payments/yookassa_pay.py":74 * ) * return * tg_id = callback_query.message.chat.id # <<<<<<<<<<<<<< * * builder = InlineKeyboardBuilder() */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_chat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_chat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_tg_id = __pyx_t_3; __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":66 + /* "handlers/payments/yookassa_pay.py":76 * tg_id = callback_query.message.chat.id * * builder = InlineKeyboardBuilder() # <<<<<<<<<<<<<< * * for i in range(0, len(PAYMENT_OPTIONS), 2): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_InlineKeyboardBuilder); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_InlineKeyboardBuilder); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -4578,7 +4583,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -4586,31 +4591,31 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co __pyx_cur_scope->__pyx_v_builder = __pyx_t_3; __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":68 + /* "handlers/payments/yookassa_pay.py":78 * builder = InlineKeyboardBuilder() * * for i in range(0, len(PAYMENT_OPTIONS), 2): # <<<<<<<<<<<<<< * if i + 1 < len(PAYMENT_OPTIONS): * builder.row( */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PAYMENT_OPTIONS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PAYMENT_OPTIONS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_0)) __PYX_ERR(0, 68, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_0)) __PYX_ERR(0, 78, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_int_2)) __PYX_ERR(0, 68, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_int_2)) __PYX_ERR(0, 78, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { @@ -4618,9 +4623,9 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 78, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -4629,28 +4634,28 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 68, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 78, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 78, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 68, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 78, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 78, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -4660,7 +4665,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 68, __pyx_L1_error) + else __PYX_ERR(0, 78, __pyx_L1_error) } break; } @@ -4671,172 +4676,172 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":69 + /* "handlers/payments/yookassa_pay.py":79 * * for i in range(0, len(PAYMENT_OPTIONS), 2): * if i + 1 < len(PAYMENT_OPTIONS): # <<<<<<<<<<<<<< * builder.row( * InlineKeyboardButton( */ - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_cur_scope->__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_cur_scope->__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PAYMENT_OPTIONS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PAYMENT_OPTIONS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_8 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_9 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_2) { - /* "handlers/payments/yookassa_pay.py":70 + /* "handlers/payments/yookassa_pay.py":80 * for i in range(0, len(PAYMENT_OPTIONS), 2): * if i + 1 < len(PAYMENT_OPTIONS): * builder.row( # <<<<<<<<<<<<<< * InlineKeyboardButton( * text=PAYMENT_OPTIONS[i]["text"], */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_builder, __pyx_n_s_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_builder, __pyx_n_s_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "handlers/payments/yookassa_pay.py":71 + /* "handlers/payments/yookassa_pay.py":81 * if i + 1 < len(PAYMENT_OPTIONS): * builder.row( * InlineKeyboardButton( # <<<<<<<<<<<<<< * text=PAYMENT_OPTIONS[i]["text"], * callback_data=f'yookassa_{PAYMENT_OPTIONS[i]["callback_data"]}', */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "handlers/payments/yookassa_pay.py":72 + /* "handlers/payments/yookassa_pay.py":82 * builder.row( * InlineKeyboardButton( * text=PAYMENT_OPTIONS[i]["text"], # <<<<<<<<<<<<<< * callback_data=f'yookassa_{PAYMENT_OPTIONS[i]["callback_data"]}', * ), */ - __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_PAYMENT_OPTIONS); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_PAYMENT_OPTIONS); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_t_12, __pyx_n_u_text); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_t_12, __pyx_n_u_text); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_text, __pyx_t_11) < 0) __PYX_ERR(0, 72, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_text, __pyx_t_11) < 0) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "handlers/payments/yookassa_pay.py":73 + /* "handlers/payments/yookassa_pay.py":83 * InlineKeyboardButton( * text=PAYMENT_OPTIONS[i]["text"], * callback_data=f'yookassa_{PAYMENT_OPTIONS[i]["callback_data"]}', # <<<<<<<<<<<<<< * ), * InlineKeyboardButton( */ - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_PAYMENT_OPTIONS); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_PAYMENT_OPTIONS); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_t_12, __pyx_n_u_callback_data); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_t_12, __pyx_n_u_callback_data); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_t_11, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_t_11, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_n_u_yookassa, __pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_n_u_yookassa, __pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_callback_data, __pyx_t_11) < 0) __PYX_ERR(0, 72, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_callback_data, __pyx_t_11) < 0) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "handlers/payments/yookassa_pay.py":71 + /* "handlers/payments/yookassa_pay.py":81 * if i + 1 < len(PAYMENT_OPTIONS): * builder.row( * InlineKeyboardButton( # <<<<<<<<<<<<<< * text=PAYMENT_OPTIONS[i]["text"], * callback_data=f'yookassa_{PAYMENT_OPTIONS[i]["callback_data"]}', */ - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 71, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "handlers/payments/yookassa_pay.py":75 + /* "handlers/payments/yookassa_pay.py":85 * callback_data=f'yookassa_{PAYMENT_OPTIONS[i]["callback_data"]}', * ), * InlineKeyboardButton( # <<<<<<<<<<<<<< * text=PAYMENT_OPTIONS[i + 1]["text"], * callback_data=f'yookassa_{PAYMENT_OPTIONS[i + 1]["callback_data"]}', */ - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - /* "handlers/payments/yookassa_pay.py":76 + /* "handlers/payments/yookassa_pay.py":86 * ), * InlineKeyboardButton( * text=PAYMENT_OPTIONS[i + 1]["text"], # <<<<<<<<<<<<<< * callback_data=f'yookassa_{PAYMENT_OPTIONS[i + 1]["callback_data"]}', * ), */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_PAYMENT_OPTIONS); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_PAYMENT_OPTIONS); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PyInt_AddObjC(__pyx_cur_scope->__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_AddObjC(__pyx_cur_scope->__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = __Pyx_PyObject_Dict_GetItem(__pyx_t_14, __pyx_n_u_text); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Dict_GetItem(__pyx_t_14, __pyx_n_u_text); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_t_13) < 0) __PYX_ERR(0, 76, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_t_13) < 0) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "handlers/payments/yookassa_pay.py":77 + /* "handlers/payments/yookassa_pay.py":87 * InlineKeyboardButton( * text=PAYMENT_OPTIONS[i + 1]["text"], * callback_data=f'yookassa_{PAYMENT_OPTIONS[i + 1]["callback_data"]}', # <<<<<<<<<<<<<< * ), * ) */ - __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_PAYMENT_OPTIONS); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_PAYMENT_OPTIONS); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_14 = __Pyx_PyInt_AddObjC(__pyx_cur_scope->__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_AddObjC(__pyx_cur_scope->__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyObject_Dict_GetItem(__pyx_t_12, __pyx_n_u_callback_data); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_Dict_GetItem(__pyx_t_12, __pyx_n_u_callback_data); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_t_14, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_t_14, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyUnicode_Concat(__pyx_n_u_yookassa, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyUnicode_Concat(__pyx_n_u_yookassa, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_callback_data, __pyx_t_14) < 0) __PYX_ERR(0, 76, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_callback_data, __pyx_t_14) < 0) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "handlers/payments/yookassa_pay.py":75 + /* "handlers/payments/yookassa_pay.py":85 * callback_data=f'yookassa_{PAYMENT_OPTIONS[i]["callback_data"]}', * ), * InlineKeyboardButton( # <<<<<<<<<<<<<< * text=PAYMENT_OPTIONS[i + 1]["text"], * callback_data=f'yookassa_{PAYMENT_OPTIONS[i + 1]["callback_data"]}', */ - __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 75, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -4860,13 +4865,13 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 70, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "handlers/payments/yookassa_pay.py":69 + /* "handlers/payments/yookassa_pay.py":79 * * for i in range(0, len(PAYMENT_OPTIONS), 2): * if i + 1 < len(PAYMENT_OPTIONS): # <<<<<<<<<<<<<< @@ -4876,7 +4881,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co goto __pyx_L8; } - /* "handlers/payments/yookassa_pay.py":81 + /* "handlers/payments/yookassa_pay.py":91 * ) * else: * builder.row( # <<<<<<<<<<<<<< @@ -4884,71 +4889,71 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co * text=PAYMENT_OPTIONS[i]["text"], */ /*else*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_builder, __pyx_n_s_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_builder, __pyx_n_s_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "handlers/payments/yookassa_pay.py":82 + /* "handlers/payments/yookassa_pay.py":92 * else: * builder.row( * InlineKeyboardButton( # <<<<<<<<<<<<<< * text=PAYMENT_OPTIONS[i]["text"], * callback_data=f'yookassa_{PAYMENT_OPTIONS[i]["callback_data"]}', */ - __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - /* "handlers/payments/yookassa_pay.py":83 + /* "handlers/payments/yookassa_pay.py":93 * builder.row( * InlineKeyboardButton( * text=PAYMENT_OPTIONS[i]["text"], # <<<<<<<<<<<<<< * callback_data=f'yookassa_{PAYMENT_OPTIONS[i]["callback_data"]}', * ) */ - __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PAYMENT_OPTIONS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PAYMENT_OPTIONS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_u_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_u_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_text, __pyx_t_3) < 0) __PYX_ERR(0, 83, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_text, __pyx_t_3) < 0) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":84 + /* "handlers/payments/yookassa_pay.py":94 * InlineKeyboardButton( * text=PAYMENT_OPTIONS[i]["text"], * callback_data=f'yookassa_{PAYMENT_OPTIONS[i]["callback_data"]}', # <<<<<<<<<<<<<< * ) * ) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PAYMENT_OPTIONS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PAYMENT_OPTIONS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_u_callback_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_u_callback_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_n_u_yookassa, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_n_u_yookassa, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_callback_data, __pyx_t_3) < 0) __PYX_ERR(0, 83, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_callback_data, __pyx_t_3) < 0) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":82 + /* "handlers/payments/yookassa_pay.py":92 * else: * builder.row( * InlineKeyboardButton( # <<<<<<<<<<<<<< * text=PAYMENT_OPTIONS[i]["text"], * callback_data=f'yookassa_{PAYMENT_OPTIONS[i]["callback_data"]}', */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_empty_tuple, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_empty_tuple, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -4971,7 +4976,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 81, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -4979,7 +4984,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co } __pyx_L8:; - /* "handlers/payments/yookassa_pay.py":68 + /* "handlers/payments/yookassa_pay.py":78 * builder = InlineKeyboardBuilder() * * for i in range(0, len(PAYMENT_OPTIONS), 2): # <<<<<<<<<<<<<< @@ -4989,46 +4994,49 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":87 + /* "handlers/payments/yookassa_pay.py":97 * ) * ) * builder.row( # <<<<<<<<<<<<<< * InlineKeyboardButton( - * text=" ", + * text=CUSTOM_SUM, */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_builder, __pyx_n_s_row); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_builder, __pyx_n_s_row); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - /* "handlers/payments/yookassa_pay.py":88 + /* "handlers/payments/yookassa_pay.py":98 * ) * builder.row( * InlineKeyboardButton( # <<<<<<<<<<<<<< - * text=" ", + * text=CUSTOM_SUM, * callback_data="enter_custom_amount_yookassa", */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "handlers/payments/yookassa_pay.py":89 + /* "handlers/payments/yookassa_pay.py":99 * builder.row( * InlineKeyboardButton( - * text=" ", # <<<<<<<<<<<<<< + * text=CUSTOM_SUM, # <<<<<<<<<<<<<< * callback_data="enter_custom_amount_yookassa", * ) */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_kp_u__3) < 0) __PYX_ERR(0, 89, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_callback_data, __pyx_n_u_enter_custom_amount_yookassa) < 0) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_CUSTOM_SUM); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_t_11) < 0) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_callback_data, __pyx_n_u_enter_custom_amount_yookassa) < 0) __PYX_ERR(0, 99, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":88 + /* "handlers/payments/yookassa_pay.py":98 * ) * builder.row( * InlineKeyboardButton( # <<<<<<<<<<<<<< - * text=" ", + * text=CUSTOM_SUM, * callback_data="enter_custom_amount_yookassa", */ - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -5051,28 +5059,31 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":93 + /* "handlers/payments/yookassa_pay.py":103 * ) * ) - * builder.row(InlineKeyboardButton(text=" ", callback_data="pay")) # <<<<<<<<<<<<<< + * builder.row(InlineKeyboardButton(text=BACK, callback_data="pay")) # <<<<<<<<<<<<<< * * key_count = await get_key_count(tg_id) */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_builder, __pyx_n_s_row); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_builder, __pyx_n_s_row); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_kp_u__4) < 0) __PYX_ERR(0, 93, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_callback_data, __pyx_n_u_pay) < 0) __PYX_ERR(0, 93, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_BACK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_t_4) < 0) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_callback_data, __pyx_n_u_pay) < 0) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -5095,20 +5106,20 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":95 - * builder.row(InlineKeyboardButton(text=" ", callback_data="pay")) + /* "handlers/payments/yookassa_pay.py":105 + * builder.row(InlineKeyboardButton(text=BACK, callback_data="pay")) * * key_count = await get_key_count(tg_id) # <<<<<<<<<<<<<< * * if key_count == 0: */ - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_get_key_count); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 95, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_get_key_count); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -5128,7 +5139,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_tg_id}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -5143,35 +5154,35 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L10_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 95, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 105, __pyx_L1_error) __pyx_t_1 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_1); } else { __pyx_t_1 = NULL; - if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_1) < 0) __PYX_ERR(0, 95, __pyx_L1_error) + if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_1) < 0) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_key_count = __pyx_t_1; __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":97 + /* "handlers/payments/yookassa_pay.py":107 * key_count = await get_key_count(tg_id) * * if key_count == 0: # <<<<<<<<<<<<<< * exists = await check_connection_exists(tg_id) * if not exists: */ - __pyx_t_2 = (__Pyx_PyInt_BoolEqObjC(__pyx_cur_scope->__pyx_v_key_count, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyInt_BoolEqObjC(__pyx_cur_scope->__pyx_v_key_count, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 107, __pyx_L1_error) if (__pyx_t_2) { - /* "handlers/payments/yookassa_pay.py":98 + /* "handlers/payments/yookassa_pay.py":108 * * if key_count == 0: * exists = await check_connection_exists(tg_id) # <<<<<<<<<<<<<< * if not exists: * await add_connection(tg_id, balance=0.0, trial=0, session=session) */ - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_check_connection_exists); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_check_connection_exists); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -5191,7 +5202,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_tg_id}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -5206,48 +5217,48 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co __pyx_generator->resume_label = 3; return __pyx_r; __pyx_L12_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 98, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 108, __pyx_L1_error) __pyx_t_1 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_1); } else { __pyx_t_1 = NULL; - if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_1) < 0) __PYX_ERR(0, 98, __pyx_L1_error) + if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_1) < 0) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_exists = __pyx_t_1; __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":99 + /* "handlers/payments/yookassa_pay.py":109 * if key_count == 0: * exists = await check_connection_exists(tg_id) * if not exists: # <<<<<<<<<<<<<< * await add_connection(tg_id, balance=0.0, trial=0, session=session) * */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_exists); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_exists); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 109, __pyx_L1_error) __pyx_t_15 = (!__pyx_t_2); if (__pyx_t_15) { - /* "handlers/payments/yookassa_pay.py":100 + /* "handlers/payments/yookassa_pay.py":110 * exists = await check_connection_exists(tg_id) * if not exists: * await add_connection(tg_id, balance=0.0, trial=0, session=session) # <<<<<<<<<<<<<< * * await callback_query.message.answer( */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_add_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_add_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_tg_id); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_tg_id); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_cur_scope->__pyx_v_tg_id)) __PYX_ERR(0, 100, __pyx_L1_error); - __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_cur_scope->__pyx_v_tg_id)) __PYX_ERR(0, 110, __pyx_L1_error); + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_balance, __pyx_float_0_0) < 0) __PYX_ERR(0, 100, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_trial, __pyx_int_0) < 0) __PYX_ERR(0, 100, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_session, __pyx_cur_scope->__pyx_v_session) < 0) __PYX_ERR(0, 100, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 100, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_balance, __pyx_float_0_0) < 0) __PYX_ERR(0, 110, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_trial, __pyx_int_0) < 0) __PYX_ERR(0, 110, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_session, __pyx_cur_scope->__pyx_v_session) < 0) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -5263,16 +5274,16 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co __pyx_generator->resume_label = 4; return __pyx_r; __pyx_L14_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 100, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 110, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 100, __pyx_L1_error) + else __PYX_ERR(0, 110, __pyx_L1_error) } } - /* "handlers/payments/yookassa_pay.py":99 + /* "handlers/payments/yookassa_pay.py":109 * if key_count == 0: * exists = await check_connection_exists(tg_id) * if not exists: # <<<<<<<<<<<<<< @@ -5281,7 +5292,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co */ } - /* "handlers/payments/yookassa_pay.py":97 + /* "handlers/payments/yookassa_pay.py":107 * key_count = await get_key_count(tg_id) * * if key_count == 0: # <<<<<<<<<<<<<< @@ -5290,38 +5301,38 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co */ } - /* "handlers/payments/yookassa_pay.py":102 + /* "handlers/payments/yookassa_pay.py":112 * await add_connection(tg_id, balance=0.0, trial=0, session=session) * * await callback_query.message.answer( # <<<<<<<<<<<<<< * text=" :", * reply_markup=builder.as_markup(), */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_answer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_answer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":103 + /* "handlers/payments/yookassa_pay.py":113 * * await callback_query.message.answer( * text=" :", # <<<<<<<<<<<<<< * reply_markup=builder.as_markup(), * ) */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_kp_u__5) < 0) __PYX_ERR(0, 103, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_kp_u__3) < 0) __PYX_ERR(0, 113, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":104 + /* "handlers/payments/yookassa_pay.py":114 * await callback_query.message.answer( * text=" :", * reply_markup=builder.as_markup(), # <<<<<<<<<<<<<< * ) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_builder, __pyx_n_s_as_markup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_builder, __pyx_n_s_as_markup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = NULL; __pyx_t_5 = 0; @@ -5341,21 +5352,21 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 104, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_reply_markup, __pyx_t_9) < 0) __PYX_ERR(0, 103, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_reply_markup, __pyx_t_9) < 0) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "handlers/payments/yookassa_pay.py":102 + /* "handlers/payments/yookassa_pay.py":112 * await add_connection(tg_id, balance=0.0, trial=0, session=session) * * await callback_query.message.answer( # <<<<<<<<<<<<<< * text=" :", * reply_markup=builder.as_markup(), */ - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -5370,27 +5381,27 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co __pyx_generator->resume_label = 5; return __pyx_r; __pyx_L15_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 102, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 112, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 102, __pyx_L1_error) + else __PYX_ERR(0, 112, __pyx_L1_error) } } - /* "handlers/payments/yookassa_pay.py":107 + /* "handlers/payments/yookassa_pay.py":117 * ) * * await state.set_state(ReplenishBalanceState.choosing_amount_yookassa) # <<<<<<<<<<<<<< * * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_state, __pyx_n_s_set_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_state, __pyx_n_s_set_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ReplenishBalanceState); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 107, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ReplenishBalanceState); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_choosing_amount_yookassa); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_choosing_amount_yookassa); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -5412,7 +5423,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 107, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -5427,17 +5438,17 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co __pyx_generator->resume_label = 6; return __pyx_r; __pyx_L16_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 107, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 117, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 107, __pyx_L1_error) + else __PYX_ERR(0, 117, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "handlers/payments/yookassa_pay.py":52 + /* "handlers/payments/yookassa_pay.py":62 * * * @router.callback_query(F.data == "pay_yookassa") # <<<<<<<<<<<<<< @@ -5472,7 +5483,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_2generator(__pyx_Co } static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "handlers/payments/yookassa_pay.py":110 +/* "handlers/payments/yookassa_pay.py":120 * * * @router.callback_query(F.data.startswith("yookassa_amount|")) # <<<<<<<<<<<<<< @@ -5536,7 +5547,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 110, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -5544,14 +5555,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 110, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("process_amount_selection", 1, 2, 2, 1); __PYX_ERR(0, 110, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("process_amount_selection", 1, 2, 2, 1); __PYX_ERR(0, 120, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "process_amount_selection") < 0)) __PYX_ERR(0, 110, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "process_amount_selection") < 0)) __PYX_ERR(0, 120, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -5564,7 +5575,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("process_amount_selection", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 110, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("process_amount_selection", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 120, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -5603,7 +5614,7 @@ static PyObject *__pyx_pf_8handlers_8payments_12yookassa_pay_3process_amount_sel if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_8handlers_8payments_12yookassa_pay___pyx_scope_struct_1_process_amount_selection *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 110, __pyx_L1_error) + __PYX_ERR(0, 120, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -5614,7 +5625,7 @@ static PyObject *__pyx_pf_8handlers_8payments_12yookassa_pay_3process_amount_sel __Pyx_INCREF(__pyx_cur_scope->__pyx_v_state); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_state); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_8handlers_8payments_12yookassa_pay_5generator1, __pyx_codeobj__6, (PyObject *) __pyx_cur_scope, __pyx_n_s_process_amount_selection, __pyx_n_s_process_amount_selection, __pyx_n_s_handlers_payments_yookassa_pay); if (unlikely(!gen)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_8handlers_8payments_12yookassa_pay_5generator1, __pyx_codeobj__4, (PyObject *) __pyx_cur_scope, __pyx_n_s_process_amount_selection, __pyx_n_s_process_amount_selection, __pyx_n_s_handlers_payments_yookassa_pay); if (unlikely(!gen)) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5665,39 +5676,39 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 110, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 120, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":114 + /* "handlers/payments/yookassa_pay.py":124 * callback_query: types.CallbackQuery, state: FSMContext * ): * data = callback_query.data.split("|", 1) # <<<<<<<<<<<<<< * * if len(data) != 2: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_data = __pyx_t_1; __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":116 + /* "handlers/payments/yookassa_pay.py":126 * data = callback_query.data.split("|", 1) * * if len(data) != 2: # <<<<<<<<<<<<<< * return * */ - __pyx_t_3 = PyObject_Length(__pyx_cur_scope->__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_cur_scope->__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 126, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 2); if (__pyx_t_4) { - /* "handlers/payments/yookassa_pay.py":117 + /* "handlers/payments/yookassa_pay.py":127 * * if len(data) != 2: * return # <<<<<<<<<<<<<< @@ -5708,7 +5719,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C __pyx_r = NULL; goto __pyx_L0; - /* "handlers/payments/yookassa_pay.py":116 + /* "handlers/payments/yookassa_pay.py":126 * data = callback_query.data.split("|", 1) * * if len(data) != 2: # <<<<<<<<<<<<<< @@ -5717,20 +5728,20 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C */ } - /* "handlers/payments/yookassa_pay.py":119 + /* "handlers/payments/yookassa_pay.py":129 * return * * amount_str = data[1] # <<<<<<<<<<<<<< * try: * amount = int(amount_str) */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_data, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_data, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_amount_str = __pyx_t_1; __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":120 + /* "handlers/payments/yookassa_pay.py":130 * * amount_str = data[1] * try: # <<<<<<<<<<<<<< @@ -5744,20 +5755,20 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { - /* "handlers/payments/yookassa_pay.py":121 + /* "handlers/payments/yookassa_pay.py":131 * amount_str = data[1] * try: * amount = int(amount_str) # <<<<<<<<<<<<<< * except ValueError: * return */ - __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_cur_scope->__pyx_v_amount_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L5_error) + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_cur_scope->__pyx_v_amount_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_amount = __pyx_t_1; __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":120 + /* "handlers/payments/yookassa_pay.py":130 * * amount_str = data[1] * try: # <<<<<<<<<<<<<< @@ -5773,7 +5784,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "handlers/payments/yookassa_pay.py":122 + /* "handlers/payments/yookassa_pay.py":132 * try: * amount = int(amount_str) * except ValueError: # <<<<<<<<<<<<<< @@ -5783,12 +5794,12 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_8) { __Pyx_AddTraceback("handlers.payments.yookassa_pay.process_amount_selection", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_9) < 0) __PYX_ERR(0, 122, __pyx_L7_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_9) < 0) __PYX_ERR(0, 132, __pyx_L7_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_9); - /* "handlers/payments/yookassa_pay.py":123 + /* "handlers/payments/yookassa_pay.py":133 * amount = int(amount_str) * except ValueError: * return # <<<<<<<<<<<<<< @@ -5804,7 +5815,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C } goto __pyx_L7_except_error; - /* "handlers/payments/yookassa_pay.py":120 + /* "handlers/payments/yookassa_pay.py":130 * * amount_str = data[1] * try: # <<<<<<<<<<<<<< @@ -5826,19 +5837,19 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C __pyx_L10_try_end:; } - /* "handlers/payments/yookassa_pay.py":125 + /* "handlers/payments/yookassa_pay.py":135 * return * * await state.update_data(amount=amount) # <<<<<<<<<<<<<< * await state.set_state( * ReplenishBalanceState.waiting_for_payment_confirmation_yookassa */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_state, __pyx_n_s_update_data); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_state, __pyx_n_s_update_data); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_amount, __pyx_cur_scope->__pyx_v_amount) < 0) __PYX_ERR(0, 125, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_amount, __pyx_cur_scope->__pyx_v_amount) < 0) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -5853,35 +5864,35 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L13_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 125, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 135, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 125, __pyx_L1_error) + else __PYX_ERR(0, 135, __pyx_L1_error) } } - /* "handlers/payments/yookassa_pay.py":126 + /* "handlers/payments/yookassa_pay.py":136 * * await state.update_data(amount=amount) * await state.set_state( # <<<<<<<<<<<<<< * ReplenishBalanceState.waiting_for_payment_confirmation_yookassa * ) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_state, __pyx_n_s_set_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_state, __pyx_n_s_set_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "handlers/payments/yookassa_pay.py":127 + /* "handlers/payments/yookassa_pay.py":137 * await state.update_data(amount=amount) * await state.set_state( * ReplenishBalanceState.waiting_for_payment_confirmation_yookassa # <<<<<<<<<<<<<< * ) * */ - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_ReplenishBalanceState); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_ReplenishBalanceState); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_waiting_for_payment_confirmation); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_waiting_for_payment_confirmation); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; @@ -5903,7 +5914,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -5918,75 +5929,75 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L14_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 126, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 136, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 126, __pyx_L1_error) + else __PYX_ERR(0, 136, __pyx_L1_error) } } - /* "handlers/payments/yookassa_pay.py":130 + /* "handlers/payments/yookassa_pay.py":140 * ) * * customer_name = callback_query.from_user.full_name # <<<<<<<<<<<<<< * customer_id = callback_query.message.chat.id * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_from_user); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_from_user); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_full_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_full_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_v_customer_name = __pyx_t_2; __pyx_t_2 = 0; - /* "handlers/payments/yookassa_pay.py":131 + /* "handlers/payments/yookassa_pay.py":141 * * customer_name = callback_query.from_user.full_name * customer_id = callback_query.message.chat.id # <<<<<<<<<<<<<< * * customer_email = f"{customer_id}@{EMAIL}" */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_chat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_chat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_v_customer_id = __pyx_t_2; __pyx_t_2 = 0; - /* "handlers/payments/yookassa_pay.py":133 + /* "handlers/payments/yookassa_pay.py":143 * customer_id = callback_query.message.chat.id * * customer_email = f"{customer_id}@{EMAIL}" # <<<<<<<<<<<<<< * * payment = Payment.create( */ - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_12 = 127; - __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_customer_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_customer_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_12; __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __Pyx_INCREF(__pyx_kp_u__9); + __Pyx_INCREF(__pyx_kp_u__7); __pyx_t_3 += 1; - __Pyx_GIVEREF(__pyx_kp_u__9); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u__9); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_EMAIL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__7); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u__7); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_EMAIL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_12; @@ -5994,208 +6005,208 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_10); __pyx_cur_scope->__pyx_v_customer_email = ((PyObject*)__pyx_t_10); __pyx_t_10 = 0; - /* "handlers/payments/yookassa_pay.py":135 + /* "handlers/payments/yookassa_pay.py":145 * customer_email = f"{customer_id}@{EMAIL}" * * payment = Payment.create( # <<<<<<<<<<<<<< * { * "amount": {"value": str(amount), "currency": "RUB"}, */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Payment); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Payment); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_create); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_create); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "handlers/payments/yookassa_pay.py":137 + /* "handlers/payments/yookassa_pay.py":147 * payment = Payment.create( * { * "amount": {"value": str(amount), "currency": "RUB"}, # <<<<<<<<<<<<<< * "confirmation": { * "type": "redirect", */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 137, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_13 = __Pyx_PyObject_Unicode(__pyx_cur_scope->__pyx_v_amount); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 137, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Unicode(__pyx_cur_scope->__pyx_v_amount); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_value, __pyx_t_13) < 0) __PYX_ERR(0, 137, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_value, __pyx_t_13) < 0) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_currency, __pyx_n_u_RUB) < 0) __PYX_ERR(0, 137, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_amount, __pyx_t_9) < 0) __PYX_ERR(0, 137, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_currency, __pyx_n_u_RUB) < 0) __PYX_ERR(0, 147, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_amount, __pyx_t_9) < 0) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "handlers/payments/yookassa_pay.py":139 + /* "handlers/payments/yookassa_pay.py":149 * "amount": {"value": str(amount), "currency": "RUB"}, * "confirmation": { * "type": "redirect", # <<<<<<<<<<<<<< * "return_url": f"{REDIRECT_LINK}", * }, */ - __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_type, __pyx_n_u_redirect) < 0) __PYX_ERR(0, 139, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_type, __pyx_n_u_redirect) < 0) __PYX_ERR(0, 149, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":140 + /* "handlers/payments/yookassa_pay.py":150 * "confirmation": { * "type": "redirect", * "return_url": f"{REDIRECT_LINK}", # <<<<<<<<<<<<<< * }, * "capture": True, */ - __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_REDIRECT_LINK); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 140, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_REDIRECT_LINK); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_t_13, __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_t_13, __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_return_url, __pyx_t_14) < 0) __PYX_ERR(0, 139, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_return_url, __pyx_t_14) < 0) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_confirmation, __pyx_t_9) < 0) __PYX_ERR(0, 137, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_confirmation, __pyx_t_9) < 0) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "handlers/payments/yookassa_pay.py":142 + /* "handlers/payments/yookassa_pay.py":152 * "return_url": f"{REDIRECT_LINK}", * }, * "capture": True, # <<<<<<<<<<<<<< * "description": f" {customer_id}", * "receipt": { */ - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_capture, Py_True) < 0) __PYX_ERR(0, 137, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_capture, Py_True) < 0) __PYX_ERR(0, 147, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":143 + /* "handlers/payments/yookassa_pay.py":153 * }, * "capture": True, * "description": f" {customer_id}", # <<<<<<<<<<<<<< * "receipt": { * "customer": { */ - __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_customer_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_customer_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_14 = __Pyx_PyUnicode_Concat(__pyx_kp_u__10, __pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyUnicode_Concat(__pyx_kp_u__8, __pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_description, __pyx_t_14) < 0) __PYX_ERR(0, 137, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_description, __pyx_t_14) < 0) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "handlers/payments/yookassa_pay.py":145 + /* "handlers/payments/yookassa_pay.py":155 * "description": f" {customer_id}", * "receipt": { * "customer": { # <<<<<<<<<<<<<< * "full_name": customer_name, * "email": customer_email, */ - __pyx_t_14 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 145, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - /* "handlers/payments/yookassa_pay.py":146 + /* "handlers/payments/yookassa_pay.py":156 * "receipt": { * "customer": { * "full_name": customer_name, # <<<<<<<<<<<<<< * "email": customer_email, * "phone": "79000000000", */ - __pyx_t_9 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_full_name, __pyx_cur_scope->__pyx_v_customer_name) < 0) __PYX_ERR(0, 146, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_full_name, __pyx_cur_scope->__pyx_v_customer_name) < 0) __PYX_ERR(0, 156, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":147 + /* "handlers/payments/yookassa_pay.py":157 * "customer": { * "full_name": customer_name, * "email": customer_email, # <<<<<<<<<<<<<< * "phone": "79000000000", * }, */ - if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_email, __pyx_cur_scope->__pyx_v_customer_email) < 0) __PYX_ERR(0, 146, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_phone, __pyx_kp_u_79000000000) < 0) __PYX_ERR(0, 146, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_14, __pyx_n_u_customer, __pyx_t_9) < 0) __PYX_ERR(0, 145, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_email, __pyx_cur_scope->__pyx_v_customer_email) < 0) __PYX_ERR(0, 156, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_phone, __pyx_kp_u_79000000000) < 0) __PYX_ERR(0, 156, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_14, __pyx_n_u_customer, __pyx_t_9) < 0) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "handlers/payments/yookassa_pay.py":152 + /* "handlers/payments/yookassa_pay.py":162 * "items": [ * { * "description": f" {customer_id}", # <<<<<<<<<<<<<< * "quantity": "1.00", * "amount": {"value": str(amount), "currency": "RUB"}, */ - __pyx_t_9 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_customer_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_customer_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_15 = __Pyx_PyUnicode_Concat(__pyx_kp_u__10, __pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyUnicode_Concat(__pyx_kp_u__8, __pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_description, __pyx_t_15) < 0) __PYX_ERR(0, 152, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_description, __pyx_t_15) < 0) __PYX_ERR(0, 162, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_quantity, __pyx_kp_u_1_00) < 0) __PYX_ERR(0, 152, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_quantity, __pyx_kp_u_1_00) < 0) __PYX_ERR(0, 162, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":154 + /* "handlers/payments/yookassa_pay.py":164 * "description": f" {customer_id}", * "quantity": "1.00", * "amount": {"value": str(amount), "currency": "RUB"}, # <<<<<<<<<<<<<< * "vat_code": 1, * "payment_subject": "payment", */ - __pyx_t_15 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 154, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __pyx_t_13 = __Pyx_PyObject_Unicode(__pyx_cur_scope->__pyx_v_amount); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 154, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Unicode(__pyx_cur_scope->__pyx_v_amount); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - if (PyDict_SetItem(__pyx_t_15, __pyx_n_u_value, __pyx_t_13) < 0) __PYX_ERR(0, 154, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_15, __pyx_n_u_value, __pyx_t_13) < 0) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (PyDict_SetItem(__pyx_t_15, __pyx_n_u_currency, __pyx_n_u_RUB) < 0) __PYX_ERR(0, 154, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_amount, __pyx_t_15) < 0) __PYX_ERR(0, 152, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_15, __pyx_n_u_currency, __pyx_n_u_RUB) < 0) __PYX_ERR(0, 164, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_amount, __pyx_t_15) < 0) __PYX_ERR(0, 162, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_vat_code, __pyx_int_1) < 0) __PYX_ERR(0, 152, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_payment_subject, __pyx_n_u_payment) < 0) __PYX_ERR(0, 152, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_payment_mode, __pyx_n_u_full_payment) < 0) __PYX_ERR(0, 152, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_vat_code, __pyx_int_1) < 0) __PYX_ERR(0, 162, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_payment_subject, __pyx_n_u_payment) < 0) __PYX_ERR(0, 162, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_payment_mode, __pyx_n_u_full_payment) < 0) __PYX_ERR(0, 162, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":150 + /* "handlers/payments/yookassa_pay.py":160 * "phone": "79000000000", * }, * "items": [ # <<<<<<<<<<<<<< * { * "description": f" {customer_id}", */ - __pyx_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_GIVEREF(__pyx_t_9); - if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 0, __pyx_t_9)) __PYX_ERR(0, 150, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 0, __pyx_t_9)) __PYX_ERR(0, 160, __pyx_L1_error); __pyx_t_9 = 0; - if (PyDict_SetItem(__pyx_t_14, __pyx_n_u_items, __pyx_t_15) < 0) __PYX_ERR(0, 145, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_14, __pyx_n_u_items, __pyx_t_15) < 0) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_receipt, __pyx_t_14) < 0) __PYX_ERR(0, 137, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_receipt, __pyx_t_14) < 0) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "handlers/payments/yookassa_pay.py":161 + /* "handlers/payments/yookassa_pay.py":171 * ], * }, * "metadata": {"user_id": customer_id}, # <<<<<<<<<<<<<< * }, * uuid.uuid4(), */ - __pyx_t_14 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - if (PyDict_SetItem(__pyx_t_14, __pyx_n_u_user_id, __pyx_cur_scope->__pyx_v_customer_id) < 0) __PYX_ERR(0, 161, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_metadata, __pyx_t_14) < 0) __PYX_ERR(0, 137, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_14, __pyx_n_u_user_id, __pyx_cur_scope->__pyx_v_customer_id) < 0) __PYX_ERR(0, 171, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_metadata, __pyx_t_14) < 0) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "handlers/payments/yookassa_pay.py":163 + /* "handlers/payments/yookassa_pay.py":173 * "metadata": {"user_id": customer_id}, * }, * uuid.uuid4(), # <<<<<<<<<<<<<< * ) * */ - __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_uuid); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 163, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_uuid); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_uuid4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 163, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_uuid4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = NULL; @@ -6216,7 +6227,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C PyObject *__pyx_callargs[2] = {__pyx_t_15, NULL}; __pyx_t_14 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 163, __pyx_L1_error) + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -6240,7 +6251,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 135, __pyx_L1_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -6248,127 +6259,133 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C __pyx_cur_scope->__pyx_v_payment = __pyx_t_10; __pyx_t_10 = 0; - /* "handlers/payments/yookassa_pay.py":166 + /* "handlers/payments/yookassa_pay.py":176 * ) * * if payment["status"] == "pending": # <<<<<<<<<<<<<< * payment_url = payment["confirmation"]["confirmation_url"] * */ - __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_cur_scope->__pyx_v_payment, __pyx_n_u_status); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_cur_scope->__pyx_v_payment, __pyx_n_u_status); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_pending, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_pending, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_4) { - /* "handlers/payments/yookassa_pay.py":167 + /* "handlers/payments/yookassa_pay.py":177 * * if payment["status"] == "pending": * payment_url = payment["confirmation"]["confirmation_url"] # <<<<<<<<<<<<<< * * confirm_keyboard = InlineKeyboardMarkup( */ - __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_cur_scope->__pyx_v_payment, __pyx_n_u_confirmation); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 167, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_cur_scope->__pyx_v_payment, __pyx_n_u_confirmation); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_u_confirmation_url); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_u_confirmation_url); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_payment_url = __pyx_t_1; __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":169 + /* "handlers/payments/yookassa_pay.py":179 * payment_url = payment["confirmation"]["confirmation_url"] * * confirm_keyboard = InlineKeyboardMarkup( # <<<<<<<<<<<<<< * inline_keyboard=[ - * [InlineKeyboardButton(text="", url=payment_url)], + * [InlineKeyboardButton(text=PAY, url=payment_url)], */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_InlineKeyboardMarkup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_InlineKeyboardMarkup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "handlers/payments/yookassa_pay.py":170 + /* "handlers/payments/yookassa_pay.py":180 * * confirm_keyboard = InlineKeyboardMarkup( * inline_keyboard=[ # <<<<<<<<<<<<<< - * [InlineKeyboardButton(text="", url=payment_url)], - * [InlineKeyboardButton(text=" ", callback_data="pay")], + * [InlineKeyboardButton(text=PAY, url=payment_url)], + * [InlineKeyboardButton(text=BACK, callback_data="pay")], */ - __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - /* "handlers/payments/yookassa_pay.py":171 + /* "handlers/payments/yookassa_pay.py":181 * confirm_keyboard = InlineKeyboardMarkup( * inline_keyboard=[ - * [InlineKeyboardButton(text="", url=payment_url)], # <<<<<<<<<<<<<< - * [InlineKeyboardButton(text=" ", callback_data="pay")], + * [InlineKeyboardButton(text=PAY, url=payment_url)], # <<<<<<<<<<<<<< + * [InlineKeyboardButton(text=BACK, callback_data="pay")], * ] */ - __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_text, __pyx_n_u__11) < 0) __PYX_ERR(0, 171, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_url, __pyx_cur_scope->__pyx_v_payment_url) < 0) __PYX_ERR(0, 171, __pyx_L1_error) - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_PAY); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_text, __pyx_t_9) < 0) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_url, __pyx_cur_scope->__pyx_v_payment_url) < 0) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_9); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_9)) __PYX_ERR(0, 171, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_9)) __PYX_ERR(0, 181, __pyx_L1_error); __pyx_t_9 = 0; - /* "handlers/payments/yookassa_pay.py":172 + /* "handlers/payments/yookassa_pay.py":182 * inline_keyboard=[ - * [InlineKeyboardButton(text="", url=payment_url)], - * [InlineKeyboardButton(text=" ", callback_data="pay")], # <<<<<<<<<<<<<< + * [InlineKeyboardButton(text=PAY, url=payment_url)], + * [InlineKeyboardButton(text=BACK, callback_data="pay")], # <<<<<<<<<<<<<< * ] * ) */ - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_14 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_text, __pyx_kp_u__4) < 0) __PYX_ERR(0, 172, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_callback_data, __pyx_n_u_pay) < 0) __PYX_ERR(0, 172, __pyx_L1_error) - __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_BACK); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_text, __pyx_t_15) < 0) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_callback_data, __pyx_n_u_pay) < 0) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = PyList_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_14 = PyList_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_15); - if (__Pyx_PyList_SET_ITEM(__pyx_t_14, 0, __pyx_t_15)) __PYX_ERR(0, 172, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_14, 0, __pyx_t_15)) __PYX_ERR(0, 182, __pyx_L1_error); __pyx_t_15 = 0; - /* "handlers/payments/yookassa_pay.py":170 + /* "handlers/payments/yookassa_pay.py":180 * * confirm_keyboard = InlineKeyboardMarkup( * inline_keyboard=[ # <<<<<<<<<<<<<< - * [InlineKeyboardButton(text="", url=payment_url)], - * [InlineKeyboardButton(text=" ", callback_data="pay")], + * [InlineKeyboardButton(text=PAY, url=payment_url)], + * [InlineKeyboardButton(text=BACK, callback_data="pay")], */ - __pyx_t_15 = PyList_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_15 = PyList_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 0, __pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 0, __pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_14); - if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 1, __pyx_t_14)) __PYX_ERR(0, 170, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 1, __pyx_t_14)) __PYX_ERR(0, 180, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_14 = 0; - if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_inline_keyboard, __pyx_t_15) < 0) __PYX_ERR(0, 170, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_inline_keyboard, __pyx_t_15) < 0) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "handlers/payments/yookassa_pay.py":169 + /* "handlers/payments/yookassa_pay.py":179 * payment_url = payment["confirmation"]["confirmation_url"] * * confirm_keyboard = InlineKeyboardMarkup( # <<<<<<<<<<<<<< * inline_keyboard=[ - * [InlineKeyboardButton(text="", url=payment_url)], + * [InlineKeyboardButton(text=PAY, url=payment_url)], */ - __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -6376,72 +6393,72 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C __pyx_cur_scope->__pyx_v_confirm_keyboard = __pyx_t_15; __pyx_t_15 = 0; - /* "handlers/payments/yookassa_pay.py":176 + /* "handlers/payments/yookassa_pay.py":186 * ) * * await callback_query.message.answer( # <<<<<<<<<<<<<< * text=f" {amount} .", * reply_markup=confirm_keyboard, */ - __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 176, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_answer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 176, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_answer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "handlers/payments/yookassa_pay.py":177 + /* "handlers/payments/yookassa_pay.py":187 * * await callback_query.message.answer( * text=f" {amount} .", # <<<<<<<<<<<<<< * reply_markup=confirm_keyboard, * ) */ - __pyx_t_15 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 177, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_12 = 127; - __Pyx_INCREF(__pyx_kp_u__12); + __Pyx_INCREF(__pyx_kp_u__9); __pyx_t_12 = (65535 > __pyx_t_12) ? 65535 : __pyx_t_12; __pyx_t_3 += 25; - __Pyx_GIVEREF(__pyx_kp_u__12); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__12); - __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_amount, __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__9); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__9); + __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_amount, __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_12; __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_14); __pyx_t_14 = 0; - __Pyx_INCREF(__pyx_kp_u__13); + __Pyx_INCREF(__pyx_kp_u__10); __pyx_t_12 = (65535 > __pyx_t_12) ? 65535 : __pyx_t_12; __pyx_t_3 += 8; - __Pyx_GIVEREF(__pyx_kp_u__13); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__13); - __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__10); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__10); + __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_text, __pyx_t_14) < 0) __PYX_ERR(0, 177, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_text, __pyx_t_14) < 0) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "handlers/payments/yookassa_pay.py":178 + /* "handlers/payments/yookassa_pay.py":188 * await callback_query.message.answer( * text=f" {amount} .", * reply_markup=confirm_keyboard, # <<<<<<<<<<<<<< * ) * else: */ - if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_reply_markup, __pyx_cur_scope->__pyx_v_confirm_keyboard) < 0) __PYX_ERR(0, 177, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_reply_markup, __pyx_cur_scope->__pyx_v_confirm_keyboard) < 0) __PYX_ERR(0, 187, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":176 + /* "handlers/payments/yookassa_pay.py":186 * ) * * await callback_query.message.answer( # <<<<<<<<<<<<<< * text=f" {amount} .", * reply_markup=confirm_keyboard, */ - __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 176, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -6456,16 +6473,16 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C __pyx_generator->resume_label = 3; return __pyx_r; __pyx_L16_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 176, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 186, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 176, __pyx_L1_error) + else __PYX_ERR(0, 186, __pyx_L1_error) } } - /* "handlers/payments/yookassa_pay.py":166 + /* "handlers/payments/yookassa_pay.py":176 * ) * * if payment["status"] == "pending": # <<<<<<<<<<<<<< @@ -6475,7 +6492,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C goto __pyx_L15; } - /* "handlers/payments/yookassa_pay.py":181 + /* "handlers/payments/yookassa_pay.py":191 * ) * else: * await callback_query.message.answer(" .") # <<<<<<<<<<<<<< @@ -6483,9 +6500,9 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C * */ /*else*/ { - __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_answer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_answer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = NULL; @@ -6503,10 +6520,10 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_kp_u__14}; + PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_kp_u__11}; __pyx_t_14 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 181, __pyx_L1_error) + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -6521,19 +6538,19 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C __pyx_generator->resume_label = 4; return __pyx_r; __pyx_L17_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 181, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 191, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 181, __pyx_L1_error) + else __PYX_ERR(0, 191, __pyx_L1_error) } } } __pyx_L15:; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "handlers/payments/yookassa_pay.py":110 + /* "handlers/payments/yookassa_pay.py":120 * * * @router.callback_query(F.data.startswith("yookassa_amount|")) # <<<<<<<<<<<<<< @@ -6566,7 +6583,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_5generator1(__pyx_C } static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "handlers/payments/yookassa_pay.py":184 +/* "handlers/payments/yookassa_pay.py":194 * * * async def yookassa_webhook(request): # <<<<<<<<<<<<<< @@ -6628,12 +6645,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 184, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 194, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "yookassa_webhook") < 0)) __PYX_ERR(0, 184, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "yookassa_webhook") < 0)) __PYX_ERR(0, 194, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -6644,7 +6661,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("yookassa_webhook", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 184, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("yookassa_webhook", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 194, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6683,7 +6700,7 @@ static PyObject *__pyx_pf_8handlers_8payments_12yookassa_pay_6yookassa_webhook(C if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_8handlers_8payments_12yookassa_pay___pyx_scope_struct_2_yookassa_webhook *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 184, __pyx_L1_error) + __PYX_ERR(0, 194, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -6691,7 +6708,7 @@ static PyObject *__pyx_pf_8handlers_8payments_12yookassa_pay_6yookassa_webhook(C __Pyx_INCREF(__pyx_cur_scope->__pyx_v_request); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_request); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_8handlers_8payments_12yookassa_pay_8generator2, __pyx_codeobj__15, (PyObject *) __pyx_cur_scope, __pyx_n_s_yookassa_webhook, __pyx_n_s_yookassa_webhook, __pyx_n_s_handlers_payments_yookassa_pay); if (unlikely(!gen)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_8handlers_8payments_12yookassa_pay_8generator2, __pyx_codeobj__12, (PyObject *) __pyx_cur_scope, __pyx_n_s_yookassa_webhook, __pyx_n_s_yookassa_webhook, __pyx_n_s_handlers_payments_yookassa_pay); if (unlikely(!gen)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -6757,16 +6774,16 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 184, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 194, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":188 + /* "handlers/payments/yookassa_pay.py":198 * Yookassa . * """ * event = await request.json() # <<<<<<<<<<<<<< * logger.info(f"Webhook event received: {event}") * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_request, __pyx_n_s_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_request, __pyx_n_s_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -6786,7 +6803,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -6801,32 +6818,32 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 188, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 198, __pyx_L1_error) __pyx_t_1 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_1); } else { __pyx_t_1 = NULL; - if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_1) < 0) __PYX_ERR(0, 188, __pyx_L1_error) + if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_1) < 0) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_event = __pyx_t_1; __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":189 + /* "handlers/payments/yookassa_pay.py":199 * """ * event = await request.json() * logger.info(f"Webhook event received: {event}") # <<<<<<<<<<<<<< * * payment_object = event.get("object", {}) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_event, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_event, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Webhook_event_received, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Webhook_event_received, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -6848,22 +6865,22 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":191 + /* "handlers/payments/yookassa_pay.py":201 * logger.info(f"Webhook event received: {event}") * * payment_object = event.get("object", {}) # <<<<<<<<<<<<<< * payment_id = payment_object.get("id") * if not payment_id: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_event, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_event, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 191, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = NULL; __pyx_t_4 = 0; @@ -6884,7 +6901,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -6892,14 +6909,14 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_cur_scope->__pyx_v_payment_object = __pyx_t_1; __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":192 + /* "handlers/payments/yookassa_pay.py":202 * * payment_object = event.get("object", {}) * payment_id = payment_object.get("id") # <<<<<<<<<<<<<< * if not payment_id: * logger.error(" ID ") */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_payment_object, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_payment_object, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; __pyx_t_4 = 0; @@ -6919,7 +6936,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_n_u_id}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -6927,27 +6944,27 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_cur_scope->__pyx_v_payment_id = __pyx_t_1; __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":193 + /* "handlers/payments/yookassa_pay.py":203 * payment_object = event.get("object", {}) * payment_id = payment_object.get("id") * if not payment_id: # <<<<<<<<<<<<<< * logger.error(" ID ") * return web.Response(status=400) */ - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_payment_id); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_payment_id); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 203, __pyx_L1_error) __pyx_t_7 = (!__pyx_t_6); if (__pyx_t_7) { - /* "handlers/payments/yookassa_pay.py":194 + /* "handlers/payments/yookassa_pay.py":204 * payment_id = payment_object.get("id") * if not payment_id: * logger.error(" ID ") # <<<<<<<<<<<<<< * return web.Response(status=400) * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -6968,13 +6985,13 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u_ID}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":195 + /* "handlers/payments/yookassa_pay.py":205 * if not payment_id: * logger.error(" ID ") * return web.Response(status=400) # <<<<<<<<<<<<<< @@ -6982,15 +6999,15 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C * try: */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_web); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_web); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Response); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 195, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Response); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_status, __pyx_int_400) < 0) __PYX_ERR(0, 195, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_status, __pyx_int_400) < 0) __PYX_ERR(0, 205, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -6998,7 +7015,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "handlers/payments/yookassa_pay.py":193 + /* "handlers/payments/yookassa_pay.py":203 * payment_object = event.get("object", {}) * payment_id = payment_object.get("id") * if not payment_id: # <<<<<<<<<<<<<< @@ -7007,7 +7024,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C */ } - /* "handlers/payments/yookassa_pay.py":197 + /* "handlers/payments/yookassa_pay.py":207 * return web.Response(status=400) * * try: # <<<<<<<<<<<<<< @@ -7021,16 +7038,16 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "handlers/payments/yookassa_pay.py":198 + /* "handlers/payments/yookassa_pay.py":208 * * try: * payment = Payment.find_one(payment_id) # <<<<<<<<<<<<<< * logger.info(f" API Yookassa: {payment}") * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Payment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L6_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Payment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_find_one); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 198, __pyx_L6_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_find_one); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 208, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -7051,7 +7068,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_cur_scope->__pyx_v_payment_id}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 198, __pyx_L6_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 208, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -7059,21 +7076,21 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_cur_scope->__pyx_v_payment = __pyx_t_3; __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":199 + /* "handlers/payments/yookassa_pay.py":209 * try: * payment = Payment.find_one(payment_id) * logger.info(f" API Yookassa: {payment}") # <<<<<<<<<<<<<< * * if payment.status == "succeeded" and payment.paid: */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 199, __pyx_L6_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L6_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_payment, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 199, __pyx_L6_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_payment, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_API_Yookassa, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L6_error) + __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_API_Yookassa, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -7095,67 +7112,67 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L6_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":201 + /* "handlers/payments/yookassa_pay.py":211 * logger.info(f" API Yookassa: {payment}") * * if payment.status == "succeeded" and payment.paid: # <<<<<<<<<<<<<< * web.Response(status=200) * user_id_str = payment.metadata.get("user_id") */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_payment, __pyx_n_s_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L6_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_payment, __pyx_n_s_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_succeeded, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 201, __pyx_L6_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_succeeded, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 211, __pyx_L6_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { } else { __pyx_t_7 = __pyx_t_6; goto __pyx_L13_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_payment, __pyx_n_s_paid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L6_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_payment, __pyx_n_s_paid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 201, __pyx_L6_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 211, __pyx_L6_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __pyx_t_6; __pyx_L13_bool_binop_done:; if (__pyx_t_7) { - /* "handlers/payments/yookassa_pay.py":202 + /* "handlers/payments/yookassa_pay.py":212 * * if payment.status == "succeeded" and payment.paid: * web.Response(status=200) # <<<<<<<<<<<<<< * user_id_str = payment.metadata.get("user_id") * amount_str = payment.amount["value"] */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_web); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L6_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_web); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Response); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L6_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Response); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L6_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_status, __pyx_int_200) < 0) __PYX_ERR(0, 202, __pyx_L6_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L6_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_status, __pyx_int_200) < 0) __PYX_ERR(0, 212, __pyx_L6_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "handlers/payments/yookassa_pay.py":203 + /* "handlers/payments/yookassa_pay.py":213 * if payment.status == "succeeded" and payment.paid: * web.Response(status=200) * user_id_str = payment.metadata.get("user_id") # <<<<<<<<<<<<<< * amount_str = payment.amount["value"] * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_payment, __pyx_n_s_metadata); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L6_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_payment, __pyx_n_s_metadata); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L6_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -7176,7 +7193,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_n_u_user_id}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L6_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -7184,23 +7201,23 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_cur_scope->__pyx_v_user_id_str = __pyx_t_2; __pyx_t_2 = 0; - /* "handlers/payments/yookassa_pay.py":204 + /* "handlers/payments/yookassa_pay.py":214 * web.Response(status=200) * user_id_str = payment.metadata.get("user_id") * amount_str = payment.amount["value"] # <<<<<<<<<<<<<< * * try: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_payment, __pyx_n_s_amount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L6_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_payment, __pyx_n_s_amount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L6_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_amount_str = __pyx_t_1; __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":206 + /* "handlers/payments/yookassa_pay.py":216 * amount_str = payment.amount["value"] * * try: # <<<<<<<<<<<<<< @@ -7214,42 +7231,42 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "handlers/payments/yookassa_pay.py":207 + /* "handlers/payments/yookassa_pay.py":217 * * try: * user_id = int(user_id_str) # <<<<<<<<<<<<<< * amount = float(amount_str) * logger.info(f"Payment succeeded for user_id: {user_id}, amount: {amount}") */ - __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_cur_scope->__pyx_v_user_id_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L15_error) + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_cur_scope->__pyx_v_user_id_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_user_id = __pyx_t_1; __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":208 + /* "handlers/payments/yookassa_pay.py":218 * try: * user_id = int(user_id_str) * amount = float(amount_str) # <<<<<<<<<<<<<< * logger.info(f"Payment succeeded for user_id: {user_id}, amount: {amount}") * */ - __pyx_t_14 = __Pyx_PyObject_AsDouble(__pyx_cur_scope->__pyx_v_amount_str); if (unlikely(__pyx_t_14 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 208, __pyx_L15_error) + __pyx_t_14 = __Pyx_PyObject_AsDouble(__pyx_cur_scope->__pyx_v_amount_str); if (unlikely(__pyx_t_14 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 218, __pyx_L15_error) __pyx_cur_scope->__pyx_v_amount = __pyx_t_14; - /* "handlers/payments/yookassa_pay.py":209 + /* "handlers/payments/yookassa_pay.py":219 * user_id = int(user_id_str) * amount = float(amount_str) * logger.info(f"Payment succeeded for user_id: {user_id}, amount: {amount}") # <<<<<<<<<<<<<< * * await add_payment(user_id, amount, "yookassa") */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L15_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L15_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L15_error) + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_15 = 0; __pyx_t_16 = 127; @@ -7257,7 +7274,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_t_15 += 31; __Pyx_GIVEREF(__pyx_kp_u_Payment_succeeded_for_user_id); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Payment_succeeded_for_user_id); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_user_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L15_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_user_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 219, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_16; __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); @@ -7268,9 +7285,9 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_t_15 += 10; __Pyx_GIVEREF(__pyx_kp_u_amount_2); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_amount_2); - __pyx_t_5 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_amount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L15_error) + __pyx_t_5 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_amount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 219, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 209, __pyx_L15_error) + __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 219, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_16; @@ -7278,7 +7295,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_17); __pyx_t_17 = 0; - __pyx_t_17 = __Pyx_PyUnicode_Join(__pyx_t_2, 4, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 209, __pyx_L15_error) + __pyx_t_17 = __Pyx_PyUnicode_Join(__pyx_t_2, 4, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 219, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -7300,22 +7317,22 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L15_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":211 + /* "handlers/payments/yookassa_pay.py":221 * logger.info(f"Payment succeeded for user_id: {user_id}, amount: {amount}") * * await add_payment(user_id, amount, "yookassa") # <<<<<<<<<<<<<< * await update_balance(user_id, amount) * await send_payment_success_notification(user_id, amount) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_add_payment); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L15_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_add_payment); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_17 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_amount); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 211, __pyx_L15_error) + __pyx_t_17 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_amount); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 221, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_17); __pyx_t_2 = NULL; __pyx_t_4 = 0; @@ -7336,7 +7353,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L15_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -7381,25 +7398,25 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_t_13 = __pyx_cur_scope->__pyx_t_5; __pyx_cur_scope->__pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_t_13); - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 211, __pyx_L15_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 221, __pyx_L15_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 211, __pyx_L15_error) + else __PYX_ERR(0, 221, __pyx_L15_error) } } - /* "handlers/payments/yookassa_pay.py":212 + /* "handlers/payments/yookassa_pay.py":222 * * await add_payment(user_id, amount, "yookassa") * await update_balance(user_id, amount) # <<<<<<<<<<<<<< * await send_payment_success_notification(user_id, amount) * except ValueError as e: */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_update_balance); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L15_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_update_balance); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_17 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_amount); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 212, __pyx_L15_error) + __pyx_t_17 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_amount); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 222, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_17); __pyx_t_2 = NULL; __pyx_t_4 = 0; @@ -7420,7 +7437,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L15_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -7465,25 +7482,25 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_t_13 = __pyx_cur_scope->__pyx_t_5; __pyx_cur_scope->__pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_t_13); - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 212, __pyx_L15_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 222, __pyx_L15_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 212, __pyx_L15_error) + else __PYX_ERR(0, 222, __pyx_L15_error) } } - /* "handlers/payments/yookassa_pay.py":213 + /* "handlers/payments/yookassa_pay.py":223 * await add_payment(user_id, amount, "yookassa") * await update_balance(user_id, amount) * await send_payment_success_notification(user_id, amount) # <<<<<<<<<<<<<< * except ValueError as e: * logger.error(f" user_id amount: {e}") */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_send_payment_success_notificatio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L15_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_send_payment_success_notificatio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_17 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_amount); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 213, __pyx_L15_error) + __pyx_t_17 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_amount); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 223, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_17); __pyx_t_2 = NULL; __pyx_t_4 = 0; @@ -7504,7 +7521,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L15_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -7549,16 +7566,16 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_t_13 = __pyx_cur_scope->__pyx_t_5; __pyx_cur_scope->__pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_t_13); - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 213, __pyx_L15_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 223, __pyx_L15_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 213, __pyx_L15_error) + else __PYX_ERR(0, 223, __pyx_L15_error) } } - /* "handlers/payments/yookassa_pay.py":206 + /* "handlers/payments/yookassa_pay.py":216 * amount_str = payment.amount["value"] * * try: # <<<<<<<<<<<<<< @@ -7577,7 +7594,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "handlers/payments/yookassa_pay.py":214 + /* "handlers/payments/yookassa_pay.py":224 * await update_balance(user_id, amount) * await send_payment_success_notification(user_id, amount) * except ValueError as e: # <<<<<<<<<<<<<< @@ -7587,7 +7604,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_18) { __Pyx_AddTraceback("handlers.payments.yookassa_pay.yookassa_webhook", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_17) < 0) __PYX_ERR(0, 214, __pyx_L17_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_17) < 0) __PYX_ERR(0, 224, __pyx_L17_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_17); @@ -7596,21 +7613,21 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_cur_scope->__pyx_v_e = __pyx_t_3; /*try:*/ { - /* "handlers/payments/yookassa_pay.py":215 + /* "handlers/payments/yookassa_pay.py":225 * await send_payment_success_notification(user_id, amount) * except ValueError as e: * logger.error(f" user_id amount: {e}") # <<<<<<<<<<<<<< * return web.Response(status=400) * else: */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 215, __pyx_L29_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 225, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 215, __pyx_L29_error) + __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 225, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 215, __pyx_L29_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 225, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_20 = __Pyx_PyUnicode_Concat(__pyx_kp_u_user_id_amount, __pyx_t_5); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 215, __pyx_L29_error) + __pyx_t_20 = __Pyx_PyUnicode_Concat(__pyx_kp_u_user_id_amount, __pyx_t_5); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 225, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -7632,13 +7649,13 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_19, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L29_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "handlers/payments/yookassa_pay.py":216 + /* "handlers/payments/yookassa_pay.py":226 * except ValueError as e: * logger.error(f" user_id amount: {e}") * return web.Response(status=400) # <<<<<<<<<<<<<< @@ -7646,15 +7663,15 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C * logger.warning(f" ID {payment_id} ") */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_web); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L29_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_web); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Response); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 216, __pyx_L29_error) + __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Response); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 226, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L29_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_status, __pyx_int_400) < 0) __PYX_ERR(0, 216, __pyx_L29_error) - __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 216, __pyx_L29_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_status, __pyx_int_400) < 0) __PYX_ERR(0, 226, __pyx_L29_error) + __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 226, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -7666,7 +7683,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C goto __pyx_L28_return; } - /* "handlers/payments/yookassa_pay.py":214 + /* "handlers/payments/yookassa_pay.py":224 * await update_balance(user_id, amount) * await send_payment_success_notification(user_id, amount) * except ValueError as e: # <<<<<<<<<<<<<< @@ -7743,7 +7760,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C } goto __pyx_L17_except_error; - /* "handlers/payments/yookassa_pay.py":206 + /* "handlers/payments/yookassa_pay.py":216 * amount_str = payment.amount["value"] * * try: # <<<<<<<<<<<<<< @@ -7765,7 +7782,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_L20_try_end:; } - /* "handlers/payments/yookassa_pay.py":201 + /* "handlers/payments/yookassa_pay.py":211 * logger.info(f" API Yookassa: {payment}") * * if payment.status == "succeeded" and payment.paid: # <<<<<<<<<<<<<< @@ -7775,7 +7792,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C goto __pyx_L12; } - /* "handlers/payments/yookassa_pay.py":218 + /* "handlers/payments/yookassa_pay.py":228 * return web.Response(status=400) * else: * logger.warning(f" ID {payment_id} ") # <<<<<<<<<<<<<< @@ -7783,12 +7800,12 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C * except Exception as e: */ /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L6_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_warning); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L6_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_warning); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L6_error) + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_15 = 0; __pyx_t_16 = 127; @@ -7797,19 +7814,19 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_t_15 += 12; __Pyx_GIVEREF(__pyx_kp_u_ID_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_ID_2); - __pyx_t_20 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_payment_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 218, __pyx_L6_error) + __pyx_t_20 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_payment_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 228, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_20); __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_20) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_20) : __pyx_t_16; __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20); __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_20); __pyx_t_20 = 0; - __Pyx_INCREF(__pyx_kp_u__16); + __Pyx_INCREF(__pyx_kp_u__13); __pyx_t_16 = (65535 > __pyx_t_16) ? 65535 : __pyx_t_16; __pyx_t_15 += 27; - __Pyx_GIVEREF(__pyx_kp_u__16); - PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__16); - __pyx_t_20 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 218, __pyx_L6_error) + __Pyx_GIVEREF(__pyx_kp_u__13); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__13); + __pyx_t_20 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 228, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -7831,13 +7848,13 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_t_17 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; - if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 218, __pyx_L6_error) + if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 228, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - /* "handlers/payments/yookassa_pay.py":219 + /* "handlers/payments/yookassa_pay.py":229 * else: * logger.warning(f" ID {payment_id} ") * return web.Response(status=400) # <<<<<<<<<<<<<< @@ -7845,15 +7862,15 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C * logger.error(f" : {e}") */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_web); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 219, __pyx_L6_error) + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_web); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 229, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_17); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_Response); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L6_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_Response); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_17 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 219, __pyx_L6_error) + __pyx_t_17 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 229, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_17); - if (PyDict_SetItem(__pyx_t_17, __pyx_n_s_status, __pyx_int_400) < 0) __PYX_ERR(0, 219, __pyx_L6_error) - __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_17); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 219, __pyx_L6_error) + if (PyDict_SetItem(__pyx_t_17, __pyx_n_s_status, __pyx_int_400) < 0) __PYX_ERR(0, 229, __pyx_L6_error) + __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_17); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 229, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; @@ -7863,7 +7880,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C } __pyx_L12:; - /* "handlers/payments/yookassa_pay.py":197 + /* "handlers/payments/yookassa_pay.py":207 * return web.Response(status=400) * * try: # <<<<<<<<<<<<<< @@ -7884,7 +7901,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "handlers/payments/yookassa_pay.py":220 + /* "handlers/payments/yookassa_pay.py":230 * logger.warning(f" ID {payment_id} ") * return web.Response(status=400) * except Exception as e: # <<<<<<<<<<<<<< @@ -7894,7 +7911,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_t_21 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_21) { __Pyx_AddTraceback("handlers.payments.yookassa_pay.yookassa_webhook", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_20, &__pyx_t_17, &__pyx_t_1) < 0) __PYX_ERR(0, 220, __pyx_L8_except_error) + if (__Pyx_GetException(&__pyx_t_20, &__pyx_t_17, &__pyx_t_1) < 0) __PYX_ERR(0, 230, __pyx_L8_except_error) __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_1); @@ -7904,21 +7921,21 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __Pyx_GIVEREF(__pyx_t_17); /*try:*/ { - /* "handlers/payments/yookassa_pay.py":221 + /* "handlers/payments/yookassa_pay.py":231 * return web.Response(status=400) * except Exception as e: * logger.error(f" : {e}") # <<<<<<<<<<<<<< * return web.Response(status=500) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L40_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L40_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 221, __pyx_L40_error) + __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 231, __pyx_L40_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L40_error) + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L40_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u__17, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 221, __pyx_L40_error) + __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u__14, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 231, __pyx_L40_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -7940,13 +7957,13 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_19, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __pyx_L40_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L40_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":222 + /* "handlers/payments/yookassa_pay.py":232 * except Exception as e: * logger.error(f" : {e}") * return web.Response(status=500) # <<<<<<<<<<<<<< @@ -7954,15 +7971,15 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C * return web.Response(status=200) */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_web); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __pyx_L40_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_web); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L40_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Response); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 222, __pyx_L40_error) + __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Response); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 232, __pyx_L40_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __pyx_L40_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L40_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_status, __pyx_int_500) < 0) __PYX_ERR(0, 222, __pyx_L40_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 222, __pyx_L40_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_status, __pyx_int_500) < 0) __PYX_ERR(0, 232, __pyx_L40_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 232, __pyx_L40_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -7974,7 +7991,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C goto __pyx_L39_return; } - /* "handlers/payments/yookassa_pay.py":220 + /* "handlers/payments/yookassa_pay.py":230 * logger.warning(f" ID {payment_id} ") * return web.Response(status=400) * except Exception as e: # <<<<<<<<<<<<<< @@ -8051,7 +8068,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C } goto __pyx_L8_except_error; - /* "handlers/payments/yookassa_pay.py":197 + /* "handlers/payments/yookassa_pay.py":207 * return web.Response(status=400) * * try: # <<<<<<<<<<<<<< @@ -8079,7 +8096,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C __pyx_L11_try_end:; } - /* "handlers/payments/yookassa_pay.py":224 + /* "handlers/payments/yookassa_pay.py":234 * return web.Response(status=500) * * return web.Response(status=200) # <<<<<<<<<<<<<< @@ -8087,15 +8104,15 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C * */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_web); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_web); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Response); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Response); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_status, __pyx_int_200) < 0) __PYX_ERR(0, 224, __pyx_L1_error) - __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 224, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_status, __pyx_int_200) < 0) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -8104,7 +8121,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C goto __pyx_L0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "handlers/payments/yookassa_pay.py":184 + /* "handlers/payments/yookassa_pay.py":194 * * * async def yookassa_webhook(request): # <<<<<<<<<<<<<< @@ -8135,7 +8152,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_8generator2(__pyx_C } static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_11generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "handlers/payments/yookassa_pay.py":228 +/* "handlers/payments/yookassa_pay.py":238 * * * @router.callback_query(F.data == "enter_custom_amount_yookassa") # <<<<<<<<<<<<<< @@ -8199,7 +8216,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 228, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 238, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -8207,14 +8224,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 228, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 238, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("process_enter_custom_amount", 1, 2, 2, 1); __PYX_ERR(0, 228, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("process_enter_custom_amount", 1, 2, 2, 1); __PYX_ERR(0, 238, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "process_enter_custom_amount") < 0)) __PYX_ERR(0, 228, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "process_enter_custom_amount") < 0)) __PYX_ERR(0, 238, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -8227,7 +8244,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("process_enter_custom_amount", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 228, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("process_enter_custom_amount", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 238, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -8266,7 +8283,7 @@ static PyObject *__pyx_pf_8handlers_8payments_12yookassa_pay_9process_enter_cust if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_8handlers_8payments_12yookassa_pay___pyx_scope_struct_3_process_enter_custom_amount *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 228, __pyx_L1_error) + __PYX_ERR(0, 238, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -8277,7 +8294,7 @@ static PyObject *__pyx_pf_8handlers_8payments_12yookassa_pay_9process_enter_cust __Pyx_INCREF(__pyx_cur_scope->__pyx_v_state); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_state); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_8handlers_8payments_12yookassa_pay_11generator3, __pyx_codeobj__18, (PyObject *) __pyx_cur_scope, __pyx_n_s_process_enter_custom_amount, __pyx_n_s_process_enter_custom_amount, __pyx_n_s_handlers_payments_yookassa_pay); if (unlikely(!gen)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_8handlers_8payments_12yookassa_pay_11generator3, __pyx_codeobj__15, (PyObject *) __pyx_cur_scope, __pyx_n_s_process_enter_custom_amount, __pyx_n_s_process_enter_custom_amount, __pyx_n_s_handlers_payments_yookassa_pay); if (unlikely(!gen)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -8317,16 +8334,16 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_11generator3(__pyx_ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 228, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 238, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":232 + /* "handlers/payments/yookassa_pay.py":242 * callback_query: types.CallbackQuery, state: FSMContext * ): * builder = InlineKeyboardBuilder() # <<<<<<<<<<<<<< - * builder.row(InlineKeyboardButton(text=" ", callback_data="pay_yookassa")) + * builder.row(InlineKeyboardButton(text=BACK, callback_data="pay_yookassa")) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_InlineKeyboardBuilder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_InlineKeyboardBuilder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -8346,7 +8363,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_11generator3(__pyx_ PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -8354,22 +8371,25 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_11generator3(__pyx_ __pyx_cur_scope->__pyx_v_builder = __pyx_t_1; __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":233 + /* "handlers/payments/yookassa_pay.py":243 * ): * builder = InlineKeyboardBuilder() - * builder.row(InlineKeyboardButton(text=" ", callback_data="pay_yookassa")) # <<<<<<<<<<<<<< + * builder.row(InlineKeyboardButton(text=BACK, callback_data="pay_yookassa")) # <<<<<<<<<<<<<< * * await callback_query.message.answer( */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_builder, __pyx_n_s_row); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_builder, __pyx_n_s_row); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 233, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_text, __pyx_kp_u__19) < 0) __PYX_ERR(0, 233, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_callback_data, __pyx_n_u_pay_yookassa) < 0) __PYX_ERR(0, 233, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_BACK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_text, __pyx_t_6) < 0) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_callback_data, __pyx_n_u_pay_yookassa) < 0) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -8392,35 +8412,35 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_11generator3(__pyx_ __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":235 - * builder.row(InlineKeyboardButton(text=" ", callback_data="pay_yookassa")) + /* "handlers/payments/yookassa_pay.py":245 + * builder.row(InlineKeyboardButton(text=BACK, callback_data="pay_yookassa")) * * await callback_query.message.answer( # <<<<<<<<<<<<<< * ", .", * reply_markup=builder.as_markup(), */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_answer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_answer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":237 + /* "handlers/payments/yookassa_pay.py":247 * await callback_query.message.answer( * ", .", * reply_markup=builder.as_markup(), # <<<<<<<<<<<<<< * ) * */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_builder, __pyx_n_s_as_markup); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 237, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_builder, __pyx_n_s_as_markup); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -8440,21 +8460,21 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_11generator3(__pyx_ PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_reply_markup, __pyx_t_6) < 0) __PYX_ERR(0, 237, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_reply_markup, __pyx_t_6) < 0) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "handlers/payments/yookassa_pay.py":235 - * builder.row(InlineKeyboardButton(text=" ", callback_data="pay_yookassa")) + /* "handlers/payments/yookassa_pay.py":245 + * builder.row(InlineKeyboardButton(text=BACK, callback_data="pay_yookassa")) * * await callback_query.message.answer( # <<<<<<<<<<<<<< * ", .", * reply_markup=builder.as_markup(), */ - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__21, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__17, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -8469,27 +8489,27 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_11generator3(__pyx_ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 235, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 245, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 235, __pyx_L1_error) + else __PYX_ERR(0, 245, __pyx_L1_error) } } - /* "handlers/payments/yookassa_pay.py":240 + /* "handlers/payments/yookassa_pay.py":250 * ) * * await state.set_state(ReplenishBalanceState.entering_custom_amount_yookassa) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_state, __pyx_n_s_set_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_state, __pyx_n_s_set_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplenishBalanceState); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplenishBalanceState); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_entering_custom_amount_yookassa); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_entering_custom_amount_yookassa); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -8511,7 +8531,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_11generator3(__pyx_ __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 240, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -8526,17 +8546,17 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_11generator3(__pyx_ __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L5_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 240, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 250, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 240, __pyx_L1_error) + else __PYX_ERR(0, 250, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "handlers/payments/yookassa_pay.py":228 + /* "handlers/payments/yookassa_pay.py":238 * * * @router.callback_query(F.data == "enter_custom_amount_yookassa") # <<<<<<<<<<<<<< @@ -8567,7 +8587,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_11generator3(__pyx_ } static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "handlers/payments/yookassa_pay.py":244 +/* "handlers/payments/yookassa_pay.py":254 * * * @router.message(ReplenishBalanceState.entering_custom_amount_yookassa) # <<<<<<<<<<<<<< @@ -8631,7 +8651,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 254, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -8639,14 +8659,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 254, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("process_custom_amount_input", 1, 2, 2, 1); __PYX_ERR(0, 244, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("process_custom_amount_input", 1, 2, 2, 1); __PYX_ERR(0, 254, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "process_custom_amount_input") < 0)) __PYX_ERR(0, 244, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "process_custom_amount_input") < 0)) __PYX_ERR(0, 254, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -8659,7 +8679,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("process_custom_amount_input", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 244, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("process_custom_amount_input", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 254, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -8698,7 +8718,7 @@ static PyObject *__pyx_pf_8handlers_8payments_12yookassa_pay_12process_custom_am if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_8handlers_8payments_12yookassa_pay___pyx_scope_struct_4_process_custom_amount_input *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 244, __pyx_L1_error) + __PYX_ERR(0, 254, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -8709,7 +8729,7 @@ static PyObject *__pyx_pf_8handlers_8payments_12yookassa_pay_12process_custom_am __Pyx_INCREF(__pyx_cur_scope->__pyx_v_session); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_session); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_8handlers_8payments_12yookassa_pay_14generator4, __pyx_codeobj__22, (PyObject *) __pyx_cur_scope, __pyx_n_s_process_custom_amount_input, __pyx_n_s_process_custom_amount_input, __pyx_n_s_handlers_payments_yookassa_pay); if (unlikely(!gen)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_8handlers_8payments_12yookassa_pay_14generator4, __pyx_codeobj__18, (PyObject *) __pyx_cur_scope, __pyx_n_s_process_custom_amount_input, __pyx_n_s_process_custom_amount_input, __pyx_n_s_handlers_payments_yookassa_pay); if (unlikely(!gen)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -8780,21 +8800,21 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 244, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 254, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":246 + /* "handlers/payments/yookassa_pay.py":256 * @router.message(ReplenishBalanceState.entering_custom_amount_yookassa) * async def process_custom_amount_input(callback_query: types.CallbackQuery | types.Message, session: Any): * conn = await asyncpg.connect(DATABASE_URL) # <<<<<<<<<<<<<< * try: * if isinstance(callback_query, types.CallbackQuery): */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncpg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncpg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_connect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_connect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DATABASE_URL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DATABASE_URL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -8815,7 +8835,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -8830,18 +8850,18 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 246, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 256, __pyx_L1_error) __pyx_t_1 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_1); } else { __pyx_t_1 = NULL; - if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_1) < 0) __PYX_ERR(0, 246, __pyx_L1_error) + if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_1) < 0) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_conn = __pyx_t_1; __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":247 + /* "handlers/payments/yookassa_pay.py":257 * async def process_custom_amount_input(callback_query: types.CallbackQuery | types.Message, session: Any): * conn = await asyncpg.connect(DATABASE_URL) * try: # <<<<<<<<<<<<<< @@ -8850,49 +8870,49 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ */ /*try:*/ { - /* "handlers/payments/yookassa_pay.py":248 + /* "handlers/payments/yookassa_pay.py":258 * conn = await asyncpg.connect(DATABASE_URL) * try: * if isinstance(callback_query, types.CallbackQuery): # <<<<<<<<<<<<<< * tg_id = callback_query.message.chat.id * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L6_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_CallbackQuery); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L6_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_CallbackQuery); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 258, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_callback_query, __pyx_t_3); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 248, __pyx_L6_error) + __pyx_t_6 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_callback_query, __pyx_t_3); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 258, __pyx_L6_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { - /* "handlers/payments/yookassa_pay.py":249 + /* "handlers/payments/yookassa_pay.py":259 * try: * if isinstance(callback_query, types.CallbackQuery): * tg_id = callback_query.message.chat.id # <<<<<<<<<<<<<< * * user_data = await get_temporary_data(conn, tg_id) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L6_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_chat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L6_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_chat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L6_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_tg_id = __pyx_t_3; __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":251 + /* "handlers/payments/yookassa_pay.py":261 * tg_id = callback_query.message.chat.id * * user_data = await get_temporary_data(conn, tg_id) # <<<<<<<<<<<<<< * if not user_data: * await callback_query.message.answer(" . .") */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_temporary_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L6_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_temporary_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = NULL; __pyx_t_5 = 0; @@ -8912,7 +8932,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_conn, __pyx_cur_scope->__pyx_v_tg_id}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L6_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -8927,38 +8947,38 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L9_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 251, __pyx_L6_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 261, __pyx_L6_error) __pyx_t_3 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_3); } else { __pyx_t_3 = NULL; - if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_3) < 0) __PYX_ERR(0, 251, __pyx_L6_error) + if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_3) < 0) __PYX_ERR(0, 261, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_user_data = __pyx_t_3; __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":252 + /* "handlers/payments/yookassa_pay.py":262 * * user_data = await get_temporary_data(conn, tg_id) * if not user_data: # <<<<<<<<<<<<<< * await callback_query.message.answer(" . .") * return */ - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_user_data); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 252, __pyx_L6_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_user_data); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 262, __pyx_L6_error) __pyx_t_7 = (!__pyx_t_6); if (__pyx_t_7) { - /* "handlers/payments/yookassa_pay.py":253 + /* "handlers/payments/yookassa_pay.py":263 * user_data = await get_temporary_data(conn, tg_id) * if not user_data: * await callback_query.message.answer(" . .") # <<<<<<<<<<<<<< * return * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L6_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_answer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L6_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_answer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 263, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -8976,10 +8996,10 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_u__23}; + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_u__19}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L6_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 263, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -8994,16 +9014,16 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_generator->resume_label = 3; return __pyx_r; __pyx_L11_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 253, __pyx_L6_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 263, __pyx_L6_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 253, __pyx_L6_error) + else __PYX_ERR(0, 263, __pyx_L6_error) } } - /* "handlers/payments/yookassa_pay.py":254 + /* "handlers/payments/yookassa_pay.py":264 * if not user_data: * await callback_query.message.answer(" . .") * return # <<<<<<<<<<<<<< @@ -9014,7 +9034,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_r = NULL; goto __pyx_L5_return; - /* "handlers/payments/yookassa_pay.py":252 + /* "handlers/payments/yookassa_pay.py":262 * * user_data = await get_temporary_data(conn, tg_id) * if not user_data: # <<<<<<<<<<<<<< @@ -9023,20 +9043,20 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ */ } - /* "handlers/payments/yookassa_pay.py":256 + /* "handlers/payments/yookassa_pay.py":266 * return * * state_type = user_data["state"] # <<<<<<<<<<<<<< * * if state_type not in ["waiting_for_payment", "waiting_for_renewal_payment"]: */ - __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_cur_scope->__pyx_v_user_data, __pyx_n_u_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __pyx_L6_error) + __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_cur_scope->__pyx_v_user_data, __pyx_n_u_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_state_type = __pyx_t_3; __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":258 + /* "handlers/payments/yookassa_pay.py":268 * state_type = user_data["state"] * * if state_type not in ["waiting_for_payment", "waiting_for_renewal_payment"]: # <<<<<<<<<<<<<< @@ -9045,29 +9065,29 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_state_type); __pyx_t_3 = __pyx_cur_scope->__pyx_v_state_type; - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_waiting_for_payment, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 258, __pyx_L6_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_waiting_for_payment, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 268, __pyx_L6_error) if (__pyx_t_6) { } else { __pyx_t_7 = __pyx_t_6; goto __pyx_L13_bool_binop_done; } - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_waiting_for_renewal_payment, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 258, __pyx_L6_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_waiting_for_renewal_payment, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 268, __pyx_L6_error) __pyx_t_7 = __pyx_t_6; __pyx_L13_bool_binop_done:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __pyx_t_7; if (__pyx_t_6) { - /* "handlers/payments/yookassa_pay.py":259 + /* "handlers/payments/yookassa_pay.py":269 * * if state_type not in ["waiting_for_payment", "waiting_for_renewal_payment"]: * await callback_query.message.answer(" . .") # <<<<<<<<<<<<<< * return * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L6_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_answer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L6_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_answer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -9085,10 +9105,10 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_u__23}; + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_u__19}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L6_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 269, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -9103,16 +9123,16 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_generator->resume_label = 4; return __pyx_r; __pyx_L15_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 259, __pyx_L6_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 269, __pyx_L6_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 259, __pyx_L6_error) + else __PYX_ERR(0, 269, __pyx_L6_error) } } - /* "handlers/payments/yookassa_pay.py":260 + /* "handlers/payments/yookassa_pay.py":270 * if state_type not in ["waiting_for_payment", "waiting_for_renewal_payment"]: * await callback_query.message.answer(" . .") * return # <<<<<<<<<<<<<< @@ -9123,7 +9143,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_r = NULL; goto __pyx_L5_return; - /* "handlers/payments/yookassa_pay.py":258 + /* "handlers/payments/yookassa_pay.py":268 * state_type = user_data["state"] * * if state_type not in ["waiting_for_payment", "waiting_for_renewal_payment"]: # <<<<<<<<<<<<<< @@ -9132,26 +9152,26 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ */ } - /* "handlers/payments/yookassa_pay.py":262 + /* "handlers/payments/yookassa_pay.py":272 * return * * amount = user_data["data"].get("required_amount", 0) # <<<<<<<<<<<<<< * * elif isinstance(callback_query, types.Message): */ - __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_cur_scope->__pyx_v_user_data, __pyx_n_u_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 262, __pyx_L6_error) + __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_cur_scope->__pyx_v_user_data, __pyx_n_u_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 272, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L6_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 262, __pyx_L6_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 272, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_amount = __pyx_t_3; __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":248 + /* "handlers/payments/yookassa_pay.py":258 * conn = await asyncpg.connect(DATABASE_URL) * try: * if isinstance(callback_query, types.CallbackQuery): # <<<<<<<<<<<<<< @@ -9161,48 +9181,48 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ goto __pyx_L8; } - /* "handlers/payments/yookassa_pay.py":264 + /* "handlers/payments/yookassa_pay.py":274 * amount = user_data["data"].get("required_amount", 0) * * elif isinstance(callback_query, types.Message): # <<<<<<<<<<<<<< * tg_id = callback_query.chat.id * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 264, __pyx_L6_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L6_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_callback_query, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 264, __pyx_L6_error) + __pyx_t_6 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_callback_query, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 274, __pyx_L6_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { - /* "handlers/payments/yookassa_pay.py":265 + /* "handlers/payments/yookassa_pay.py":275 * * elif isinstance(callback_query, types.Message): * tg_id = callback_query.chat.id # <<<<<<<<<<<<<< * * if callback_query.text.isdigit(): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_chat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 265, __pyx_L6_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_chat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 265, __pyx_L6_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_tg_id = __pyx_t_3; __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":267 + /* "handlers/payments/yookassa_pay.py":277 * tg_id = callback_query.chat.id * * if callback_query.text.isdigit(): # <<<<<<<<<<<<<< * amount = int(callback_query.text) * else: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L6_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isdigit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L6_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isdigit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -9223,31 +9243,31 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 267, __pyx_L6_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 267, __pyx_L6_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 277, __pyx_L6_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { - /* "handlers/payments/yookassa_pay.py":268 + /* "handlers/payments/yookassa_pay.py":278 * * if callback_query.text.isdigit(): * amount = int(callback_query.text) # <<<<<<<<<<<<<< * else: * await _send_message(callback_query, " . , .") */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L6_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L6_error) + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_v_amount = __pyx_t_2; __pyx_t_2 = 0; - /* "handlers/payments/yookassa_pay.py":267 + /* "handlers/payments/yookassa_pay.py":277 * tg_id = callback_query.chat.id * * if callback_query.text.isdigit(): # <<<<<<<<<<<<<< @@ -9257,7 +9277,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ goto __pyx_L16; } - /* "handlers/payments/yookassa_pay.py":270 + /* "handlers/payments/yookassa_pay.py":280 * amount = int(callback_query.text) * else: * await _send_message(callback_query, " . , .") # <<<<<<<<<<<<<< @@ -9265,7 +9285,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ * else: */ /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_send_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L6_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_send_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; __pyx_t_5 = 0; @@ -9282,10 +9302,10 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ } #endif { - PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_cur_scope->__pyx_v_callback_query, __pyx_kp_u__25}; + PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_cur_scope->__pyx_v_callback_query, __pyx_kp_u__21}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L6_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -9300,16 +9320,16 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_generator->resume_label = 5; return __pyx_r; __pyx_L17_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 270, __pyx_L6_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 280, __pyx_L6_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 270, __pyx_L6_error) + else __PYX_ERR(0, 280, __pyx_L6_error) } } - /* "handlers/payments/yookassa_pay.py":271 + /* "handlers/payments/yookassa_pay.py":281 * else: * await _send_message(callback_query, " . , .") * return # <<<<<<<<<<<<<< @@ -9322,7 +9342,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ } __pyx_L16:; - /* "handlers/payments/yookassa_pay.py":264 + /* "handlers/payments/yookassa_pay.py":274 * amount = user_data["data"].get("required_amount", 0) * * elif isinstance(callback_query, types.Message): # <<<<<<<<<<<<<< @@ -9332,7 +9352,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ goto __pyx_L8; } - /* "handlers/payments/yookassa_pay.py":273 + /* "handlers/payments/yookassa_pay.py":283 * return * else: * await _send_message(callback_query, " .") # <<<<<<<<<<<<<< @@ -9340,7 +9360,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ * */ /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_send_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L6_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_send_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; __pyx_t_5 = 0; @@ -9357,10 +9377,10 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ } #endif { - PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_cur_scope->__pyx_v_callback_query, __pyx_kp_u__26}; + PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_cur_scope->__pyx_v_callback_query, __pyx_kp_u__22}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L6_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -9375,16 +9395,16 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_generator->resume_label = 6; return __pyx_r; __pyx_L18_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 273, __pyx_L6_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 283, __pyx_L6_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 273, __pyx_L6_error) + else __PYX_ERR(0, 283, __pyx_L6_error) } } - /* "handlers/payments/yookassa_pay.py":274 + /* "handlers/payments/yookassa_pay.py":284 * else: * await _send_message(callback_query, " .") * return # <<<<<<<<<<<<<< @@ -9397,26 +9417,26 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ } __pyx_L8:; - /* "handlers/payments/yookassa_pay.py":276 + /* "handlers/payments/yookassa_pay.py":286 * return * * if amount <= 0: # <<<<<<<<<<<<<< * await _send_message(callback_query, " .") * return */ - __pyx_t_2 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_amount, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L6_error) - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 276, __pyx_L6_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_amount, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L6_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 286, __pyx_L6_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { - /* "handlers/payments/yookassa_pay.py":277 + /* "handlers/payments/yookassa_pay.py":287 * * if amount <= 0: * await _send_message(callback_query, " .") # <<<<<<<<<<<<<< * return * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_send_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L6_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_send_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; __pyx_t_5 = 0; @@ -9433,10 +9453,10 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ } #endif { - PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_cur_scope->__pyx_v_callback_query, __pyx_kp_u__27}; + PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_cur_scope->__pyx_v_callback_query, __pyx_kp_u__23}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L6_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -9451,16 +9471,16 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_generator->resume_label = 7; return __pyx_r; __pyx_L20_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 277, __pyx_L6_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 287, __pyx_L6_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 277, __pyx_L6_error) + else __PYX_ERR(0, 287, __pyx_L6_error) } } - /* "handlers/payments/yookassa_pay.py":278 + /* "handlers/payments/yookassa_pay.py":288 * if amount <= 0: * await _send_message(callback_query, " .") * return # <<<<<<<<<<<<<< @@ -9471,7 +9491,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_r = NULL; goto __pyx_L5_return; - /* "handlers/payments/yookassa_pay.py":276 + /* "handlers/payments/yookassa_pay.py":286 * return * * if amount <= 0: # <<<<<<<<<<<<<< @@ -9480,7 +9500,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ */ } - /* "handlers/payments/yookassa_pay.py":280 + /* "handlers/payments/yookassa_pay.py":290 * return * * try: # <<<<<<<<<<<<<< @@ -9494,142 +9514,142 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "handlers/payments/yookassa_pay.py":281 + /* "handlers/payments/yookassa_pay.py":291 * * try: * payment = Payment.create( # <<<<<<<<<<<<<< * { * "amount": {"value": str(amount), "currency": "RUB"}, */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Payment); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 281, __pyx_L21_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Payment); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_create); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L21_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_create); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":283 + /* "handlers/payments/yookassa_pay.py":293 * payment = Payment.create( * { * "amount": {"value": str(amount), "currency": "RUB"}, # <<<<<<<<<<<<<< * "confirmation": { * "type": "redirect", */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L21_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L21_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 293, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = __Pyx_PyObject_Unicode(__pyx_cur_scope->__pyx_v_amount); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 283, __pyx_L21_error) + __pyx_t_11 = __Pyx_PyObject_Unicode(__pyx_cur_scope->__pyx_v_amount); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 293, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_11); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_value, __pyx_t_11) < 0) __PYX_ERR(0, 283, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_value, __pyx_t_11) < 0) __PYX_ERR(0, 293, __pyx_L21_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_currency, __pyx_n_u_RUB) < 0) __PYX_ERR(0, 283, __pyx_L21_error) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_amount, __pyx_t_4) < 0) __PYX_ERR(0, 283, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_currency, __pyx_n_u_RUB) < 0) __PYX_ERR(0, 293, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_amount, __pyx_t_4) < 0) __PYX_ERR(0, 293, __pyx_L21_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "handlers/payments/yookassa_pay.py":285 + /* "handlers/payments/yookassa_pay.py":295 * "amount": {"value": str(amount), "currency": "RUB"}, * "confirmation": { * "type": "redirect", # <<<<<<<<<<<<<< * "return_url": f"{REDIRECT_LINK}", * }, */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L21_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_type, __pyx_n_u_redirect) < 0) __PYX_ERR(0, 285, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_type, __pyx_n_u_redirect) < 0) __PYX_ERR(0, 295, __pyx_L21_error) - /* "handlers/payments/yookassa_pay.py":286 + /* "handlers/payments/yookassa_pay.py":296 * "confirmation": { * "type": "redirect", * "return_url": f"{REDIRECT_LINK}", # <<<<<<<<<<<<<< * }, * "capture": True, */ - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_REDIRECT_LINK); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 286, __pyx_L21_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_REDIRECT_LINK); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 296, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_t_11, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 286, __pyx_L21_error) + __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_t_11, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 296, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_return_url, __pyx_t_12) < 0) __PYX_ERR(0, 285, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_return_url, __pyx_t_12) < 0) __PYX_ERR(0, 295, __pyx_L21_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_confirmation, __pyx_t_4) < 0) __PYX_ERR(0, 283, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_confirmation, __pyx_t_4) < 0) __PYX_ERR(0, 293, __pyx_L21_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "handlers/payments/yookassa_pay.py":288 + /* "handlers/payments/yookassa_pay.py":298 * "return_url": f"{REDIRECT_LINK}", * }, * "capture": True, # <<<<<<<<<<<<<< * "description": f" {tg_id}", * "receipt": { */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_capture, Py_True) < 0) __PYX_ERR(0, 283, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_capture, Py_True) < 0) __PYX_ERR(0, 293, __pyx_L21_error) - /* "handlers/payments/yookassa_pay.py":289 + /* "handlers/payments/yookassa_pay.py":299 * }, * "capture": True, * "description": f" {tg_id}", # <<<<<<<<<<<<<< * "receipt": { * "customer": { */ - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_tg_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L21_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_tg_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 299, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_kp_u__10, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 289, __pyx_L21_error) + __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_kp_u__8, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 299, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_description, __pyx_t_12) < 0) __PYX_ERR(0, 283, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_description, __pyx_t_12) < 0) __PYX_ERR(0, 293, __pyx_L21_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "handlers/payments/yookassa_pay.py":291 + /* "handlers/payments/yookassa_pay.py":301 * "description": f" {tg_id}", * "receipt": { * "customer": { # <<<<<<<<<<<<<< * "full_name": callback_query.from_user.full_name, * "email": f"{tg_id}@{EMAIL}", */ - __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 291, __pyx_L21_error) + __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 301, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_12); - /* "handlers/payments/yookassa_pay.py":292 + /* "handlers/payments/yookassa_pay.py":302 * "receipt": { * "customer": { * "full_name": callback_query.from_user.full_name, # <<<<<<<<<<<<<< * "email": f"{tg_id}@{EMAIL}", * "phone": "79000000000", */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 292, __pyx_L21_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 302, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_from_user); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 292, __pyx_L21_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_from_user); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 302, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_full_name); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 292, __pyx_L21_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_full_name); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 302, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_full_name, __pyx_t_13) < 0) __PYX_ERR(0, 292, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_full_name, __pyx_t_13) < 0) __PYX_ERR(0, 302, __pyx_L21_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "handlers/payments/yookassa_pay.py":293 + /* "handlers/payments/yookassa_pay.py":303 * "customer": { * "full_name": callback_query.from_user.full_name, * "email": f"{tg_id}@{EMAIL}", # <<<<<<<<<<<<<< * "phone": "79000000000", * }, */ - __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 293, __pyx_L21_error) + __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 303, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = 0; __pyx_t_15 = 127; - __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_tg_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 293, __pyx_L21_error) + __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_tg_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 303, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_15; __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __pyx_t_11 = 0; - __Pyx_INCREF(__pyx_kp_u__9); + __Pyx_INCREF(__pyx_kp_u__7); __pyx_t_14 += 1; - __Pyx_GIVEREF(__pyx_kp_u__9); - PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_kp_u__9); - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_EMAIL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 293, __pyx_L21_error) + __Pyx_GIVEREF(__pyx_kp_u__7); + PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_kp_u__7); + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_EMAIL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 303, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_t_11, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 293, __pyx_L21_error) + __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_t_11, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 303, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_15; @@ -9637,93 +9657,93 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_16); __pyx_t_16 = 0; - __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_13, 3, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 293, __pyx_L21_error) + __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_13, 3, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 303, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_email, __pyx_t_16) < 0) __PYX_ERR(0, 292, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_email, __pyx_t_16) < 0) __PYX_ERR(0, 302, __pyx_L21_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_phone, __pyx_kp_u_79000000000) < 0) __PYX_ERR(0, 292, __pyx_L21_error) - if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_customer, __pyx_t_4) < 0) __PYX_ERR(0, 291, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_phone, __pyx_kp_u_79000000000) < 0) __PYX_ERR(0, 302, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_customer, __pyx_t_4) < 0) __PYX_ERR(0, 301, __pyx_L21_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "handlers/payments/yookassa_pay.py":298 + /* "handlers/payments/yookassa_pay.py":308 * "items": [ * { * "description": f" {tg_id}", # <<<<<<<<<<<<<< * "quantity": "1.00", * "amount": { */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 298, __pyx_L21_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_tg_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 298, __pyx_L21_error) + __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_tg_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 308, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_kp_u__10, __pyx_t_16); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 298, __pyx_L21_error) + __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_kp_u__8, __pyx_t_16); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 308, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_description, __pyx_t_13) < 0) __PYX_ERR(0, 298, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_description, __pyx_t_13) < 0) __PYX_ERR(0, 308, __pyx_L21_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_quantity, __pyx_kp_u_1_00) < 0) __PYX_ERR(0, 298, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_quantity, __pyx_kp_u_1_00) < 0) __PYX_ERR(0, 308, __pyx_L21_error) - /* "handlers/payments/yookassa_pay.py":301 + /* "handlers/payments/yookassa_pay.py":311 * "quantity": "1.00", * "amount": { * "value": str(amount), # <<<<<<<<<<<<<< * "currency": "RUB", * }, */ - __pyx_t_13 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 301, __pyx_L21_error) + __pyx_t_13 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 311, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_16 = __Pyx_PyObject_Unicode(__pyx_cur_scope->__pyx_v_amount); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 301, __pyx_L21_error) + __pyx_t_16 = __Pyx_PyObject_Unicode(__pyx_cur_scope->__pyx_v_amount); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 311, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_16); - if (PyDict_SetItem(__pyx_t_13, __pyx_n_u_value, __pyx_t_16) < 0) __PYX_ERR(0, 301, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_13, __pyx_n_u_value, __pyx_t_16) < 0) __PYX_ERR(0, 311, __pyx_L21_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - if (PyDict_SetItem(__pyx_t_13, __pyx_n_u_currency, __pyx_n_u_RUB) < 0) __PYX_ERR(0, 301, __pyx_L21_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_amount, __pyx_t_13) < 0) __PYX_ERR(0, 298, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_13, __pyx_n_u_currency, __pyx_n_u_RUB) < 0) __PYX_ERR(0, 311, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_amount, __pyx_t_13) < 0) __PYX_ERR(0, 308, __pyx_L21_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_vat_code, __pyx_int_1) < 0) __PYX_ERR(0, 298, __pyx_L21_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_payment_subject, __pyx_n_u_payment) < 0) __PYX_ERR(0, 298, __pyx_L21_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_payment_mode, __pyx_n_u_full_payment) < 0) __PYX_ERR(0, 298, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_vat_code, __pyx_int_1) < 0) __PYX_ERR(0, 308, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_payment_subject, __pyx_n_u_payment) < 0) __PYX_ERR(0, 308, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_payment_mode, __pyx_n_u_full_payment) < 0) __PYX_ERR(0, 308, __pyx_L21_error) - /* "handlers/payments/yookassa_pay.py":296 + /* "handlers/payments/yookassa_pay.py":306 * "phone": "79000000000", * }, * "items": [ # <<<<<<<<<<<<<< * { * "description": f" {tg_id}", */ - __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 296, __pyx_L21_error) + __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 306, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_t_4)) __PYX_ERR(0, 296, __pyx_L21_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_t_4)) __PYX_ERR(0, 306, __pyx_L21_error); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_items, __pyx_t_13) < 0) __PYX_ERR(0, 291, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_items, __pyx_t_13) < 0) __PYX_ERR(0, 301, __pyx_L21_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_receipt, __pyx_t_12) < 0) __PYX_ERR(0, 283, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_receipt, __pyx_t_12) < 0) __PYX_ERR(0, 293, __pyx_L21_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "handlers/payments/yookassa_pay.py":310 + /* "handlers/payments/yookassa_pay.py":320 * ], * }, * "metadata": {"user_id": tg_id}, # <<<<<<<<<<<<<< * }, * uuid.uuid4(), */ - __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 310, __pyx_L21_error) + __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 320, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_12); - if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_user_id, __pyx_cur_scope->__pyx_v_tg_id) < 0) __PYX_ERR(0, 310, __pyx_L21_error) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_metadata, __pyx_t_12) < 0) __PYX_ERR(0, 283, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_user_id, __pyx_cur_scope->__pyx_v_tg_id) < 0) __PYX_ERR(0, 320, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_metadata, __pyx_t_12) < 0) __PYX_ERR(0, 293, __pyx_L21_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "handlers/payments/yookassa_pay.py":312 + /* "handlers/payments/yookassa_pay.py":322 * "metadata": {"user_id": tg_id}, * }, * uuid.uuid4(), # <<<<<<<<<<<<<< * ) * */ - __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_uuid); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 312, __pyx_L21_error) + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_uuid); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 322, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_uuid4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 312, __pyx_L21_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_uuid4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; @@ -9744,7 +9764,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL}; __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 312, __pyx_L21_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 322, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -9768,7 +9788,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L21_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -9776,339 +9796,309 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_cur_scope->__pyx_v_payment = __pyx_t_2; __pyx_t_2 = 0; - /* "handlers/payments/yookassa_pay.py":315 + /* "handlers/payments/yookassa_pay.py":325 * ) * * if payment["status"] == "pending": # <<<<<<<<<<<<<< * payment_url = payment["confirmation"]["confirmation_url"] * */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_cur_scope->__pyx_v_payment, __pyx_n_u_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L21_error) + __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_cur_scope->__pyx_v_payment, __pyx_n_u_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_pending, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 315, __pyx_L21_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_pending, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 325, __pyx_L21_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { - /* "handlers/payments/yookassa_pay.py":316 + /* "handlers/payments/yookassa_pay.py":326 * * if payment["status"] == "pending": * payment_url = payment["confirmation"]["confirmation_url"] # <<<<<<<<<<<<<< * * if state_type == "waiting_for_payment": */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_cur_scope->__pyx_v_payment, __pyx_n_u_confirmation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L21_error) + __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_cur_scope->__pyx_v_payment, __pyx_n_u_confirmation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_confirmation_url); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 316, __pyx_L21_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_confirmation_url); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_payment_url = __pyx_t_1; __pyx_t_1 = 0; - /* "handlers/payments/yookassa_pay.py":318 + /* "handlers/payments/yookassa_pay.py":328 * payment_url = payment["confirmation"]["confirmation_url"] * * if state_type == "waiting_for_payment": # <<<<<<<<<<<<<< - * payment_message = f" {amount} . :" + * payment_message = KEY_CREATION_PAYMENT_MESSAGE.format(amount=amount) * elif state_type == "waiting_for_renewal_payment": */ - if (unlikely(!__pyx_cur_scope->__pyx_v_state_type)) { __Pyx_RaiseUnboundLocalError("state_type"); __PYX_ERR(0, 318, __pyx_L21_error) } - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_state_type, __pyx_n_u_waiting_for_payment, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 318, __pyx_L21_error) + if (unlikely(!__pyx_cur_scope->__pyx_v_state_type)) { __Pyx_RaiseUnboundLocalError("state_type"); __PYX_ERR(0, 328, __pyx_L21_error) } + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_state_type, __pyx_n_u_waiting_for_payment, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 328, __pyx_L21_error) if (__pyx_t_6) { - /* "handlers/payments/yookassa_pay.py":319 + /* "handlers/payments/yookassa_pay.py":329 * * if state_type == "waiting_for_payment": - * payment_message = f" {amount} . :" # <<<<<<<<<<<<<< + * payment_message = KEY_CREATION_PAYMENT_MESSAGE.format(amount=amount) # <<<<<<<<<<<<<< * elif state_type == "waiting_for_renewal_payment": - * payment_message = f" {amount} . :" + * payment_message = KEY_RENEWAL_PAYMENT_MESSAGE.format(amount=amount) */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L21_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_KEY_CREATION_PAYMENT_MESSAGE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_14 = 0; - __pyx_t_15 = 127; - __Pyx_INCREF(__pyx_kp_u__12); - __pyx_t_15 = (65535 > __pyx_t_15) ? 65535 : __pyx_t_15; - __pyx_t_14 += 25; - __Pyx_GIVEREF(__pyx_kp_u__12); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__12); - __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_amount, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L21_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_15; - __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); - __pyx_t_2 = 0; - __Pyx_INCREF(__pyx_kp_u__28); - __pyx_t_15 = (65535 > __pyx_t_15) ? 65535 : __pyx_t_15; - __pyx_t_14 += 66; - __Pyx_GIVEREF(__pyx_kp_u__28); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__28); - __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L21_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GIVEREF(__pyx_t_2); - __pyx_cur_scope->__pyx_v_payment_message = ((PyObject*)__pyx_t_2); - __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_amount, __pyx_cur_scope->__pyx_v_amount) < 0) __PYX_ERR(0, 329, __pyx_L21_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 329, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GIVEREF(__pyx_t_12); + __pyx_cur_scope->__pyx_v_payment_message = __pyx_t_12; + __pyx_t_12 = 0; - /* "handlers/payments/yookassa_pay.py":318 + /* "handlers/payments/yookassa_pay.py":328 * payment_url = payment["confirmation"]["confirmation_url"] * * if state_type == "waiting_for_payment": # <<<<<<<<<<<<<< - * payment_message = f" {amount} . :" + * payment_message = KEY_CREATION_PAYMENT_MESSAGE.format(amount=amount) * elif state_type == "waiting_for_renewal_payment": */ goto __pyx_L28; } - /* "handlers/payments/yookassa_pay.py":320 + /* "handlers/payments/yookassa_pay.py":330 * if state_type == "waiting_for_payment": - * payment_message = f" {amount} . :" + * payment_message = KEY_CREATION_PAYMENT_MESSAGE.format(amount=amount) * elif state_type == "waiting_for_renewal_payment": # <<<<<<<<<<<<<< - * payment_message = f" {amount} . :" + * payment_message = KEY_RENEWAL_PAYMENT_MESSAGE.format(amount=amount) * else: */ - if (unlikely(!__pyx_cur_scope->__pyx_v_state_type)) { __Pyx_RaiseUnboundLocalError("state_type"); __PYX_ERR(0, 320, __pyx_L21_error) } - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_state_type, __pyx_n_u_waiting_for_renewal_payment, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 320, __pyx_L21_error) + if (unlikely(!__pyx_cur_scope->__pyx_v_state_type)) { __Pyx_RaiseUnboundLocalError("state_type"); __PYX_ERR(0, 330, __pyx_L21_error) } + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_state_type, __pyx_n_u_waiting_for_renewal_payment, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 330, __pyx_L21_error) if (__pyx_t_6) { - /* "handlers/payments/yookassa_pay.py":321 - * payment_message = f" {amount} . :" + /* "handlers/payments/yookassa_pay.py":331 + * payment_message = KEY_CREATION_PAYMENT_MESSAGE.format(amount=amount) * elif state_type == "waiting_for_renewal_payment": - * payment_message = f" {amount} . :" # <<<<<<<<<<<<<< + * payment_message = KEY_RENEWAL_PAYMENT_MESSAGE.format(amount=amount) # <<<<<<<<<<<<<< * else: - * payment_message = f" {amount} . :" + * payment_message = DEFAULT_PAYMENT_MESSAGE.format(amount=amount) */ - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L21_error) + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_KEY_RENEWAL_PAYMENT_MESSAGE); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 331, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 331, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_12); + if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_amount, __pyx_cur_scope->__pyx_v_amount) < 0) __PYX_ERR(0, 331, __pyx_L21_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_14 = 0; - __pyx_t_15 = 127; - __Pyx_INCREF(__pyx_kp_u__12); - __pyx_t_15 = (65535 > __pyx_t_15) ? 65535 : __pyx_t_15; - __pyx_t_14 += 25; - __Pyx_GIVEREF(__pyx_kp_u__12); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u__12); - __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_amount, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L21_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_15; - __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); - __pyx_t_1 = 0; - __Pyx_INCREF(__pyx_kp_u__29); - __pyx_t_15 = (65535 > __pyx_t_15) ? 65535 : __pyx_t_15; - __pyx_t_14 += 60; - __Pyx_GIVEREF(__pyx_kp_u__29); - PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__29); - __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L21_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GIVEREF(__pyx_t_1); - __pyx_cur_scope->__pyx_v_payment_message = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_GIVEREF(__pyx_t_2); + __pyx_cur_scope->__pyx_v_payment_message = __pyx_t_2; + __pyx_t_2 = 0; - /* "handlers/payments/yookassa_pay.py":320 + /* "handlers/payments/yookassa_pay.py":330 * if state_type == "waiting_for_payment": - * payment_message = f" {amount} . :" + * payment_message = KEY_CREATION_PAYMENT_MESSAGE.format(amount=amount) * elif state_type == "waiting_for_renewal_payment": # <<<<<<<<<<<<<< - * payment_message = f" {amount} . :" + * payment_message = KEY_RENEWAL_PAYMENT_MESSAGE.format(amount=amount) * else: */ goto __pyx_L28; } - /* "handlers/payments/yookassa_pay.py":323 - * payment_message = f" {amount} . :" + /* "handlers/payments/yookassa_pay.py":333 + * payment_message = KEY_RENEWAL_PAYMENT_MESSAGE.format(amount=amount) * else: - * payment_message = f" {amount} . :" # <<<<<<<<<<<<<< + * payment_message = DEFAULT_PAYMENT_MESSAGE.format(amount=amount) # <<<<<<<<<<<<<< * * confirm_keyboard = InlineKeyboardMarkup( */ /*else*/ { - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L21_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DEFAULT_PAYMENT_MESSAGE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 333, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_format); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 333, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 333, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_amount, __pyx_cur_scope->__pyx_v_amount) < 0) __PYX_ERR(0, 333, __pyx_L21_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_14 = 0; - __pyx_t_15 = 127; - __Pyx_INCREF(__pyx_kp_u__12); - __pyx_t_15 = (65535 > __pyx_t_15) ? 65535 : __pyx_t_15; - __pyx_t_14 += 25; - __Pyx_GIVEREF(__pyx_kp_u__12); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__12); - __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_amount, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L21_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_15; - __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); - __pyx_t_2 = 0; - __Pyx_INCREF(__pyx_kp_u__30); - __pyx_t_15 = (65535 > __pyx_t_15) ? 65535 : __pyx_t_15; - __pyx_t_14 += 40; - __Pyx_GIVEREF(__pyx_kp_u__30); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__30); - __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L21_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GIVEREF(__pyx_t_2); - __pyx_cur_scope->__pyx_v_payment_message = ((PyObject*)__pyx_t_2); - __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GIVEREF(__pyx_t_1); + __pyx_cur_scope->__pyx_v_payment_message = __pyx_t_1; + __pyx_t_1 = 0; } __pyx_L28:; - /* "handlers/payments/yookassa_pay.py":325 - * payment_message = f" {amount} . :" + /* "handlers/payments/yookassa_pay.py":335 + * payment_message = DEFAULT_PAYMENT_MESSAGE.format(amount=amount) * * confirm_keyboard = InlineKeyboardMarkup( # <<<<<<<<<<<<<< * inline_keyboard=[ - * [InlineKeyboardButton(text="", url=payment_url)], + * [InlineKeyboardButton(text=PAY_2, url=payment_url)], */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_InlineKeyboardMarkup); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L21_error) - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_InlineKeyboardMarkup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_1); - /* "handlers/payments/yookassa_pay.py":326 + /* "handlers/payments/yookassa_pay.py":336 * * confirm_keyboard = InlineKeyboardMarkup( * inline_keyboard=[ # <<<<<<<<<<<<<< - * [InlineKeyboardButton(text="", url=payment_url)], - * [InlineKeyboardButton(text=" ", callback_data="profile")], + * [InlineKeyboardButton(text=PAY_2, url=payment_url)], + * [InlineKeyboardButton(text=PROFILE, callback_data="profile")], */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L21_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_2); - /* "handlers/payments/yookassa_pay.py":327 + /* "handlers/payments/yookassa_pay.py":337 * confirm_keyboard = InlineKeyboardMarkup( * inline_keyboard=[ - * [InlineKeyboardButton(text="", url=payment_url)], # <<<<<<<<<<<<<< - * [InlineKeyboardButton(text=" ", callback_data="profile")], + * [InlineKeyboardButton(text=PAY_2, url=payment_url)], # <<<<<<<<<<<<<< + * [InlineKeyboardButton(text=PROFILE, callback_data="profile")], * ] */ - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 327, __pyx_L21_error) + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 337, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L21_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_n_u__31) < 0) __PYX_ERR(0, 327, __pyx_L21_error) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_url, __pyx_cur_scope->__pyx_v_payment_url) < 0) __PYX_ERR(0, 327, __pyx_L21_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L21_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PAY_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_t_4) < 0) __PYX_ERR(0, 337, __pyx_L21_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_url, __pyx_cur_scope->__pyx_v_payment_url) < 0) __PYX_ERR(0, 337, __pyx_L21_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L21_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 327, __pyx_L21_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 337, __pyx_L21_error); __pyx_t_4 = 0; - /* "handlers/payments/yookassa_pay.py":328 + /* "handlers/payments/yookassa_pay.py":338 * inline_keyboard=[ - * [InlineKeyboardButton(text="", url=payment_url)], - * [InlineKeyboardButton(text=" ", callback_data="profile")], # <<<<<<<<<<<<<< + * [InlineKeyboardButton(text=PAY_2, url=payment_url)], + * [InlineKeyboardButton(text=PROFILE, callback_data="profile")], # <<<<<<<<<<<<<< * ] * ) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 328, __pyx_L21_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_InlineKeyboardButton); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 328, __pyx_L21_error) + __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 338, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_12); - if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_text, __pyx_kp_u__32) < 0) __PYX_ERR(0, 328, __pyx_L21_error) - if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_callback_data, __pyx_n_u_profile) < 0) __PYX_ERR(0, 328, __pyx_L21_error) - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 328, __pyx_L21_error) + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_PROFILE); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 338, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_13); + if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_text, __pyx_t_13) < 0) __PYX_ERR(0, 338, __pyx_L21_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_callback_data, __pyx_n_u_profile) < 0) __PYX_ERR(0, 338, __pyx_L21_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 338, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = PyList_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 328, __pyx_L21_error) + __pyx_t_12 = PyList_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 338, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_13); - if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_13)) __PYX_ERR(0, 328, __pyx_L21_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_13)) __PYX_ERR(0, 338, __pyx_L21_error); __pyx_t_13 = 0; - /* "handlers/payments/yookassa_pay.py":326 + /* "handlers/payments/yookassa_pay.py":336 * * confirm_keyboard = InlineKeyboardMarkup( * inline_keyboard=[ # <<<<<<<<<<<<<< - * [InlineKeyboardButton(text="", url=payment_url)], - * [InlineKeyboardButton(text=" ", callback_data="profile")], + * [InlineKeyboardButton(text=PAY_2, url=payment_url)], + * [InlineKeyboardButton(text=PROFILE, callback_data="profile")], */ - __pyx_t_13 = PyList_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 326, __pyx_L21_error) + __pyx_t_13 = PyList_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 336, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_t_3)) __PYX_ERR(0, 326, __pyx_L21_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_t_3)) __PYX_ERR(0, 336, __pyx_L21_error); __Pyx_GIVEREF(__pyx_t_12); - if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 1, __pyx_t_12)) __PYX_ERR(0, 326, __pyx_L21_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 1, __pyx_t_12)) __PYX_ERR(0, 336, __pyx_L21_error); __pyx_t_3 = 0; __pyx_t_12 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_inline_keyboard, __pyx_t_13) < 0) __PYX_ERR(0, 326, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_inline_keyboard, __pyx_t_13) < 0) __PYX_ERR(0, 336, __pyx_L21_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "handlers/payments/yookassa_pay.py":325 - * payment_message = f" {amount} . :" + /* "handlers/payments/yookassa_pay.py":335 + * payment_message = DEFAULT_PAYMENT_MESSAGE.format(amount=amount) * * confirm_keyboard = InlineKeyboardMarkup( # <<<<<<<<<<<<<< * inline_keyboard=[ - * [InlineKeyboardButton(text="", url=payment_url)], + * [InlineKeyboardButton(text=PAY_2, url=payment_url)], */ - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 325, __pyx_L21_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 335, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_13); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_13); __pyx_cur_scope->__pyx_v_confirm_keyboard = __pyx_t_13; __pyx_t_13 = 0; - /* "handlers/payments/yookassa_pay.py":332 + /* "handlers/payments/yookassa_pay.py":342 * ) * * await _send_message( # <<<<<<<<<<<<<< * callback_query, * text=payment_message, */ - __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_send_message); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 332, __pyx_L21_error) + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_send_message); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 342, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_13); - /* "handlers/payments/yookassa_pay.py":333 + /* "handlers/payments/yookassa_pay.py":343 * * await _send_message( * callback_query, # <<<<<<<<<<<<<< * text=payment_message, * reply_markup=confirm_keyboard, */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L21_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callback_query); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callback_query); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_callback_query)) __PYX_ERR(0, 332, __pyx_L21_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_callback_query)) __PYX_ERR(0, 342, __pyx_L21_error); - /* "handlers/payments/yookassa_pay.py":334 + /* "handlers/payments/yookassa_pay.py":344 * await _send_message( * callback_query, * text=payment_message, # <<<<<<<<<<<<<< * reply_markup=confirm_keyboard, * ) */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 334, __pyx_L21_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_text, __pyx_cur_scope->__pyx_v_payment_message) < 0) __PYX_ERR(0, 334, __pyx_L21_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_text, __pyx_cur_scope->__pyx_v_payment_message) < 0) __PYX_ERR(0, 344, __pyx_L21_error) - /* "handlers/payments/yookassa_pay.py":335 + /* "handlers/payments/yookassa_pay.py":345 * callback_query, * text=payment_message, * reply_markup=confirm_keyboard, # <<<<<<<<<<<<<< * ) * else: */ - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_reply_markup, __pyx_cur_scope->__pyx_v_confirm_keyboard) < 0) __PYX_ERR(0, 334, __pyx_L21_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_reply_markup, __pyx_cur_scope->__pyx_v_confirm_keyboard) < 0) __PYX_ERR(0, 344, __pyx_L21_error) - /* "handlers/payments/yookassa_pay.py":332 + /* "handlers/payments/yookassa_pay.py":342 * ) * * await _send_message( # <<<<<<<<<<<<<< * callback_query, * text=payment_message, */ - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 332, __pyx_L21_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 342, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XGOTREF(__pyx_r); @@ -10135,16 +10125,16 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_t_10 = __pyx_cur_scope->__pyx_t_2; __pyx_cur_scope->__pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_t_10); - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 332, __pyx_L21_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 342, __pyx_L21_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 332, __pyx_L21_error) + else __PYX_ERR(0, 342, __pyx_L21_error) } } - /* "handlers/payments/yookassa_pay.py":315 + /* "handlers/payments/yookassa_pay.py":325 * ) * * if payment["status"] == "pending": # <<<<<<<<<<<<<< @@ -10154,7 +10144,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ goto __pyx_L27; } - /* "handlers/payments/yookassa_pay.py":338 + /* "handlers/payments/yookassa_pay.py":348 * ) * else: * await _send_message(callback_query, " .") # <<<<<<<<<<<<<< @@ -10162,29 +10152,29 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ * logger.error(f" : {e}") */ /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_send_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 338, __pyx_L21_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_send_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_1); + if (unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_5 = 1; } } #endif { - PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_cur_scope->__pyx_v_callback_query, __pyx_kp_u__14}; - __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 338, __pyx_L21_error) + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_callback_query, __pyx_kp_u__11}; + __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 348, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -10212,18 +10202,18 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_t_10 = __pyx_cur_scope->__pyx_t_2; __pyx_cur_scope->__pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_t_10); - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 338, __pyx_L21_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 348, __pyx_L21_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 338, __pyx_L21_error) + else __PYX_ERR(0, 348, __pyx_L21_error) } } } __pyx_L27:; - /* "handlers/payments/yookassa_pay.py":280 + /* "handlers/payments/yookassa_pay.py":290 * return * * try: # <<<<<<<<<<<<<< @@ -10245,7 +10235,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "handlers/payments/yookassa_pay.py":339 + /* "handlers/payments/yookassa_pay.py":349 * else: * await _send_message(callback_query, " .") * except Exception as e: # <<<<<<<<<<<<<< @@ -10255,30 +10245,30 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_17) { __Pyx_AddTraceback("handlers.payments.yookassa_pay.process_custom_amount_input", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 339, __pyx_L23_except_error) + if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 349, __pyx_L23_except_error) __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_cur_scope->__pyx_v_e = __pyx_t_2; + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_cur_scope->__pyx_v_e = __pyx_t_1; /*try:*/ { - /* "handlers/payments/yookassa_pay.py":340 + /* "handlers/payments/yookassa_pay.py":350 * await _send_message(callback_query, " .") * except Exception as e: * logger.error(f" : {e}") # <<<<<<<<<<<<<< * await _send_message(callback_query, " .") * finally: */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 340, __pyx_L36_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L36_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 350, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 340, __pyx_L36_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_16 = __Pyx_PyUnicode_Concat(__pyx_kp_u__33, __pyx_t_3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 340, __pyx_L36_error) + __pyx_t_16 = __Pyx_PyUnicode_Concat(__pyx_kp_u__24, __pyx_t_3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 350, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -10300,20 +10290,20 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 340, __pyx_L36_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 350, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "handlers/payments/yookassa_pay.py":341 + /* "handlers/payments/yookassa_pay.py":351 * except Exception as e: * logger.error(f" : {e}") * await _send_message(callback_query, " .") # <<<<<<<<<<<<<< * finally: * await conn.close() */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_send_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 341, __pyx_L36_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_send_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 351, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_16 = NULL; __pyx_t_5 = 0; @@ -10330,10 +10320,10 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ } #endif { - PyObject *__pyx_callargs[3] = {__pyx_t_16, __pyx_cur_scope->__pyx_v_callback_query, __pyx_kp_u__34}; + PyObject *__pyx_callargs[3] = {__pyx_t_16, __pyx_cur_scope->__pyx_v_callback_query, __pyx_kp_u__25}; __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 341, __pyx_L36_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 351, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -10378,17 +10368,17 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_t_12 = __pyx_cur_scope->__pyx_t_5; __pyx_cur_scope->__pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_t_12); - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 341, __pyx_L36_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 351, __pyx_L36_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 341, __pyx_L36_error) + else __PYX_ERR(0, 351, __pyx_L36_error) } } } - /* "handlers/payments/yookassa_pay.py":339 + /* "handlers/payments/yookassa_pay.py":349 * else: * await _send_message(callback_query, " .") * except Exception as e: # <<<<<<<<<<<<<< @@ -10440,13 +10430,13 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_L37:; } __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L22_exception_handled; } goto __pyx_L23_except_error; - /* "handlers/payments/yookassa_pay.py":280 + /* "handlers/payments/yookassa_pay.py":290 * return * * try: # <<<<<<<<<<<<<< @@ -10468,7 +10458,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ } } - /* "handlers/payments/yookassa_pay.py":343 + /* "handlers/payments/yookassa_pay.py":353 * await _send_message(callback_query, " .") * finally: * await conn.close() # <<<<<<<<<<<<<< @@ -10477,32 +10467,32 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ */ /*finally:*/ { /*normal exit:*/{ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_conn, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_conn, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); @@ -10512,12 +10502,12 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_generator->resume_label = 11; return __pyx_r; __pyx_L43_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 343, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 353, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 343, __pyx_L1_error) + else __PYX_ERR(0, 353, __pyx_L1_error) } } goto __pyx_L7; @@ -10544,32 +10534,32 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __Pyx_XGOTREF(__pyx_t_23); __pyx_t_18 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_26 = __pyx_filename; { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_conn, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L45_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_conn, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L45_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L45_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L45_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_t_8); @@ -10615,12 +10605,12 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_cur_scope->__pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_t_25); __pyx_t_26 = __pyx_cur_scope->__pyx_t_8; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 343, __pyx_L45_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 353, __pyx_L45_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 343, __pyx_L45_error) + else __PYX_ERR(0, 353, __pyx_L45_error) } } } @@ -10663,32 +10653,32 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __Pyx_XGOTREF(__pyx_t_10); __pyx_t_22 = __pyx_r; __pyx_r = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_conn, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_conn, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_t_8); @@ -10733,12 +10723,12 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ __pyx_t_25 = __pyx_cur_scope->__pyx_t_9; __pyx_cur_scope->__pyx_t_9 = 0; __Pyx_XGOTREF(__pyx_t_25); - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 343, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 353, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 343, __pyx_L1_error) + else __PYX_ERR(0, 353, __pyx_L1_error) } } __pyx_r = __pyx_t_22; @@ -10760,7 +10750,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "handlers/payments/yookassa_pay.py":244 + /* "handlers/payments/yookassa_pay.py":254 * * * @router.message(ReplenishBalanceState.entering_custom_amount_yookassa) # <<<<<<<<<<<<<< @@ -10794,7 +10784,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_14generator4(__pyx_ } static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_17generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "handlers/payments/yookassa_pay.py":346 +/* "handlers/payments/yookassa_pay.py":356 * * * async def _send_message(callback_query: types.CallbackQuery | types.Message, text: str, reply_markup=None): # <<<<<<<<<<<<<< @@ -10863,7 +10853,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 356, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -10871,21 +10861,21 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 356, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("_send_message", 0, 2, 3, 1); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_send_message", 0, 2, 3, 1); __PYX_ERR(0, 356, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reply_markup); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 356, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_send_message") < 0)) __PYX_ERR(0, 346, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_send_message") < 0)) __PYX_ERR(0, 356, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -10903,7 +10893,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_send_message", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_send_message", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 356, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -10917,7 +10907,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_text), (&PyUnicode_Type), 0, "text", 1))) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_text), (&PyUnicode_Type), 0, "text", 1))) __PYX_ERR(0, 356, __pyx_L1_error) __pyx_r = __pyx_pf_8handlers_8payments_12yookassa_pay_15_send_message(__pyx_self, __pyx_v_callback_query, __pyx_v_text, __pyx_v_reply_markup); /* function exit code */ @@ -10947,7 +10937,7 @@ static PyObject *__pyx_pf_8handlers_8payments_12yookassa_pay_15_send_message(CYT if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_8handlers_8payments_12yookassa_pay___pyx_scope_struct_5__send_message *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 356, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -10961,7 +10951,7 @@ static PyObject *__pyx_pf_8handlers_8payments_12yookassa_pay_15_send_message(CYT __Pyx_INCREF(__pyx_cur_scope->__pyx_v_reply_markup); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_reply_markup); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_8handlers_8payments_12yookassa_pay_17generator5, __pyx_codeobj__35, (PyObject *) __pyx_cur_scope, __pyx_n_s_send_message, __pyx_n_s_send_message, __pyx_n_s_handlers_payments_yookassa_pay); if (unlikely(!gen)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_8handlers_8payments_12yookassa_pay_17generator5, __pyx_codeobj__26, (PyObject *) __pyx_cur_scope, __pyx_n_s_send_message, __pyx_n_s_send_message, __pyx_n_s_handlers_payments_yookassa_pay); if (unlikely(!gen)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -11000,45 +10990,45 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_17generator5(__pyx_ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 356, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":348 + /* "handlers/payments/yookassa_pay.py":358 * async def _send_message(callback_query: types.CallbackQuery | types.Message, text: str, reply_markup=None): * """ .""" * if isinstance(callback_query, types.CallbackQuery): # <<<<<<<<<<<<<< * await callback_query.message.answer(text, reply_markup=reply_markup) * elif isinstance(callback_query, types.Message): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_CallbackQuery); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 348, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_CallbackQuery); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_callback_query, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 348, __pyx_L1_error) + __pyx_t_3 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_callback_query, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 358, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "handlers/payments/yookassa_pay.py":349 + /* "handlers/payments/yookassa_pay.py":359 * """ .""" * if isinstance(callback_query, types.CallbackQuery): * await callback_query.message.answer(text, reply_markup=reply_markup) # <<<<<<<<<<<<<< * elif isinstance(callback_query, types.Message): * await callback_query.answer(text, reply_markup=reply_markup) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_answer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_answer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_text); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_text); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_text)) __PYX_ERR(0, 349, __pyx_L1_error); - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 349, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_text)) __PYX_ERR(0, 359, __pyx_L1_error); + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_reply_markup, __pyx_cur_scope->__pyx_v_reply_markup) < 0) __PYX_ERR(0, 349, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 349, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_reply_markup, __pyx_cur_scope->__pyx_v_reply_markup) < 0) __PYX_ERR(0, 359, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -11054,16 +11044,16 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_17generator5(__pyx_ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L5_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 349, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 359, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 349, __pyx_L1_error) + else __PYX_ERR(0, 359, __pyx_L1_error) } } - /* "handlers/payments/yookassa_pay.py":348 + /* "handlers/payments/yookassa_pay.py":358 * async def _send_message(callback_query: types.CallbackQuery | types.Message, text: str, reply_markup=None): * """ .""" * if isinstance(callback_query, types.CallbackQuery): # <<<<<<<<<<<<<< @@ -11073,37 +11063,37 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_17generator5(__pyx_ goto __pyx_L4; } - /* "handlers/payments/yookassa_pay.py":350 + /* "handlers/payments/yookassa_pay.py":360 * if isinstance(callback_query, types.CallbackQuery): * await callback_query.message.answer(text, reply_markup=reply_markup) * elif isinstance(callback_query, types.Message): # <<<<<<<<<<<<<< * await callback_query.answer(text, reply_markup=reply_markup) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_types); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_types); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 350, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_callback_query, __pyx_t_4); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 350, __pyx_L1_error) + __pyx_t_3 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_callback_query, __pyx_t_4); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { - /* "handlers/payments/yookassa_pay.py":351 + /* "handlers/payments/yookassa_pay.py":361 * await callback_query.message.answer(text, reply_markup=reply_markup) * elif isinstance(callback_query, types.Message): * await callback_query.answer(text, reply_markup=reply_markup) # <<<<<<<<<<<<<< */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_answer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 351, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_callback_query, __pyx_n_s_answer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 351, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_text); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_text); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_text)) __PYX_ERR(0, 351, __pyx_L1_error); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_text)) __PYX_ERR(0, 361, __pyx_L1_error); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_reply_markup, __pyx_cur_scope->__pyx_v_reply_markup) < 0) __PYX_ERR(0, 351, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_reply_markup, __pyx_cur_scope->__pyx_v_reply_markup) < 0) __PYX_ERR(0, 361, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -11119,16 +11109,16 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_17generator5(__pyx_ __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L6_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 351, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 361, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 351, __pyx_L1_error) + else __PYX_ERR(0, 361, __pyx_L1_error) } } - /* "handlers/payments/yookassa_pay.py":350 + /* "handlers/payments/yookassa_pay.py":360 * if isinstance(callback_query, types.CallbackQuery): * await callback_query.message.answer(text, reply_markup=reply_markup) * elif isinstance(callback_query, types.Message): # <<<<<<<<<<<<<< @@ -11138,7 +11128,7 @@ static PyObject *__pyx_gb_8handlers_8payments_12yookassa_pay_17generator5(__pyx_ __pyx_L4:; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "handlers/payments/yookassa_pay.py":346 + /* "handlers/payments/yookassa_pay.py":356 * * * async def _send_message(callback_query: types.CallbackQuery | types.Message, text: str, reply_markup=None): # <<<<<<<<<<<<<< @@ -12047,6 +12037,9 @@ static int __pyx_tp_traverse_8handlers_8payments_12yookassa_pay___pyx_scope_stru if (p->__pyx_v_payment) { e = (*v)(p->__pyx_v_payment, a); if (e) return e; } + if (p->__pyx_v_payment_message) { + e = (*v)(p->__pyx_v_payment_message, a); if (e) return e; + } if (p->__pyx_v_payment_url) { e = (*v)(p->__pyx_v_payment_url, a); if (e) return e; } @@ -12376,9 +12369,12 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_kp_u_API_Yookassa, __pyx_k_API_Yookassa, sizeof(__pyx_k_API_Yookassa), 0, 1, 0, 0}, {&__pyx_kp_u_Account_ID, __pyx_k_Account_ID, sizeof(__pyx_k_Account_ID), 0, 1, 0, 0}, {&__pyx_n_s_Any, __pyx_k_Any, sizeof(__pyx_k_Any), 0, 0, 1, 1}, + {&__pyx_n_s_BACK, __pyx_k_BACK, sizeof(__pyx_k_BACK), 0, 0, 1, 1}, + {&__pyx_n_s_CUSTOM_SUM, __pyx_k_CUSTOM_SUM, sizeof(__pyx_k_CUSTOM_SUM), 0, 0, 1, 1}, {&__pyx_n_s_CallbackQuery, __pyx_k_CallbackQuery, sizeof(__pyx_k_CallbackQuery), 0, 0, 1, 1}, {&__pyx_n_s_Configuration, __pyx_k_Configuration, sizeof(__pyx_k_Configuration), 0, 0, 1, 1}, {&__pyx_n_s_DATABASE_URL, __pyx_k_DATABASE_URL, sizeof(__pyx_k_DATABASE_URL), 0, 0, 1, 1}, + {&__pyx_n_s_DEFAULT_PAYMENT_MESSAGE, __pyx_k_DEFAULT_PAYMENT_MESSAGE, sizeof(__pyx_k_DEFAULT_PAYMENT_MESSAGE), 0, 0, 1, 1}, {&__pyx_n_s_EMAIL, __pyx_k_EMAIL, sizeof(__pyx_k_EMAIL), 0, 0, 1, 1}, {&__pyx_n_s_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 0, 1, 1}, {&__pyx_n_s_FSMContext, __pyx_k_FSMContext, sizeof(__pyx_k_FSMContext), 0, 0, 1, 1}, @@ -12388,10 +12384,15 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_InlineKeyboardBuilder, __pyx_k_InlineKeyboardBuilder, sizeof(__pyx_k_InlineKeyboardBuilder), 0, 0, 1, 1}, {&__pyx_n_s_InlineKeyboardButton, __pyx_k_InlineKeyboardButton, sizeof(__pyx_k_InlineKeyboardButton), 0, 0, 1, 1}, {&__pyx_n_s_InlineKeyboardMarkup, __pyx_k_InlineKeyboardMarkup, sizeof(__pyx_k_InlineKeyboardMarkup), 0, 0, 1, 1}, + {&__pyx_n_s_KEY_CREATION_PAYMENT_MESSAGE, __pyx_k_KEY_CREATION_PAYMENT_MESSAGE, sizeof(__pyx_k_KEY_CREATION_PAYMENT_MESSAGE), 0, 0, 1, 1}, + {&__pyx_n_s_KEY_RENEWAL_PAYMENT_MESSAGE, __pyx_k_KEY_RENEWAL_PAYMENT_MESSAGE, sizeof(__pyx_k_KEY_RENEWAL_PAYMENT_MESSAGE), 0, 0, 1, 1}, {&__pyx_n_s_MAIN_SECRET, __pyx_k_MAIN_SECRET, sizeof(__pyx_k_MAIN_SECRET), 0, 0, 1, 1}, {&__pyx_n_s_Message, __pyx_k_Message, sizeof(__pyx_k_Message), 0, 0, 1, 1}, + {&__pyx_n_s_PAY, __pyx_k_PAY, sizeof(__pyx_k_PAY), 0, 0, 1, 1}, {&__pyx_n_s_PAYMENT_OPTIONS, __pyx_k_PAYMENT_OPTIONS, sizeof(__pyx_k_PAYMENT_OPTIONS), 0, 0, 1, 1}, + {&__pyx_n_s_PAY_2, __pyx_k_PAY_2, sizeof(__pyx_k_PAY_2), 0, 0, 1, 1}, {&__pyx_n_u_PIRAT0ETO7DLYA9TEBYA, __pyx_k_PIRAT0ETO7DLYA9TEBYA, sizeof(__pyx_k_PIRAT0ETO7DLYA9TEBYA), 0, 1, 0, 1}, + {&__pyx_n_s_PROFILE, __pyx_k_PROFILE, sizeof(__pyx_k_PROFILE), 0, 0, 1, 1}, {&__pyx_n_s_Payment, __pyx_k_Payment, sizeof(__pyx_k_Payment), 0, 0, 1, 1}, {&__pyx_kp_u_Payment_succeeded_for_user_id, __pyx_k_Payment_succeeded_for_user_id, sizeof(__pyx_k_Payment_succeeded_for_user_id), 0, 1, 0, 0}, {&__pyx_n_s_REDIRECT_LINK, __pyx_k_REDIRECT_LINK, sizeof(__pyx_k_REDIRECT_LINK), 0, 0, 1, 1}, @@ -12409,33 +12410,24 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_YOOKASSA_SECRET_KEY, __pyx_k_YOOKASSA_SECRET_KEY, sizeof(__pyx_k_YOOKASSA_SECRET_KEY), 0, 0, 1, 1}, {&__pyx_n_s_YOOKASSA_SHOP_ID, __pyx_k_YOOKASSA_SHOP_ID, sizeof(__pyx_k_YOOKASSA_SHOP_ID), 0, 0, 1, 1}, {&__pyx_kp_u__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 1, 0, 0}, - {&__pyx_n_u__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 1, 0, 1}, - {&__pyx_kp_u__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 1, 0, 0}, + {&__pyx_kp_u__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 1, 0, 0}, {&__pyx_kp_u__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 1, 0, 0}, {&__pyx_kp_u__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 1, 0, 0}, {&__pyx_kp_u__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 1, 0, 0}, - {&__pyx_kp_u__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 1, 0, 0}, {&__pyx_kp_u__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 1, 0, 0}, {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0}, - {&__pyx_kp_u__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 1, 0, 0}, + {&__pyx_kp_u__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 1, 0, 0}, + {&__pyx_kp_u__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 1, 0, 0}, {&__pyx_kp_u__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 1, 0, 0}, + {&__pyx_kp_u__24, __pyx_k__24, sizeof(__pyx_k__24), 0, 1, 0, 0}, {&__pyx_kp_u__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 1, 0, 0}, - {&__pyx_kp_u__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 1, 0, 0}, - {&__pyx_kp_u__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 1, 0, 0}, + {&__pyx_n_s__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 0, 1, 1}, {&__pyx_kp_u__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 1, 0, 0}, - {&__pyx_kp_u__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 1, 0, 0}, {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0}, - {&__pyx_kp_u__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 1, 0, 0}, - {&__pyx_n_u__31, __pyx_k__31, sizeof(__pyx_k__31), 0, 1, 0, 1}, - {&__pyx_kp_u__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 1, 0, 0}, - {&__pyx_kp_u__33, __pyx_k__33, sizeof(__pyx_k__33), 0, 1, 0, 0}, - {&__pyx_kp_u__34, __pyx_k__34, sizeof(__pyx_k__34), 0, 1, 0, 0}, - {&__pyx_n_s__36, __pyx_k__36, sizeof(__pyx_k__36), 0, 0, 1, 1}, - {&__pyx_kp_u__37, __pyx_k__37, sizeof(__pyx_k__37), 0, 1, 0, 0}, - {&__pyx_kp_u__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0, 0}, - {&__pyx_n_s__46, __pyx_k__46, sizeof(__pyx_k__46), 0, 0, 1, 1}, + {&__pyx_n_s__37, __pyx_k__37, sizeof(__pyx_k__37), 0, 0, 1, 1}, {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0}, {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0}, + {&__pyx_kp_u__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 1, 0, 0}, {&__pyx_kp_u__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0}, {&__pyx_n_s_account_id, __pyx_k_account_id, sizeof(__pyx_k_account_id), 0, 0, 1, 1}, {&__pyx_n_s_add_connection, __pyx_k_add_connection, sizeof(__pyx_k_add_connection), 0, 0, 1, 1}, @@ -12498,6 +12490,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1}, {&__pyx_n_s_expected_hash, __pyx_k_expected_hash, sizeof(__pyx_k_expected_hash), 0, 0, 1, 1}, {&__pyx_n_s_find_one, __pyx_k_find_one, sizeof(__pyx_k_find_one), 0, 0, 1, 1}, + {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, {&__pyx_n_s_from_user, __pyx_k_from_user, sizeof(__pyx_k_from_user), 0, 0, 1, 1}, {&__pyx_n_s_full_name, __pyx_k_full_name, sizeof(__pyx_k_full_name), 0, 0, 1, 1}, {&__pyx_n_u_full_name, __pyx_k_full_name, sizeof(__pyx_k_full_name), 0, 1, 0, 1}, @@ -12506,6 +12499,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, {&__pyx_n_s_get_key_count, __pyx_k_get_key_count, sizeof(__pyx_k_get_key_count), 0, 0, 1, 1}, {&__pyx_n_s_get_temporary_data, __pyx_k_get_temporary_data, sizeof(__pyx_k_get_temporary_data), 0, 0, 1, 1}, + {&__pyx_n_s_handlers_buttons_yookassa, __pyx_k_handlers_buttons_yookassa, sizeof(__pyx_k_handlers_buttons_yookassa), 0, 0, 1, 1}, {&__pyx_n_s_handlers_payments_gift, __pyx_k_handlers_payments_gift, sizeof(__pyx_k_handlers_payments_gift), 0, 0, 1, 1}, {&__pyx_n_s_handlers_payments_utils, __pyx_k_handlers_payments_utils, sizeof(__pyx_k_handlers_payments_utils), 0, 0, 1, 1}, {&__pyx_n_s_handlers_payments_yookassa_pay, __pyx_k_handlers_payments_yookassa_pay, sizeof(__pyx_k_handlers_payments_yookassa_pay), 0, 0, 1, 1}, @@ -12623,8 +12617,8 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { } /* #### Code section: cached_builtins ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 68, __pyx_L1_error) - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 132, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -12635,116 +12629,116 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "handlers/payments/yookassa_pay.py":114 + /* "handlers/payments/yookassa_pay.py":124 * callback_query: types.CallbackQuery, state: FSMContext * ): * data = callback_query.data.split("|", 1) # <<<<<<<<<<<<<< * * if len(data) != 2: */ - __pyx_tuple__8 = PyTuple_Pack(2, __pyx_kp_u__7, __pyx_int_1); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 114, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__8); - __Pyx_GIVEREF(__pyx_tuple__8); + __pyx_tuple__6 = PyTuple_Pack(2, __pyx_kp_u__5, __pyx_int_1); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__6); + __Pyx_GIVEREF(__pyx_tuple__6); - /* "handlers/payments/yookassa_pay.py":235 - * builder.row(InlineKeyboardButton(text=" ", callback_data="pay_yookassa")) + /* "handlers/payments/yookassa_pay.py":245 + * builder.row(InlineKeyboardButton(text=BACK, callback_data="pay_yookassa")) * * await callback_query.message.answer( # <<<<<<<<<<<<<< * ", .", * reply_markup=builder.as_markup(), */ - __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_u__20); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 235, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__21); - __Pyx_GIVEREF(__pyx_tuple__21); + __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_u__16); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__17); + __Pyx_GIVEREF(__pyx_tuple__17); - /* "handlers/payments/yookassa_pay.py":262 + /* "handlers/payments/yookassa_pay.py":272 * return * * amount = user_data["data"].get("required_amount", 0) # <<<<<<<<<<<<<< * * elif isinstance(callback_query, types.Message): */ - __pyx_tuple__24 = PyTuple_Pack(2, __pyx_n_u_required_amount, __pyx_int_0); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 262, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__24); - __Pyx_GIVEREF(__pyx_tuple__24); + __pyx_tuple__20 = PyTuple_Pack(2, __pyx_n_u_required_amount, __pyx_int_0); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__20); + __Pyx_GIVEREF(__pyx_tuple__20); - /* "handlers/payments/yookassa_pay.py":52 + /* "handlers/payments/yookassa_pay.py":62 * * * @router.callback_query(F.data == "pay_yookassa") # <<<<<<<<<<<<<< * async def process_callback_pay_yookassa( * callback_query: types.CallbackQuery, state: FSMContext, session: Any */ - __pyx_tuple__38 = PyTuple_Pack(9, __pyx_n_s_callback_query, __pyx_n_s_state, __pyx_n_s_session, __pyx_n_s_expected_hash, __pyx_n_s_tg_id, __pyx_n_s_builder, __pyx_n_s_i, __pyx_n_s_key_count, __pyx_n_s_exists); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 52, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__38); - __Pyx_GIVEREF(__pyx_tuple__38); - __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_handlers_payments_yookassa_pay_p, __pyx_n_s_process_callback_pay_yookassa, 52, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 52, __pyx_L1_error) + __pyx_tuple__29 = PyTuple_Pack(9, __pyx_n_s_callback_query, __pyx_n_s_state, __pyx_n_s_session, __pyx_n_s_expected_hash, __pyx_n_s_tg_id, __pyx_n_s_builder, __pyx_n_s_i, __pyx_n_s_key_count, __pyx_n_s_exists); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__29); + __Pyx_GIVEREF(__pyx_tuple__29); + __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_handlers_payments_yookassa_pay_p, __pyx_n_s_process_callback_pay_yookassa, 62, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 62, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":110 + /* "handlers/payments/yookassa_pay.py":120 * * * @router.callback_query(F.data.startswith("yookassa_amount|")) # <<<<<<<<<<<<<< * async def process_amount_selection( * callback_query: types.CallbackQuery, state: FSMContext */ - __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_u_yookassa_amount); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 110, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__39); - __Pyx_GIVEREF(__pyx_tuple__39); - __pyx_tuple__40 = PyTuple_Pack(11, __pyx_n_s_callback_query, __pyx_n_s_state, __pyx_n_s_data, __pyx_n_s_amount_str, __pyx_n_s_amount, __pyx_n_s_customer_name, __pyx_n_s_customer_id, __pyx_n_s_customer_email, __pyx_n_s_payment, __pyx_n_s_payment_url, __pyx_n_s_confirm_keyboard); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 110, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__40); - __Pyx_GIVEREF(__pyx_tuple__40); - __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_handlers_payments_yookassa_pay_p, __pyx_n_s_process_amount_selection, 110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_u_yookassa_amount); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__30); + __Pyx_GIVEREF(__pyx_tuple__30); + __pyx_tuple__31 = PyTuple_Pack(11, __pyx_n_s_callback_query, __pyx_n_s_state, __pyx_n_s_data, __pyx_n_s_amount_str, __pyx_n_s_amount, __pyx_n_s_customer_name, __pyx_n_s_customer_id, __pyx_n_s_customer_email, __pyx_n_s_payment, __pyx_n_s_payment_url, __pyx_n_s_confirm_keyboard); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__31); + __Pyx_GIVEREF(__pyx_tuple__31); + __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_handlers_payments_yookassa_pay_p, __pyx_n_s_process_amount_selection, 120, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 120, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":184 + /* "handlers/payments/yookassa_pay.py":194 * * * async def yookassa_webhook(request): # <<<<<<<<<<<<<< * """ * Yookassa . */ - __pyx_tuple__41 = PyTuple_Pack(10, __pyx_n_s_request, __pyx_n_s_event, __pyx_n_s_payment_object, __pyx_n_s_payment_id, __pyx_n_s_payment, __pyx_n_s_user_id_str, __pyx_n_s_amount_str, __pyx_n_s_user_id, __pyx_n_s_amount, __pyx_n_s_e); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 184, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__41); - __Pyx_GIVEREF(__pyx_tuple__41); - __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_handlers_payments_yookassa_pay_p, __pyx_n_s_yookassa_webhook, 184, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_tuple__32 = PyTuple_Pack(10, __pyx_n_s_request, __pyx_n_s_event, __pyx_n_s_payment_object, __pyx_n_s_payment_id, __pyx_n_s_payment, __pyx_n_s_user_id_str, __pyx_n_s_amount_str, __pyx_n_s_user_id, __pyx_n_s_amount, __pyx_n_s_e); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__32); + __Pyx_GIVEREF(__pyx_tuple__32); + __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_handlers_payments_yookassa_pay_p, __pyx_n_s_yookassa_webhook, 194, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 194, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":228 + /* "handlers/payments/yookassa_pay.py":238 * * * @router.callback_query(F.data == "enter_custom_amount_yookassa") # <<<<<<<<<<<<<< * async def process_enter_custom_amount( * callback_query: types.CallbackQuery, state: FSMContext */ - __pyx_tuple__42 = PyTuple_Pack(3, __pyx_n_s_callback_query, __pyx_n_s_state, __pyx_n_s_builder); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 228, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__42); - __Pyx_GIVEREF(__pyx_tuple__42); - __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_handlers_payments_yookassa_pay_p, __pyx_n_s_process_enter_custom_amount, 228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_tuple__33 = PyTuple_Pack(3, __pyx_n_s_callback_query, __pyx_n_s_state, __pyx_n_s_builder); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__33); + __Pyx_GIVEREF(__pyx_tuple__33); + __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_handlers_payments_yookassa_pay_p, __pyx_n_s_process_enter_custom_amount, 238, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 238, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":244 + /* "handlers/payments/yookassa_pay.py":254 * * * @router.message(ReplenishBalanceState.entering_custom_amount_yookassa) # <<<<<<<<<<<<<< * async def process_custom_amount_input(callback_query: types.CallbackQuery | types.Message, session: Any): * conn = await asyncpg.connect(DATABASE_URL) */ - __pyx_tuple__43 = PyTuple_Pack(12, __pyx_n_s_callback_query, __pyx_n_s_session, __pyx_n_s_conn, __pyx_n_s_tg_id, __pyx_n_s_user_data, __pyx_n_s_state_type, __pyx_n_s_amount, __pyx_n_s_payment, __pyx_n_s_payment_url, __pyx_n_s_payment_message, __pyx_n_s_confirm_keyboard, __pyx_n_s_e); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 244, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__43); - __Pyx_GIVEREF(__pyx_tuple__43); - __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_handlers_payments_yookassa_pay_p, __pyx_n_s_process_custom_amount_input, 244, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_tuple__34 = PyTuple_Pack(12, __pyx_n_s_callback_query, __pyx_n_s_session, __pyx_n_s_conn, __pyx_n_s_tg_id, __pyx_n_s_user_data, __pyx_n_s_state_type, __pyx_n_s_amount, __pyx_n_s_payment, __pyx_n_s_payment_url, __pyx_n_s_payment_message, __pyx_n_s_confirm_keyboard, __pyx_n_s_e); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__34); + __Pyx_GIVEREF(__pyx_tuple__34); + __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_handlers_payments_yookassa_pay_p, __pyx_n_s_process_custom_amount_input, 254, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 254, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":346 + /* "handlers/payments/yookassa_pay.py":356 * * * async def _send_message(callback_query: types.CallbackQuery | types.Message, text: str, reply_markup=None): # <<<<<<<<<<<<<< * """ .""" * if isinstance(callback_query, types.CallbackQuery): */ - __pyx_tuple__44 = PyTuple_Pack(3, __pyx_n_s_callback_query, __pyx_n_s_text, __pyx_n_s_reply_markup); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 346, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__44); - __Pyx_GIVEREF(__pyx_tuple__44); - __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_handlers_payments_yookassa_pay_p, __pyx_n_s_send_message, 346, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 346, __pyx_L1_error) - __pyx_tuple__45 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 346, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__45); - __Pyx_GIVEREF(__pyx_tuple__45); + __pyx_tuple__35 = PyTuple_Pack(3, __pyx_n_s_callback_query, __pyx_n_s_text, __pyx_n_s_reply_markup); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__35); + __Pyx_GIVEREF(__pyx_tuple__35); + __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_handlers_payments_yookassa_pay_p, __pyx_n_s_send_message, 356, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 356, __pyx_L1_error) + __pyx_tuple__36 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__36); + __Pyx_GIVEREF(__pyx_tuple__36); __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -12813,15 +12807,15 @@ static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct__process_callback_pay_yookassa = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct__process_callback_pay_yookassa_spec, NULL); if (unlikely(!__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct__process_callback_pay_yookassa)) __PYX_ERR(0, 52, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct__process_callback_pay_yookassa_spec, __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct__process_callback_pay_yookassa) < 0) __PYX_ERR(0, 52, __pyx_L1_error) + __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct__process_callback_pay_yookassa = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct__process_callback_pay_yookassa_spec, NULL); if (unlikely(!__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct__process_callback_pay_yookassa)) __PYX_ERR(0, 62, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct__process_callback_pay_yookassa_spec, __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct__process_callback_pay_yookassa) < 0) __PYX_ERR(0, 62, __pyx_L1_error) #else __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct__process_callback_pay_yookassa = &__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct__process_callback_pay_yookassa; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct__process_callback_pay_yookassa) < 0) __PYX_ERR(0, 52, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct__process_callback_pay_yookassa) < 0) __PYX_ERR(0, 62, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct__process_callback_pay_yookassa->tp_print = 0; @@ -12832,15 +12826,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_1_process_amount_selection = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_1_process_amount_selection_spec, NULL); if (unlikely(!__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_1_process_amount_selection)) __PYX_ERR(0, 110, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_1_process_amount_selection_spec, __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_1_process_amount_selection) < 0) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_1_process_amount_selection = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_1_process_amount_selection_spec, NULL); if (unlikely(!__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_1_process_amount_selection)) __PYX_ERR(0, 120, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_1_process_amount_selection_spec, __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_1_process_amount_selection) < 0) __PYX_ERR(0, 120, __pyx_L1_error) #else __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_1_process_amount_selection = &__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_1_process_amount_selection; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_1_process_amount_selection) < 0) __PYX_ERR(0, 110, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_1_process_amount_selection) < 0) __PYX_ERR(0, 120, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_1_process_amount_selection->tp_print = 0; @@ -12851,15 +12845,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_2_yookassa_webhook = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_2_yookassa_webhook_spec, NULL); if (unlikely(!__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_2_yookassa_webhook)) __PYX_ERR(0, 184, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_2_yookassa_webhook_spec, __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_2_yookassa_webhook) < 0) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_2_yookassa_webhook = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_2_yookassa_webhook_spec, NULL); if (unlikely(!__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_2_yookassa_webhook)) __PYX_ERR(0, 194, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_2_yookassa_webhook_spec, __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_2_yookassa_webhook) < 0) __PYX_ERR(0, 194, __pyx_L1_error) #else __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_2_yookassa_webhook = &__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_2_yookassa_webhook; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_2_yookassa_webhook) < 0) __PYX_ERR(0, 184, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_2_yookassa_webhook) < 0) __PYX_ERR(0, 194, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_2_yookassa_webhook->tp_print = 0; @@ -12870,15 +12864,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_3_process_enter_custom_amount = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_3_process_enter_custom_amount_spec, NULL); if (unlikely(!__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_3_process_enter_custom_amount)) __PYX_ERR(0, 228, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_3_process_enter_custom_amount_spec, __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_3_process_enter_custom_amount) < 0) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_3_process_enter_custom_amount = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_3_process_enter_custom_amount_spec, NULL); if (unlikely(!__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_3_process_enter_custom_amount)) __PYX_ERR(0, 238, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_3_process_enter_custom_amount_spec, __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_3_process_enter_custom_amount) < 0) __PYX_ERR(0, 238, __pyx_L1_error) #else __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_3_process_enter_custom_amount = &__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_3_process_enter_custom_amount; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_3_process_enter_custom_amount) < 0) __PYX_ERR(0, 228, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_3_process_enter_custom_amount) < 0) __PYX_ERR(0, 238, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_3_process_enter_custom_amount->tp_print = 0; @@ -12889,15 +12883,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_4_process_custom_amount_input = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_4_process_custom_amount_input_spec, NULL); if (unlikely(!__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_4_process_custom_amount_input)) __PYX_ERR(0, 244, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_4_process_custom_amount_input_spec, __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_4_process_custom_amount_input) < 0) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_4_process_custom_amount_input = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_4_process_custom_amount_input_spec, NULL); if (unlikely(!__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_4_process_custom_amount_input)) __PYX_ERR(0, 254, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_4_process_custom_amount_input_spec, __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_4_process_custom_amount_input) < 0) __PYX_ERR(0, 254, __pyx_L1_error) #else __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_4_process_custom_amount_input = &__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_4_process_custom_amount_input; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_4_process_custom_amount_input) < 0) __PYX_ERR(0, 244, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_4_process_custom_amount_input) < 0) __PYX_ERR(0, 254, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_4_process_custom_amount_input->tp_print = 0; @@ -12908,15 +12902,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_5__send_message = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_5__send_message_spec, NULL); if (unlikely(!__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_5__send_message)) __PYX_ERR(0, 346, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_5__send_message_spec, __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_5__send_message) < 0) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_5__send_message = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_5__send_message_spec, NULL); if (unlikely(!__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_5__send_message)) __PYX_ERR(0, 356, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_5__send_message_spec, __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_5__send_message) < 0) __PYX_ERR(0, 356, __pyx_L1_error) #else __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_5__send_message = &__pyx_type_8handlers_8payments_12yookassa_pay___pyx_scope_struct_5__send_message; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_5__send_message) < 0) __PYX_ERR(0, 346, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_5__send_message) < 0) __PYX_ERR(0, 356, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_8handlers_8payments_12yookassa_pay___pyx_scope_struct_5__send_message->tp_print = 0; @@ -13594,210 +13588,288 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /* "handlers/payments/yookassa_pay.py":30 + * ) + * from handlers.buttons.yookassa import ( + * BACK, # <<<<<<<<<<<<<< + * CUSTOM_SUM, + * DEFAULT_PAYMENT_MESSAGE, + */ + __pyx_t_2 = PyList_New(8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_BACK); + __Pyx_GIVEREF(__pyx_n_s_BACK); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_BACK)) __PYX_ERR(0, 30, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_CUSTOM_SUM); + __Pyx_GIVEREF(__pyx_n_s_CUSTOM_SUM); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_CUSTOM_SUM)) __PYX_ERR(0, 30, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_DEFAULT_PAYMENT_MESSAGE); + __Pyx_GIVEREF(__pyx_n_s_DEFAULT_PAYMENT_MESSAGE); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_DEFAULT_PAYMENT_MESSAGE)) __PYX_ERR(0, 30, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_KEY_CREATION_PAYMENT_MESSAGE); + __Pyx_GIVEREF(__pyx_n_s_KEY_CREATION_PAYMENT_MESSAGE); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_KEY_CREATION_PAYMENT_MESSAGE)) __PYX_ERR(0, 30, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_KEY_RENEWAL_PAYMENT_MESSAGE); + __Pyx_GIVEREF(__pyx_n_s_KEY_RENEWAL_PAYMENT_MESSAGE); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_KEY_RENEWAL_PAYMENT_MESSAGE)) __PYX_ERR(0, 30, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_PAY); + __Pyx_GIVEREF(__pyx_n_s_PAY); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_PAY)) __PYX_ERR(0, 30, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_PAY_2); + __Pyx_GIVEREF(__pyx_n_s_PAY_2); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_s_PAY_2)) __PYX_ERR(0, 30, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_PROFILE); + __Pyx_GIVEREF(__pyx_n_s_PROFILE); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 7, __pyx_n_s_PROFILE)) __PYX_ERR(0, 30, __pyx_L1_error); + /* "handlers/payments/yookassa_pay.py":29 * update_balance, * ) + * from handlers.buttons.yookassa import ( # <<<<<<<<<<<<<< + * BACK, + * CUSTOM_SUM, + */ + __pyx_t_3 = __Pyx_Import(__pyx_n_s_handlers_buttons_yookassa, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_BACK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_BACK, __pyx_t_2) < 0) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_CUSTOM_SUM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUSTOM_SUM, __pyx_t_2) < 0) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_DEFAULT_PAYMENT_MESSAGE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_PAYMENT_MESSAGE, __pyx_t_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_KEY_CREATION_PAYMENT_MESSAGE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_CREATION_PAYMENT_MESSAGE, __pyx_t_2) < 0) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_KEY_RENEWAL_PAYMENT_MESSAGE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_RENEWAL_PAYMENT_MESSAGE, __pyx_t_2) < 0) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PAY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_PAY, __pyx_t_2) < 0) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PAY_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_PAY_2, __pyx_t_2) < 0) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PROFILE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_PROFILE, __pyx_t_2) < 0) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "handlers/payments/yookassa_pay.py":39 + * PROFILE, + * ) * from handlers.payments.gift import YOOKASSA_HASH # <<<<<<<<<<<<<< * from handlers.payments.utils import send_payment_success_notification * from handlers.texts import PAYMENT_OPTIONS */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_YOOKASSA_HASH); __Pyx_GIVEREF(__pyx_n_s_YOOKASSA_HASH); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_YOOKASSA_HASH)) __PYX_ERR(0, 29, __pyx_L1_error); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_handlers_payments_gift, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_YOOKASSA_HASH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_YOOKASSA_HASH)) __PYX_ERR(0, 39, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_handlers_payments_gift, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_YOOKASSA_HASH, __pyx_t_2) < 0) __PYX_ERR(0, 29, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_YOOKASSA_HASH); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_YOOKASSA_HASH, __pyx_t_3) < 0) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "handlers/payments/yookassa_pay.py":30 + /* "handlers/payments/yookassa_pay.py":40 * ) * from handlers.payments.gift import YOOKASSA_HASH * from handlers.payments.utils import send_payment_success_notification # <<<<<<<<<<<<<< * from handlers.texts import PAYMENT_OPTIONS * from logger import logger */ - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_send_payment_success_notificatio); __Pyx_GIVEREF(__pyx_n_s_send_payment_success_notificatio); - if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_send_payment_success_notificatio)) __PYX_ERR(0, 30, __pyx_L1_error); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_handlers_payments_utils, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_send_payment_success_notificatio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_send_payment_success_notificatio)) __PYX_ERR(0, 40, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_handlers_payments_utils, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_send_payment_success_notificatio, __pyx_t_3) < 0) __PYX_ERR(0, 30, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_send_payment_success_notificatio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_send_payment_success_notificatio, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":31 + /* "handlers/payments/yookassa_pay.py":41 * from handlers.payments.gift import YOOKASSA_HASH * from handlers.payments.utils import send_payment_success_notification * from handlers.texts import PAYMENT_OPTIONS # <<<<<<<<<<<<<< * from logger import logger * */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_PAYMENT_OPTIONS); __Pyx_GIVEREF(__pyx_n_s_PAYMENT_OPTIONS); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PAYMENT_OPTIONS)) __PYX_ERR(0, 31, __pyx_L1_error); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_handlers_texts, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PAYMENT_OPTIONS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_PAYMENT_OPTIONS)) __PYX_ERR(0, 41, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_handlers_texts, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_PAYMENT_OPTIONS, __pyx_t_2) < 0) __PYX_ERR(0, 31, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_PAYMENT_OPTIONS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_PAYMENT_OPTIONS, __pyx_t_3) < 0) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "handlers/payments/yookassa_pay.py":32 + /* "handlers/payments/yookassa_pay.py":42 * from handlers.payments.utils import send_payment_success_notification * from handlers.texts import PAYMENT_OPTIONS * from logger import logger # <<<<<<<<<<<<<< * * router = Router() */ - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_logger); __Pyx_GIVEREF(__pyx_n_s_logger); - if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_logger)) __PYX_ERR(0, 32, __pyx_L1_error); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_logger, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_logger)) __PYX_ERR(0, 42, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_logger, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_logger, __pyx_t_3) < 0) __PYX_ERR(0, 32, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_logger, __pyx_t_2) < 0) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":34 + /* "handlers/payments/yookassa_pay.py":44 * from logger import logger * * router = Router() # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Router); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Router); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_router, __pyx_t_3) < 0) __PYX_ERR(0, 34, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_router, __pyx_t_2) < 0) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "handlers/payments/yookassa_pay.py":37 + /* "handlers/payments/yookassa_pay.py":47 * * * MAIN_SECRET = "PIRAT0ETO7DLYA9TEBYA" # <<<<<<<<<<<<<< * * if YOOKASSA_ENABLE: */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAIN_SECRET, __pyx_n_u_PIRAT0ETO7DLYA9TEBYA) < 0) __PYX_ERR(0, 37, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAIN_SECRET, __pyx_n_u_PIRAT0ETO7DLYA9TEBYA) < 0) __PYX_ERR(0, 47, __pyx_L1_error) - /* "handlers/payments/yookassa_pay.py":39 + /* "handlers/payments/yookassa_pay.py":49 * MAIN_SECRET = "PIRAT0ETO7DLYA9TEBYA" * * if YOOKASSA_ENABLE: # <<<<<<<<<<<<<< * Configuration.account_id = YOOKASSA_SHOP_ID * Configuration.secret_key = YOOKASSA_SECRET_KEY */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_YOOKASSA_ENABLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 39, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 39, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_YOOKASSA_ENABLE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - /* "handlers/payments/yookassa_pay.py":40 + /* "handlers/payments/yookassa_pay.py":50 * * if YOOKASSA_ENABLE: * Configuration.account_id = YOOKASSA_SHOP_ID # <<<<<<<<<<<<<< * Configuration.secret_key = YOOKASSA_SECRET_KEY * logger.debug(f"Account ID: {YOOKASSA_SHOP_ID}") */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_YOOKASSA_SHOP_ID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Configuration); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_YOOKASSA_SHOP_ID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_account_id, __pyx_t_3) < 0) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Configuration); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_PyObject_SetAttrStr(__pyx_t_3, __pyx_n_s_account_id, __pyx_t_2) < 0) __PYX_ERR(0, 50, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":41 + /* "handlers/payments/yookassa_pay.py":51 * if YOOKASSA_ENABLE: * Configuration.account_id = YOOKASSA_SHOP_ID * Configuration.secret_key = YOOKASSA_SECRET_KEY # <<<<<<<<<<<<<< * logger.debug(f"Account ID: {YOOKASSA_SHOP_ID}") * logger.debug(f"Secret Key: {YOOKASSA_SECRET_KEY}") */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_YOOKASSA_SECRET_KEY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Configuration); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_YOOKASSA_SECRET_KEY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_PyObject_SetAttrStr(__pyx_t_3, __pyx_n_s_secret_key, __pyx_t_2) < 0) __PYX_ERR(0, 41, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Configuration); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_secret_key, __pyx_t_3) < 0) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "handlers/payments/yookassa_pay.py":42 + /* "handlers/payments/yookassa_pay.py":52 * Configuration.account_id = YOOKASSA_SHOP_ID * Configuration.secret_key = YOOKASSA_SECRET_KEY * logger.debug(f"Account ID: {YOOKASSA_SHOP_ID}") # <<<<<<<<<<<<<< * logger.debug(f"Secret Key: {YOOKASSA_SECRET_KEY}") * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_YOOKASSA_SHOP_ID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 42, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Account_ID, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_YOOKASSA_SHOP_ID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Account_ID, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "handlers/payments/yookassa_pay.py":43 + /* "handlers/payments/yookassa_pay.py":53 * Configuration.secret_key = YOOKASSA_SECRET_KEY * logger.debug(f"Account ID: {YOOKASSA_SHOP_ID}") * logger.debug(f"Secret Key: {YOOKASSA_SECRET_KEY}") # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_YOOKASSA_SECRET_KEY); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_YOOKASSA_SECRET_KEY); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Secret_Key, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Secret_Key, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 43, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":39 + /* "handlers/payments/yookassa_pay.py":49 * MAIN_SECRET = "PIRAT0ETO7DLYA9TEBYA" * * if YOOKASSA_ENABLE: # <<<<<<<<<<<<<< @@ -13806,39 +13878,39 @@ if (!__Pyx_RefNanny) { */ } - /* "handlers/payments/yookassa_pay.py":46 + /* "handlers/payments/yookassa_pay.py":56 * * * class ReplenishBalanceState(StatesGroup): # <<<<<<<<<<<<<< * choosing_amount_yookassa = State() * waiting_for_payment_confirmation_yookassa = State() */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_StatesGroup); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 46, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error); - __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_StatesGroup); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_ReplenishBalanceState, __pyx_n_s_ReplenishBalanceState, (PyObject *) NULL, __pyx_n_s_handlers_payments_yookassa_pay, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_ReplenishBalanceState, __pyx_n_s_ReplenishBalanceState, (PyObject *) NULL, __pyx_n_s_handlers_payments_yookassa_pay, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__pyx_t_2 != __pyx_t_5) { - if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + if (__pyx_t_3 != __pyx_t_5) { + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 56, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "handlers/payments/yookassa_pay.py":47 + /* "handlers/payments/yookassa_pay.py":57 * * class ReplenishBalanceState(StatesGroup): * choosing_amount_yookassa = State() # <<<<<<<<<<<<<< * waiting_for_payment_confirmation_yookassa = State() * entering_custom_amount_yookassa = State() */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_State); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_State); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -13858,21 +13930,21 @@ if (!__Pyx_RefNanny) { PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 47, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_choosing_amount_yookassa, __pyx_t_5) < 0) __PYX_ERR(0, 47, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_choosing_amount_yookassa, __pyx_t_5) < 0) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "handlers/payments/yookassa_pay.py":48 + /* "handlers/payments/yookassa_pay.py":58 * class ReplenishBalanceState(StatesGroup): * choosing_amount_yookassa = State() * waiting_for_payment_confirmation_yookassa = State() # <<<<<<<<<<<<<< * entering_custom_amount_yookassa = State() * */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_State); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_State); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -13892,21 +13964,21 @@ if (!__Pyx_RefNanny) { PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_waiting_for_payment_confirmation, __pyx_t_5) < 0) __PYX_ERR(0, 48, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_waiting_for_payment_confirmation, __pyx_t_5) < 0) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "handlers/payments/yookassa_pay.py":49 + /* "handlers/payments/yookassa_pay.py":59 * choosing_amount_yookassa = State() * waiting_for_payment_confirmation_yookassa = State() * entering_custom_amount_yookassa = State() # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_State); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_State); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -13926,223 +13998,223 @@ if (!__Pyx_RefNanny) { PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 49, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_entering_custom_amount_yookassa, __pyx_t_5) < 0) __PYX_ERR(0, 49, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_entering_custom_amount_yookassa, __pyx_t_5) < 0) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "handlers/payments/yookassa_pay.py":46 + /* "handlers/payments/yookassa_pay.py":56 * * * class ReplenishBalanceState(StatesGroup): # <<<<<<<<<<<<<< * choosing_amount_yookassa = State() * waiting_for_payment_confirmation_yookassa = State() */ - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_ReplenishBalanceState, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ReplenishBalanceState, __pyx_t_3, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplenishBalanceState, __pyx_t_5) < 0) __PYX_ERR(0, 46, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplenishBalanceState, __pyx_t_5) < 0) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":52 + /* "handlers/payments/yookassa_pay.py":62 * * * @router.callback_query(F.data == "pay_yookassa") # <<<<<<<<<<<<<< * async def process_callback_pay_yookassa( * callback_query: types.CallbackQuery, state: FSMContext, session: Any */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_router); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_callback_query); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_router); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_F); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_callback_query); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_n_u_pay_yookassa, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_F); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_callback_query, __pyx_kp_s_types_CallbackQuery) < 0) __PYX_ERR(0, 52, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_state, __pyx_n_s_FSMContext) < 0) __PYX_ERR(0, 52, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_session, __pyx_n_s_Any) < 0) __PYX_ERR(0, 52, __pyx_L1_error) - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_8handlers_8payments_12yookassa_pay_1process_callback_pay_yookassa, __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_process_callback_pay_yookassa, NULL, __pyx_n_s_handlers_payments_yookassa_pay, __pyx_d, ((PyObject *)__pyx_codeobj_)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_n_u_pay_yookassa, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_process_callback_pay_yookassa, __pyx_t_2) < 0) __PYX_ERR(0, 52, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_callback_query, __pyx_kp_s_types_CallbackQuery) < 0) __PYX_ERR(0, 62, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_state, __pyx_n_s_FSMContext) < 0) __PYX_ERR(0, 62, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_session, __pyx_n_s_Any) < 0) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8handlers_8payments_12yookassa_pay_1process_callback_pay_yookassa, __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_process_callback_pay_yookassa, NULL, __pyx_n_s_handlers_payments_yookassa_pay, __pyx_d, ((PyObject *)__pyx_codeobj_)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_process_callback_pay_yookassa, __pyx_t_3) < 0) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":110 + /* "handlers/payments/yookassa_pay.py":120 * * * @router.callback_query(F.data.startswith("yookassa_amount|")) # <<<<<<<<<<<<<< * async def process_amount_selection( * callback_query: types.CallbackQuery, state: FSMContext */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_router); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_callback_query); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_router); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_F); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_callback_query); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_callback_query, __pyx_kp_s_types_CallbackQuery) < 0) __PYX_ERR(0, 110, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_state, __pyx_n_s_FSMContext) < 0) __PYX_ERR(0, 110, __pyx_L1_error) - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_8handlers_8payments_12yookassa_pay_4process_amount_selection, __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_process_amount_selection, NULL, __pyx_n_s_handlers_payments_yookassa_pay, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_F); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_6); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_process_amount_selection, __pyx_t_6) < 0) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_callback_query, __pyx_kp_s_types_CallbackQuery) < 0) __PYX_ERR(0, 120, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_state, __pyx_n_s_FSMContext) < 0) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8handlers_8payments_12yookassa_pay_4process_amount_selection, __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_process_amount_selection, NULL, __pyx_n_s_handlers_payments_yookassa_pay, __pyx_d, ((PyObject *)__pyx_codeobj__4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_process_amount_selection, __pyx_t_6) < 0) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "handlers/payments/yookassa_pay.py":184 + /* "handlers/payments/yookassa_pay.py":194 * * * async def yookassa_webhook(request): # <<<<<<<<<<<<<< * """ * Yookassa . */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_8handlers_8payments_12yookassa_pay_7yookassa_webhook, __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_yookassa_webhook, NULL, __pyx_n_s_handlers_payments_yookassa_pay, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_8handlers_8payments_12yookassa_pay_7yookassa_webhook, __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_yookassa_webhook, NULL, __pyx_n_s_handlers_payments_yookassa_pay, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_yookassa_webhook, __pyx_t_6) < 0) __PYX_ERR(0, 184, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_yookassa_webhook, __pyx_t_6) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "handlers/payments/yookassa_pay.py":228 + /* "handlers/payments/yookassa_pay.py":238 * * * @router.callback_query(F.data == "enter_custom_amount_yookassa") # <<<<<<<<<<<<<< * async def process_enter_custom_amount( * callback_query: types.CallbackQuery, state: FSMContext */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_router); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_router); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_callback_query); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_F); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 228, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_callback_query); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_n_u_enter_custom_amount_yookassa, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 228, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_F); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_callback_query, __pyx_kp_s_types_CallbackQuery) < 0) __PYX_ERR(0, 228, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_state, __pyx_n_s_FSMContext) < 0) __PYX_ERR(0, 228, __pyx_L1_error) - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_8handlers_8payments_12yookassa_pay_10process_enter_custom_amount, __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_process_enter_custom_amount, NULL, __pyx_n_s_handlers_payments_yookassa_pay, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 228, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_n_u_enter_custom_amount_yookassa, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_process_enter_custom_amount, __pyx_t_6) < 0) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_callback_query, __pyx_kp_s_types_CallbackQuery) < 0) __PYX_ERR(0, 238, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_state, __pyx_n_s_FSMContext) < 0) __PYX_ERR(0, 238, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8handlers_8payments_12yookassa_pay_10process_enter_custom_amount, __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_process_enter_custom_amount, NULL, __pyx_n_s_handlers_payments_yookassa_pay, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_process_enter_custom_amount, __pyx_t_6) < 0) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "handlers/payments/yookassa_pay.py":244 + /* "handlers/payments/yookassa_pay.py":254 * * * @router.message(ReplenishBalanceState.entering_custom_amount_yookassa) # <<<<<<<<<<<<<< * async def process_custom_amount_input(callback_query: types.CallbackQuery | types.Message, session: Any): * conn = await asyncpg.connect(DATABASE_URL) */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_router); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_router); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ReplenishBalanceState); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_entering_custom_amount_yookassa); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ReplenishBalanceState); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_entering_custom_amount_yookassa); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_callback_query, __pyx_kp_s_types_CallbackQuery_types_Messag) < 0) __PYX_ERR(0, 244, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_session, __pyx_n_s_Any) < 0) __PYX_ERR(0, 244, __pyx_L1_error) - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_8handlers_8payments_12yookassa_pay_13process_custom_amount_input, __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_process_custom_amount_input, NULL, __pyx_n_s_handlers_payments_yookassa_pay, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_callback_query, __pyx_kp_s_types_CallbackQuery_types_Messag) < 0) __PYX_ERR(0, 254, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_session, __pyx_n_s_Any) < 0) __PYX_ERR(0, 254, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8handlers_8payments_12yookassa_pay_13process_custom_amount_input, __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_process_custom_amount_input, NULL, __pyx_n_s_handlers_payments_yookassa_pay, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_process_custom_amount_input, __pyx_t_2) < 0) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_process_custom_amount_input, __pyx_t_3) < 0) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "handlers/payments/yookassa_pay.py":346 + /* "handlers/payments/yookassa_pay.py":356 * * * async def _send_message(callback_query: types.CallbackQuery | types.Message, text: str, reply_markup=None): # <<<<<<<<<<<<<< * """ .""" * if isinstance(callback_query, types.CallbackQuery): */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_callback_query, __pyx_kp_s_types_CallbackQuery_types_Messag) < 0) __PYX_ERR(0, 346, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_text, __pyx_n_s_str) < 0) __PYX_ERR(0, 346, __pyx_L1_error) - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_8handlers_8payments_12yookassa_pay_16_send_message, __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_send_message, NULL, __pyx_n_s_handlers_payments_yookassa_pay, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__45); - __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_send_message, __pyx_t_3) < 0) __PYX_ERR(0, 346, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_callback_query, __pyx_kp_s_types_CallbackQuery_types_Messag) < 0) __PYX_ERR(0, 356, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_n_s_str) < 0) __PYX_ERR(0, 356, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8handlers_8payments_12yookassa_pay_16_send_message, __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_send_message, NULL, __pyx_n_s_handlers_payments_yookassa_pay, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__36); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_send_message, __pyx_t_2) < 0) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "handlers/payments/yookassa_pay.py":1 * import uuid # <<<<<<<<<<<<<< * from typing import Any * */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*--- Wrapped vars code ---*/ @@ -18357,7 +18429,7 @@ static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject * #endif static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { #if PY_MAJOR_VERSION < 3 - PyObject *module, *from_list, *star = __pyx_n_s__36; + PyObject *module, *from_list, *star = __pyx_n_s__27; CYTHON_UNUSED_VAR(parts_tuple); from_list = PyList_New(1); if (unlikely(!from_list)) @@ -18420,7 +18492,7 @@ static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) if (unlikely(!module_name_str)) { goto modbad; } module_name = PyUnicode_FromString(module_name_str); if (unlikely(!module_name)) { goto modbad; } - module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__37); + module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__28); if (unlikely(!module_dot)) { goto modbad; } full_name = PyUnicode_Concat(module_dot, name); if (unlikely(!full_name)) { goto modbad; } @@ -20285,7 +20357,7 @@ __Pyx_PyType_GetName(PyTypeObject* tp) if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) { PyErr_Clear(); Py_XDECREF(name); - name = __Pyx_NewRef(__pyx_n_s__46); + name = __Pyx_NewRef(__pyx_n_s__37); } return name; } diff --git a/handlers/payments/yookassa_pay.cpython-312-x86_64-linux-gnu.so b/handlers/payments/yookassa_pay.cpython-312-x86_64-linux-gnu.so index 4aa687b2..97ae8d3b 100755 Binary files a/handlers/payments/yookassa_pay.cpython-312-x86_64-linux-gnu.so and b/handlers/payments/yookassa_pay.cpython-312-x86_64-linux-gnu.so differ