forked from FOSS/AutoShop-Djimbo
refactor: remove Yoomoney payment integration
This commit is contained in:
@@ -5,10 +5,21 @@ from aiogram import Router, Bot, F
|
||||
from aiogram.filters import StateFilter
|
||||
from aiogram.types import CallbackQuery, Message
|
||||
|
||||
from tgbot.database import Positionx, Userx, Categoryx, Itemx, Paymentsx, Purchasesx, Settingsx
|
||||
from tgbot.database import (
|
||||
Positionx,
|
||||
Userx,
|
||||
Categoryx,
|
||||
Itemx,
|
||||
Paymentsx,
|
||||
Purchasesx,
|
||||
Settingsx,
|
||||
)
|
||||
from tgbot.keyboards.inline_user import refill_method_buy_finl
|
||||
from tgbot.keyboards.inline_user_page import *
|
||||
from tgbot.keyboards.inline_user_products import products_buy_confirm_finl, products_return_finl
|
||||
from tgbot.keyboards.inline_user_products import (
|
||||
products_buy_confirm_finl,
|
||||
products_return_finl,
|
||||
)
|
||||
from tgbot.keyboards.reply_main import menu_frep
|
||||
from tgbot.utils.const_functions import ded, del_message, convert_date, send_admins
|
||||
from tgbot.utils.misc.bot_models import FSM, ARS
|
||||
@@ -20,7 +31,9 @@ router = Router(name=__name__)
|
||||
|
||||
# Страницы выбора категории для покупки товара
|
||||
@router.callback_query(F.data.startswith("buy_category_swipe:"))
|
||||
async def user_buy_category_swipe(call: CallbackQuery, bot: Bot, state: FSM, arSession: ARS):
|
||||
async def user_buy_category_swipe(
|
||||
call: CallbackQuery, bot: Bot, state: FSM, arSession: ARS
|
||||
):
|
||||
remover = int(call.data.split(":")[1])
|
||||
|
||||
await call.message.edit_text(
|
||||
@@ -31,7 +44,9 @@ async def user_buy_category_swipe(call: CallbackQuery, bot: Bot, state: FSM, arS
|
||||
|
||||
# Открытие категории с выбором позиции для покупки товара
|
||||
@router.callback_query(F.data.startswith("buy_category_open:"))
|
||||
async def user_buy_category_open(call: CallbackQuery, bot: Bot, state: FSM, arSession: ARS):
|
||||
async def user_buy_category_open(
|
||||
call: CallbackQuery, bot: Bot, state: FSM, arSession: ARS
|
||||
):
|
||||
category_id = int(call.data.split(":")[1])
|
||||
remover = int(call.data.split(":")[2])
|
||||
|
||||
@@ -55,7 +70,9 @@ async def user_buy_category_open(call: CallbackQuery, bot: Bot, state: FSM, arSe
|
||||
|
||||
# Страницы выбора позиции для покупки товара
|
||||
@router.callback_query(F.data.startswith("buy_position_swipe:"))
|
||||
async def user_buy_position_swipe(call: CallbackQuery, bot: Bot, state: FSM, arSession: ARS):
|
||||
async def user_buy_position_swipe(
|
||||
call: CallbackQuery, bot: Bot, state: FSM, arSession: ARS
|
||||
):
|
||||
category_id = int(call.data.split(":")[1])
|
||||
remover = int(call.data.split(":")[2])
|
||||
|
||||
@@ -70,7 +87,9 @@ async def user_buy_position_swipe(call: CallbackQuery, bot: Bot, state: FSM, arS
|
||||
|
||||
# Открытие позиции для покупки товара
|
||||
@router.callback_query(F.data.startswith("buy_position_open:"))
|
||||
async def user_buy_position_open(call: CallbackQuery, bot: Bot, state: FSM, arSession: ARS):
|
||||
async def user_buy_position_open(
|
||||
call: CallbackQuery, bot: Bot, state: FSM, arSession: ARS
|
||||
):
|
||||
position_id = int(call.data.split(":")[1])
|
||||
remover = int(call.data.split(":")[2])
|
||||
|
||||
@@ -94,7 +113,7 @@ async def user_buy_open(call: CallbackQuery, bot: Bot, state: FSM, arSession: AR
|
||||
|
||||
# Проверка, имеется ли на балансе пользователя достаточно средств
|
||||
if get_user.user_balance < get_position.position_price:
|
||||
if get_payments.status_cryptobot == "True" or get_payments.status_yoomoney == "True":
|
||||
if get_payments.status_cryptobot == "True":
|
||||
await call.message.answer(
|
||||
"<b>❗ На вашем счёте недостаточно средств</b>\n"
|
||||
"💰 Выберите способ пополнения баланса",
|
||||
@@ -103,7 +122,9 @@ async def user_buy_open(call: CallbackQuery, bot: Bot, state: FSM, arSession: AR
|
||||
|
||||
return await call.answer(cache_time=5)
|
||||
else:
|
||||
return await call.answer("❗ У вас недостаточно средств. Пополните баланс", True)
|
||||
return await call.answer(
|
||||
"❗ У вас недостаточно средств. Пополните баланс", True
|
||||
)
|
||||
|
||||
if len(get_items) < 1:
|
||||
return await call.answer("❗ Товаров нет в наличии", True)
|
||||
@@ -133,7 +154,9 @@ async def user_buy_open(call: CallbackQuery, bot: Bot, state: FSM, arSession: AR
|
||||
▪️ Количество: <code>1шт</code>
|
||||
▪️ Сумма к покупке: <code>{get_position.position_price}₽</code>
|
||||
"""),
|
||||
reply_markup=products_buy_confirm_finl(position_id, get_position.category_id, 1),
|
||||
reply_markup=products_buy_confirm_finl(
|
||||
position_id, get_position.category_id, 1
|
||||
),
|
||||
)
|
||||
else:
|
||||
await state.update_data(here_buy_position_id=position_id)
|
||||
@@ -155,7 +178,7 @@ async def user_buy_open(call: CallbackQuery, bot: Bot, state: FSM, arSession: AR
|
||||
# Принятие количества товаров для покупки
|
||||
@router.message(F.text, StateFilter("here_item_count"))
|
||||
async def user_buy_count(message: Message, bot: Bot, state: FSM, arSession: ARS):
|
||||
position_id = (await state.get_data())['here_buy_position_id']
|
||||
position_id = (await state.get_data())["here_buy_position_id"]
|
||||
|
||||
get_position = await Positionx().get_required(position_id=position_id)
|
||||
get_user = await Userx().get_required(user_id=message.from_user.id)
|
||||
@@ -191,7 +214,9 @@ async def user_buy_count(message: Message, bot: Bot, state: FSM, arSession: ARS)
|
||||
# Если товаров нет в наличии
|
||||
if len(get_items) < 1:
|
||||
await state.clear()
|
||||
return await message.answer("<b>🎁 Товар который вы хотели купить, закончился</b>")
|
||||
return await message.answer(
|
||||
"<b>🎁 Товар который вы хотели купить, закончился</b>"
|
||||
)
|
||||
|
||||
# Если введено кол-во товаров меньше 1 или меньше кол-ва имеющегося в наличии
|
||||
if get_count < 1 or get_count > len(get_items):
|
||||
@@ -217,7 +242,9 @@ async def user_buy_count(message: Message, bot: Bot, state: FSM, arSession: ARS)
|
||||
▪️ Количество: <code>{get_count}шт</code>
|
||||
▪️ Сумма к покупке: <code>{amount_pay}₽</code>
|
||||
"""),
|
||||
reply_markup=products_buy_confirm_finl(position_id, get_position.category_id, get_count),
|
||||
reply_markup=products_buy_confirm_finl(
|
||||
position_id, get_position.category_id, get_count
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@@ -240,9 +267,13 @@ async def user_buy_confirm(call: CallbackQuery, bot: Bot, state: FSM, arSession:
|
||||
elif purchase_result == "POSITION_NOT_FOUND":
|
||||
return await call.message.edit_text("<b>❌ Позиция не была найдена</b>")
|
||||
elif purchase_result == "NOT_ENOUGH_ITEMS":
|
||||
return await call.message.edit_text("<b>❌ В наличии недостаточно товаров. Попробуйте другое кол-во</b>")
|
||||
return await call.message.edit_text(
|
||||
"<b>❌ В наличии недостаточно товаров. Попробуйте другое кол-во</b>"
|
||||
)
|
||||
elif purchase_result == "NOT_ENOUGH_BALANCE":
|
||||
return await call.message.edit_text("<b>❌ На вашем балансе недостаточно средств</b>")
|
||||
return await call.message.edit_text(
|
||||
"<b>❌ На вашем балансе недостаточно средств</b>"
|
||||
)
|
||||
|
||||
get_user = await Userx().get_required(user_id=call.from_user.id)
|
||||
get_settings = await Settingsx().get()
|
||||
@@ -272,5 +303,5 @@ async def user_buy_confirm(call: CallbackQuery, bot: Bot, state: FSM, arSession:
|
||||
▪️ Пользователь: <b>@{get_user.user_login}</b> | <a href='tg://user?id={get_user.user_id}'>{get_user.user_name}</a> | <code>{get_user.user_id}</code>
|
||||
▪️ Товар: <code>{purchase_result.position_name} | {purchase_result.purchase_count}шт | {purchase_result.purchase_price}₽</code>
|
||||
▪️ Чек: <code>#{purchase_result.receipt}</code>
|
||||
""")
|
||||
"""),
|
||||
)
|
||||
|
||||
@@ -9,7 +9,6 @@ from tgbot.database import Paymentsx, Refillx, Userx, Settingsx
|
||||
from tgbot.keyboards.inline_user import refill_bill_finl, refill_method_finl
|
||||
from tgbot.services.api_cryptobot import CryptobotAPI
|
||||
from tgbot.services.api_stars import StarsAPI
|
||||
from tgbot.services.api_yoomoney import YoomoneyAPI
|
||||
from tgbot.utils.const_functions import is_number, to_number, gen_id, ded
|
||||
from tgbot.utils.misc.bot_logging import bot_logger
|
||||
from tgbot.utils.misc.bot_models import FSM, ARS
|
||||
@@ -26,9 +25,8 @@ async def refill_method_list(call: CallbackQuery, bot: Bot, state: FSM, arSessio
|
||||
get_payments = await Paymentsx().get()
|
||||
|
||||
if (
|
||||
get_payments.status_cryptobot == "False" and
|
||||
get_payments.status_yoomoney == "False" and
|
||||
get_payments.status_stars == "False"
|
||||
get_payments.status_cryptobot == "False"
|
||||
and get_payments.status_stars == "False"
|
||||
):
|
||||
return await call.answer("❗️ Пополнения временно недоступны", True)
|
||||
|
||||
@@ -40,17 +38,21 @@ async def refill_method_list(call: CallbackQuery, bot: Bot, state: FSM, arSessio
|
||||
|
||||
# Выбор способа пополнения
|
||||
@router.callback_query(F.data.startswith("user_refill_method:"))
|
||||
async def refill_method_select(call: CallbackQuery, bot: Bot, state: FSM, arSession: ARS):
|
||||
async def refill_method_select(
|
||||
call: CallbackQuery, bot: Bot, state: FSM, arSession: ARS
|
||||
):
|
||||
refill_method = call.data.split(":")[1]
|
||||
|
||||
get_payments = await Paymentsx().get()
|
||||
|
||||
if refill_method == "Cryptobot" and get_payments.status_cryptobot == "False":
|
||||
return await call.answer("❌ Пополнение данным способом временно недоступно", True)
|
||||
elif refill_method == "Yoomoney" and get_payments.status_yoomoney == "False":
|
||||
return await call.answer("❌ Пополнение данным способом временно недоступно", True)
|
||||
return await call.answer(
|
||||
"❌ Пополнение данным способом временно недоступно", True
|
||||
)
|
||||
elif refill_method == "Stars" and get_payments.status_stars == "False":
|
||||
return await call.answer("❌ Пополнение данным способом временно недоступно", True)
|
||||
return await call.answer(
|
||||
"❌ Пополнение данным способом временно недоступно", True
|
||||
)
|
||||
|
||||
await state.update_data(here_refill_method=refill_method)
|
||||
|
||||
@@ -83,7 +85,7 @@ async def refill_amount_get(message: Message, bot: Bot, state: FSM, arSession: A
|
||||
cache_message = await message.answer("<b>♻️ Подождите, платёж генерируется..</b>")
|
||||
|
||||
refill_amount = to_number(message.text)
|
||||
refill_method = (await state.get_data())['here_refill_method']
|
||||
refill_method = (await state.get_data())["here_refill_method"]
|
||||
await state.clear()
|
||||
|
||||
# Генерация платежа
|
||||
@@ -95,14 +97,7 @@ async def refill_amount_get(message: Message, bot: Bot, state: FSM, arSession: A
|
||||
update=cache_message,
|
||||
)
|
||||
).bill(refill_amount)
|
||||
elif refill_method == "Yoomoney":
|
||||
bill_message, bill_link, bill_receipt = await (
|
||||
await YoomoneyAPI.connect(
|
||||
bot=bot,
|
||||
arSession=arSession,
|
||||
update=cache_message,
|
||||
)
|
||||
).bill(refill_amount)
|
||||
|
||||
elif refill_method == "Stars":
|
||||
bill_message, bill_link, bill_receipt = await (
|
||||
await StarsAPI.connect(
|
||||
@@ -130,48 +125,13 @@ async def refill_amount_get(message: Message, bot: Bot, state: FSM, arSession: A
|
||||
|
||||
################################################################################
|
||||
############################### ПРОВЕРКА ПЛАТЕЖЕЙ ##############################
|
||||
# Проверка оплаты - ЮMoney
|
||||
@router.callback_query(F.data.startswith('Pay:Yoomoney'))
|
||||
async def refill_check_yoomoney(call: CallbackQuery, bot: Bot, state: FSM, arSession: ARS):
|
||||
pay_method = call.data.split(":")[1]
|
||||
pay_receipt = call.data.split(":")[2]
|
||||
|
||||
pay_status, pay_amount = await (
|
||||
await YoomoneyAPI.connect(
|
||||
bot=bot,
|
||||
arSession=arSession,
|
||||
update=call,
|
||||
)
|
||||
).bill_check(pay_receipt)
|
||||
|
||||
if pay_status == 0:
|
||||
refill_status = await refill_success(
|
||||
bot=bot,
|
||||
call=call,
|
||||
pay_method=pay_method,
|
||||
pay_amount=pay_amount,
|
||||
pay_receipt=int(pay_receipt),
|
||||
pay_comment=pay_receipt,
|
||||
)
|
||||
|
||||
if refill_status == "ALREADY":
|
||||
await call.answer("❗ Ваше пополнение уже зачислено.", True, cache_time=60)
|
||||
await delete_refill_message(bot, call.message.chat.id, call.message.message_id)
|
||||
elif refill_status == "USER_NOT_FOUND":
|
||||
await call.answer("❗ Пользователь не найден. Напишите в поддержку.", True, cache_time=30)
|
||||
elif pay_status == 1:
|
||||
await call.answer("❗️ Не удалось проверить платёж. Попробуйте позже", True, cache_time=30)
|
||||
elif pay_status == 2:
|
||||
await call.answer("❗️ Оплата не была найдена. Попробуйте позже", True, cache_time=5)
|
||||
elif pay_status == 3:
|
||||
await call.answer("❗️ Оплата была произведена не в рублях", True, cache_time=5)
|
||||
else:
|
||||
await call.answer(f"❗ Неизвестная ошибка {pay_status}. Обратитесь в поддержку.", True, cache_time=5)
|
||||
|
||||
|
||||
# Проверка оплаты - Cryptobot
|
||||
@router.callback_query(F.data.startswith('Pay:Cryptobot'))
|
||||
async def refill_check_cryptobot(call: CallbackQuery, bot: Bot, state: FSM, arSession: ARS):
|
||||
@router.callback_query(F.data.startswith("Pay:Cryptobot"))
|
||||
async def refill_check_cryptobot(
|
||||
call: CallbackQuery, bot: Bot, state: FSM, arSession: ARS
|
||||
):
|
||||
pay_method = call.data.split(":")[1]
|
||||
pay_comment = call.data.split(":")[2]
|
||||
|
||||
@@ -194,22 +154,34 @@ async def refill_check_cryptobot(call: CallbackQuery, bot: Bot, state: FSM, arSe
|
||||
|
||||
if refill_status == "ALREADY":
|
||||
await call.answer("❗ Ваше пополнение уже зачислено.", True, cache_time=60)
|
||||
await delete_refill_message(bot, call.message.chat.id, call.message.message_id)
|
||||
await delete_refill_message(
|
||||
bot, call.message.chat.id, call.message.message_id
|
||||
)
|
||||
elif refill_status == "USER_NOT_FOUND":
|
||||
await call.answer("❗ Пользователь не найден. Напишите в поддержку.", True, cache_time=30)
|
||||
await call.answer(
|
||||
"❗ Пользователь не найден. Напишите в поддержку.", True, cache_time=30
|
||||
)
|
||||
elif pay_status == 1:
|
||||
await call.answer("❗️ Не удалось проверить платёж. Попробуйте позже", True, cache_time=30)
|
||||
await call.answer(
|
||||
"❗️ Не удалось проверить платёж. Попробуйте позже", True, cache_time=30
|
||||
)
|
||||
elif pay_status == 2:
|
||||
await call.answer("❗️ Оплата не была найдена. Попробуйте позже", True, cache_time=5)
|
||||
await call.answer(
|
||||
"❗️ Оплата не была найдена. Попробуйте позже", True, cache_time=5
|
||||
)
|
||||
elif pay_status == 3:
|
||||
await call.answer("❗️ Вы не успели оплатить счёт", True, cache_time=5)
|
||||
await call.message.edit_reply_markup()
|
||||
else:
|
||||
await call.answer(f"❗ Неизвестная ошибка {pay_status}. Обратитесь в поддержку.", True, cache_time=5)
|
||||
await call.answer(
|
||||
f"❗ Неизвестная ошибка {pay_status}. Обратитесь в поддержку.",
|
||||
True,
|
||||
cache_time=5,
|
||||
)
|
||||
|
||||
|
||||
# Проверка оплаты - Звёзды
|
||||
@router.callback_query(F.data.startswith('Pay:Stars'))
|
||||
@router.callback_query(F.data.startswith("Pay:Stars"))
|
||||
async def refill_check_stars(call: CallbackQuery, bot: Bot, state: FSM, arSession: ARS):
|
||||
pay_method = call.data.split(":")[1]
|
||||
pay_receipt = int(call.data.split(":")[2])
|
||||
@@ -233,22 +205,36 @@ async def refill_check_stars(call: CallbackQuery, bot: Bot, state: FSM, arSessio
|
||||
|
||||
if refill_status == "ALREADY":
|
||||
await call.answer("❗ Ваше пополнение уже зачислено.", True, cache_time=60)
|
||||
await delete_refill_message(bot, call.message.chat.id, call.message.message_id)
|
||||
await delete_refill_message(
|
||||
bot, call.message.chat.id, call.message.message_id
|
||||
)
|
||||
elif refill_status == "USER_NOT_FOUND":
|
||||
await call.answer("❗ Пользователь не найден. Напишите в поддержку.", True, cache_time=30)
|
||||
await call.answer(
|
||||
"❗ Пользователь не найден. Напишите в поддержку.", True, cache_time=30
|
||||
)
|
||||
elif pay_status == 1:
|
||||
await call.answer("❗️ Не удалось проверить платёж. Попробуйте позже", True, cache_time=30)
|
||||
await call.answer(
|
||||
"❗️ Не удалось проверить платёж. Попробуйте позже", True, cache_time=30
|
||||
)
|
||||
elif pay_status == 2:
|
||||
await call.answer("❗️ Оплата не была найдена. Попробуйте позже", True, cache_time=5)
|
||||
await call.answer(
|
||||
"❗️ Оплата не была найдена. Попробуйте позже", True, cache_time=5
|
||||
)
|
||||
else:
|
||||
await call.answer(f"❗ Неизвестная ошибка {pay_status}. Обратитесь в поддержку.", True, cache_time=5)
|
||||
await call.answer(
|
||||
f"❗ Неизвестная ошибка {pay_status}. Обратитесь в поддержку.",
|
||||
True,
|
||||
cache_time=5,
|
||||
)
|
||||
|
||||
|
||||
################################################################################
|
||||
#################################### ЗВЁЗДЫ ####################################
|
||||
# Подтверждение платежа Telegram Stars
|
||||
@router.pre_checkout_query()
|
||||
async def refill_stars_pre_checkout(query: PreCheckoutQuery, bot: Bot, state: FSM, arSession: ARS):
|
||||
async def refill_stars_pre_checkout(
|
||||
query: PreCheckoutQuery, bot: Bot, state: FSM, arSession: ARS
|
||||
):
|
||||
await (
|
||||
await StarsAPI.connect(
|
||||
bot=bot,
|
||||
@@ -277,7 +263,9 @@ async def refill_stars_success(message: Message, bot: Bot, state: FSM, arSession
|
||||
stars_api.parse_successful_payment(payment)
|
||||
)
|
||||
except ValueError:
|
||||
bot_logger.warning("Некорректная successful_payment для Telegram Stars", exc_info=True)
|
||||
bot_logger.warning(
|
||||
"Некорректная successful_payment для Telegram Stars", exc_info=True
|
||||
)
|
||||
return
|
||||
|
||||
refill_status, receipt = await save_refill_success(
|
||||
@@ -293,12 +281,10 @@ async def refill_stars_success(message: Message, bot: Bot, state: FSM, arSession
|
||||
if bill_chat_id == message.chat.id:
|
||||
await delete_refill_message(bot, bill_chat_id, bill_message_id)
|
||||
|
||||
await message.answer(
|
||||
ded(f"""
|
||||
await message.answer(ded(f"""
|
||||
<b>💰 Вы пополнили баланс на сумму <code>{pay_amount}₽</code>. Удачи ❤️
|
||||
🧾 Чек: <code>#{receipt}</code></b>
|
||||
""")
|
||||
)
|
||||
"""))
|
||||
elif refill_status == "ALREADY":
|
||||
if bill_chat_id == message.chat.id:
|
||||
await delete_refill_message(bot, bill_chat_id, bill_message_id)
|
||||
@@ -312,12 +298,12 @@ async def refill_stars_success(message: Message, bot: Bot, state: FSM, arSession
|
||||
#################################### ПРОЧЕЕ ####################################
|
||||
# Зачисление средств
|
||||
async def refill_success(
|
||||
bot: Bot,
|
||||
call: CallbackQuery,
|
||||
pay_method: str,
|
||||
pay_amount: float,
|
||||
pay_receipt: Optional[int] = None,
|
||||
pay_comment: Optional[str] = None,
|
||||
bot: Bot,
|
||||
call: CallbackQuery,
|
||||
pay_method: str,
|
||||
pay_amount: float,
|
||||
pay_receipt: Optional[int] = None,
|
||||
pay_comment: Optional[str] = None,
|
||||
):
|
||||
user_id = call.from_user.id
|
||||
|
||||
@@ -338,19 +324,19 @@ async def refill_success(
|
||||
if response_success != "ok":
|
||||
return response_success
|
||||
|
||||
await call.message.answer(
|
||||
ded(f"""
|
||||
await call.message.answer(ded(f"""
|
||||
<b>💰 Вы пополнили баланс на сумму <code>{pay_amount}₽</code>. Удачи ❤️
|
||||
🧾 Чек: <code>#{receipt}</code></b>
|
||||
""")
|
||||
)
|
||||
"""))
|
||||
await delete_refill_message(bot, call.message.chat.id, call.message.message_id)
|
||||
|
||||
return response_success
|
||||
|
||||
|
||||
# Удаление сообщения со счётом
|
||||
async def delete_refill_message(bot: Bot, chat_id: Optional[int], message_id: Optional[int]) -> None:
|
||||
async def delete_refill_message(
|
||||
bot: Bot, chat_id: Optional[int], message_id: Optional[int]
|
||||
) -> None:
|
||||
if chat_id is None or message_id is None:
|
||||
return
|
||||
|
||||
@@ -362,16 +348,14 @@ async def delete_refill_message(bot: Bot, chat_id: Optional[int], message_id: Op
|
||||
|
||||
# Сохранение пополнения и уведомление админов
|
||||
async def save_refill_success(
|
||||
bot: Bot,
|
||||
user_id: int,
|
||||
pay_method: str,
|
||||
pay_amount: float,
|
||||
pay_receipt: int,
|
||||
pay_comment: str,
|
||||
bot: Bot,
|
||||
user_id: int,
|
||||
pay_method: str,
|
||||
pay_amount: float,
|
||||
pay_receipt: int,
|
||||
pay_comment: str,
|
||||
) -> Tuple[str, int]:
|
||||
if pay_method == "Yoomoney":
|
||||
text_method = "ЮMoney"
|
||||
elif pay_method == "Cryptobot":
|
||||
if pay_method == "Cryptobot":
|
||||
text_method = "CryptoBot"
|
||||
elif pay_method == "Stars":
|
||||
text_method = "Telegram Stars"
|
||||
@@ -401,7 +385,7 @@ async def save_refill_success(
|
||||
▪️ Пользователь: <b>@{get_user.user_login}</b> | <a href='tg://user?id={user_id}'>{get_user.user_name}</a> | <code>{user_id}</code>
|
||||
▪️ Сумма пополнения: <code>{pay_amount}₽</code> <code>({text_method})</code>
|
||||
▪️ Чек: <code>#{pay_receipt}</code>
|
||||
""")
|
||||
"""),
|
||||
)
|
||||
|
||||
return response_success, pay_receipt
|
||||
|
||||
Reference in New Issue
Block a user