token="..."
bot=telebot.TeleBot(token)
db = Panda_DataBase("...")
bot.send_message(message.from_user.id, "...", reply_markup=buy_menu(url=bill.pay_url, bill=bill.bill_id))
def buy_menu(isUrl=True, url="", bill=""):
qiwiMenu = types.InlineKeyboardMarkup(row_width=1)
btnCheckQIWI = types.InlineKeyboardButton("Проверить оплату", callback_data="check_"+bill)
qiwiMenu.add(btnCheckQIWI)
return qiwiMenu
### NOT BEING EXECUTED ###
@bot.callback_query_handler(func=lambda callback: True, text_contains="check_")
def check(callback: types.CallbackQuery):
print("1")
bill = str(callback.data[6:])
info = db.get_check(bill)
if info != False:
if str(p2p.check(bill_id=bill).status) == "PAID":
bot.send_message(callback.from_user.id, "TRUE!!!")
else:
...
else:
...
When you click on the "Check payment" button, it loads , and nothing happens. And I realized that the callback is not being executed. But why, I do not know ( I will be grateful for your help