This repository contains a complete automated sales system for Telegram. It integrates a conversational interface with a robust backend and a real-world payment gateway.
The system is modularized into three core services:
- Bot Engine (
bot.py): Powered byAiogram 3, managing asynchronous user interactions and UI (Inline Keyboards). - Database Layer (
database.py): A persistent SQLite3 storage system to track user IDs, products, and transaction statuses. - Payment Gateway (
payments.py): Official Mercado Pago SDK integration to generate dynamic checkout links.
- Automated Workflow: From product selection to payment link generation.
- Async Execution: Optimized for high performance using Python's
asyncio. - Order Tracking: Every transaction is logged with a unique
preference_id. - Secure Configuration: Uses
.envfiles to protect API credentials.
-
Clone the repository:
git clone https://github.com/LeonardoCides/shop-bot-integrator
-
pip install aiogram mercadopago python-dotenv
-
create a
.envfile with your credentialsTELEGRAM_TOKEN=your_bot_token MP_ACCESS_TOKEN=your_mp_token -
python3 bot.py