add freekassa_pay

This commit is contained in:
Vladless
2025-06-22 08:35:17 +03:00
parent f261d5647a
commit 4e0f7fb2ee
5 changed files with 13 additions and 1 deletions
+1
View File
@@ -28,6 +28,7 @@ COUPON = "🎟️ Активировать купон"
COUPON_RESTART = "🎟️ Попробовать другой купон"
YOOKASSA = "💳 ЮКасса: быстрая оплата"
YOOMONEY = "💳 ЮМани: перевод по карте"
FREEKASSA = "💰 FreeKassa: межд. платежи"
CRYPTOBOT = "💰 CryptoBot: криптовалюта"
STARS = "⭐ Оплата Звездами"
ROBOKASSA = "⭐ RoboKassa"
+7
View File
@@ -11,6 +11,7 @@ from sqlalchemy.ext.asyncio import AsyncSession
from config import (
CRYPTO_BOT_ENABLE,
DONATIONS_ENABLE,
FREEKASSA_ENABLE,
ROBOKASSA_ENABLE,
STARS_ENABLE,
YOOKASSA_ENABLE,
@@ -22,6 +23,7 @@ from handlers.buttons import (
BALANCE_HISTORY,
COUPON,
CRYPTOBOT,
FREEKASSA,
MAIN_MENU,
PAYMENT,
ROBOKASSA,
@@ -30,6 +32,7 @@ from handlers.buttons import (
YOOMONEY,
)
from handlers.payments.cryprobot_pay import process_callback_pay_cryptobot
from handlers.payments.freekassa_pay import process_callback_pay_freekassa
from handlers.payments.robokassa_pay import process_callback_pay_robokassa
from handlers.payments.stars_pay import process_callback_pay_stars
from handlers.payments.yookassa_pay import process_callback_pay_yookassa
@@ -58,6 +61,8 @@ async def handle_pay(
payment_handlers.append(process_callback_pay_stars)
if ROBOKASSA_ENABLE:
payment_handlers.append(process_callback_pay_robokassa)
if FREEKASSA_ENABLE:
payment_handlers.append(process_callback_pay_freekassa)
if len(payment_handlers) == 1:
await callback_query.answer()
@@ -75,6 +80,8 @@ async def handle_pay(
builder.row(InlineKeyboardButton(text=STARS, callback_data="pay_stars"))
if ROBOKASSA_ENABLE:
builder.row(InlineKeyboardButton(text=ROBOKASSA, callback_data="pay_robokassa"))
if FREEKASSA_ENABLE:
builder.row(InlineKeyboardButton(text=FREEKASSA, callback_data="pay_freekassa"))
if DONATIONS_ENABLE:
builder.row(
InlineKeyboardButton(text="💰 Поддержать проект", callback_data="donate")
+4
View File
@@ -4,6 +4,7 @@ from aiogram import Router
from config import (
CRYPTO_BOT_ENABLE,
FREEKASSA_ENABLE,
ROBOKASSA_ENABLE,
STARS_ENABLE,
YOOKASSA_ENABLE,
@@ -11,6 +12,7 @@ from config import (
)
from .cryprobot_pay import router as cryprobot_router
from .freekassa_pay import router as freekassa_router
from .gift import router as gift_router
from .robokassa_pay import router as robokassa_router
from .stars_pay import router as stars_router
@@ -25,6 +27,8 @@ if YOOMONEY_ENABLE:
router.include_router(yoomoney_router)
if ROBOKASSA_ENABLE:
router.include_router(robokassa_router)
if FREEKASSA_ENABLE:
router.include_router(freekassa_router)
if CRYPTO_BOT_ENABLE:
router.include_router(cryprobot_router)
if STARS_ENABLE:
+1 -1
View File
File diff suppressed because one or more lines are too long