Commit Graph

65 Commits

Author SHA1 Message Date
3cc7092967 Fix: Product details now auto-scroll into view when Buy is clicked
Problem: When clicking Buy button, product details message appeared at bottom
but Telegram didn't auto-scroll to show it, leaving users confused.

Solution: Use replyToMessageId parameter to thread product details as a reply
to the user's button click message. This:
- Creates visual thread connection
- Encourages Telegram to show the response prominently
- Makes conversation flow more natural

Also wrapped activity tracking in try-catch to prevent blocking.

Technical Changes:
- ProductCarouselService: Added replyToMessageId optional parameter
- SendPhotoAsync/SendTextMessageAsync: Use replyToMessageId with allowSendingWithoutReply
- HandleProductDetail: Pass message.MessageId to carousel service

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 04:08:50 +01:00
6676f010a8 Fix: Compilation error - use correct PaymentMethodMenu name
Error: MenuBuilder.PaymentCurrencyMenu does not exist
Fix: Changed to MenuBuilder.PaymentMethodMenu (correct method name)

TeleBot now compiles successfully.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 03:57:24 +01:00
9e1bf0543f Fix: Prevent activity tracker errors from blocking checkout
Problem: Activity tracker DNS errors (littleshop-admin:8080) were blocking
checkout flow, preventing shipping address prompt from showing.

Solution: Wrap activity tracking in try-catch with warning log.
Checkout flow continues even if activity tracking fails.

This ensures users can complete checkout even if analytics are unavailable.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 03:49:03 +01:00
17cb9c7721 Fix: Multiple TeleBot UI improvements
1. Remove /help from main menu
   - Removed " Help" button from main menu
   - Help still available via /help command

2. Fix support refresh clearing messages
   - Changed from editing message to sending new message
   - Preserves message history when refreshing
   - Shows "No new messages" if no updates instead of clearing
   - Better error handling with user-friendly alerts

3. Add retry payment button for failed payments
   - New "🔄 Retry Payment" button when payment creation fails
   - Shows order ID (friendly reference) in error message
   - PaymentFailedMenu: Retry, View Basket, Main Menu options
   - HandleRetryPayment: Re-shows currency selection
   - Preserves order and allows payment retry without recreating order

Technical Changes:
- MenuBuilder: Added PaymentFailedMenu method
- CallbackHandler: Added retry_payment case and HandleRetryPayment method
- HandlePayment: Updated error messages to use PaymentFailedMenu
- HandleRefreshConversation: Sends new message instead of editing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 03:48:04 +01:00
99bb083bd6 Feature: Enhanced order display and basket summary
1. Basket Summary Below Navigation
   - Welcome message now shows basket items and total
   - Format: "🛒 Basket: X item(s) - £X.XX"
   - Only shown when basket has items

2. Order Display Improvements
   - Order GUID replaced with friendly reference (last 8 chars: #XXXXXXXX)
   - Added "View Payment Details" button for pending payment orders
   - Button shows QR code, amount, address, and time until expiry
   - Variants now properly displayed in order items (already working via commit 330116e)

3. Payment Details View (New Feature)
   - HandleViewPayment: Shows payment info with QR code
   - Displays: Currency, amount, address, expiry time
   - Shows time remaining until payment expires
   - QR code generation for easy mobile payment
   - OrderDetailsMenu: Context-aware navigation buttons

4. Postal Address Auto-Load (Verified Working)
   - Checkout automatically detects saved addresses
   - Offers to use saved address with preview
   - One-click selection or option to enter new address
   - SavedAddress copied to OrderFlow when selected

Technical Changes:
- MessageFormatter.FormatWelcome: Added optional cart parameter
- MessageFormatter.FormatOrder: Uses friendly order reference
- MenuBuilder.OrderDetailsMenu: New menu with payment button
- CallbackHandler.HandleViewPayment: Payment details with QR
- CallbackHandler.HandleMainMenu: Pass cart to welcome formatter

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 03:29:11 +01:00
9432ae8ccb UX: Major TeleBot checkout flow improvements
1. Show variants immediately on product page (removed duplicate buy button)
   - Variants now display directly on product details page
   - No intermediate "select variant" button needed
   - Faster checkout flow

2. Add post-purchase prompt (Checkout or Continue Shopping)
   - After adding to basket, shows "What would you like to do next?"
   - Options: View Basket, Checkout, or Continue Shopping
   - Continue Shopping returns to the product page

3. Remove quantity +/- buttons from product details
   - Simplified to single item purchase only
   - Cleaner interface for mobile users

4. Rename "Cart" to "Basket" throughout
   - All user-facing text updated
   - "Add to Cart" → "Add to Basket"
   - "Shopping Cart" → "Shopping Basket"
   - "View Cart" → "View Basket"
   - "Clear Cart" → "Clear Basket"

Technical Changes:
- MenuBuilder.ProductDetailMenu: Now shows variant selection inline
- CallbackHandler: Updated to use ProductDetailMenu for variant updates
- Added PostAddToCartMenu for post-purchase options
- HandleAddToCart/HandleConfirmVariant: Show prompt instead of returning to product

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 03:26:19 +01:00
1e93008df4 Fix: Variant selection now accumulates across types instead of resetting
Problem:
- Selecting Size then Color would reset Size selection
- Users could never get "Add to Cart" button with multiple variant types
- Each selection created a NEW list, wiping previous choices

Root Cause:
- HandleSetVariant created: new List<string> { variantName }
- This replaced all previous selections instead of accumulating

Fix:
1. Get existing selected variants from session
2. Find the variant type of newly selected variant
3. Remove any previous selection from the SAME type (allow changing choice)
4. Add the new selection
5. Save accumulated list back to session

Example behavior now:
- Select "Red" (Color) → selectedVariants = ["Red"]
- Select "Large" (Size) → selectedVariants = ["Red", "Large"] 
- Select "Blue" (Color) → selectedVariants = ["Blue", "Large"] 
- Can now confirm when all types selected

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 02:44:28 +01:00
cb80e0161c Fix: Variant selection now requires choosing from ALL variant types
Problem:
- Product with Size + Color only required selecting 1 variant total
- User could add to cart after selecting just Size OR Color, not both

Root Cause:
- Logic checked if selectedVariants.Count == 1 for single items
- Didn't verify that all variant types were covered

Fix:
- For single items: Check that each variant type has at least one selection
- Logic: variantGroups.All(g => g.Any(v => selectedVariants.Contains(v.Name)))
- For multi-buy: Keep existing logic (total count == quantity)

Now users must select:
- Size + Color products: Must pick both Size AND Color
- Size only products: Must pick Size only
- Etc.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 02:11:06 +01:00
5ab2c51aa8 Enhancement: Show proper order details instead of GUIDs
- OrderListMenu now shows item summary (e.g., '2x Product Name' or 'Product Name +2 more')
- FormatCart enhanced to show variant selections and multi-buy indicators
- FormatOrder enhanced to show variant names and detailed item breakdown
- Cart now clearly distinguishes between multi-buy bundles and regular items
- Order confirmations now show full product and variant details

Replaced generic GUID displays with human-readable product information for better UX.
2025-10-06 00:46:35 +01:00
6c79c04ebd Fix: Message threading - navigation now sends new messages at bottom
- Changed HandleMainMenu to send new messages instead of editing
- Changed HandleBrowse to send new messages for category navigation
- Changed HandleViewCart to use SendNewCartMessage (already existed)
- Changed HandleViewOrders to send new messages for order list
- Changed HandleViewOrder to send new messages for order details

This ensures the active conversation always appears at the bottom of the chat
instead of mid-thread when users click menu buttons. Provides better UX and
natural conversation flow in Telegram.
2025-10-06 00:44:28 +01:00
c8f22c783d Feature: Add postal address memory with user preference
- Added SavedShippingAddress model to store user addresses
- Added Privacy.SaveShippingAddress preference (null = not asked, true/false = user choice)
- Enhanced checkout flow to offer using saved address if available
- Ask once about saving address, respect user's choice going forward
- Automatically save/not save based on user preference in future orders
- Added menu options: Use Saved Address, Enter New Address, Save Address (Yes/No)
- Enhanced CallbackHandler with save address handlers
- Updated MessageHandler to prompt for save preference on first use

User will only be asked once about saving addresses. Account reset clears preference.
2025-10-06 00:38:47 +01:00
147e96a084 UI: Remove Variants info button and rename Add to Cart to BUY {PRODUCTNAME}
- Removed informational 'Variants: Size: X options, Color: Y options' button
- Renamed 'Add to Cart' button to 'BUY {product.Name}' for clearer UX
- Applied to both multi-buy single item and regular quantity purchase buttons
2025-10-06 00:35:30 +01:00
29d677be72 Fix: Last occurrence of MenuBuilder.VariantSelectionMenu 2025-10-05 23:39:41 +01:00
4cd7a9c61c Fix: Update CallbackHandler to use _menuBuilder instance for VariantSelectionMenu 2025-10-05 23:37:21 +01:00
a4678c919c Fix: Make VariantSelectionMenu an instance method to access _mapper 2025-10-05 23:33:47 +01:00
f1d8bfc317 Fix: VariantSelectionMenu now uses CallbackDataMapper for all callback data to prevent GUID parsing errors 2025-10-05 23:27:12 +01:00
0801fb004c Fix: TeleBot variant callbacks now use CallbackDataMapper to decode short IDs - fixes GUID parsing errors 2025-10-05 22:48:53 +01:00
sysadmin
8075560877 Fix-variant-display-in-API 2025-10-03 20:20:25 +01:00
sysadmin
e5f19f8b83 TeleBot-variant-pricing 2025-10-03 19:36:52 +01:00
32d80e4b54 Fix: Currency display consistency and remove PGP security vulnerability
## Critical Bug Fixes

### Currency Display (£ vs $)
- Fix MenuBuilder.cs: Replace $ with £ for product prices (line 60) and order totals (line 329)
- Fix ProductCarouselService.cs: Replace $ with £ in product captions and multi-buy offers (lines 317, 325)
- Fix CallbackHandler.cs: Replace $ with £ in order confirmation message (line 800)

### Payment Amount Display Bug
- Fix MessageFormatter.cs: Remove flawed crypto detection logic (< 1.0m check)
- Bug: Order for £700 in ETH displayed as "£1.66" instead of "1.66 ETH"
- Root cause: RequiredAmount is always stored as crypto amount, not fiat
- Solution: Always display RequiredAmount with crypto symbol
- Impact: Fixes display for XMR, DOGE, LTC, and large ETH amounts

## Security: Remove PGP Encryption Feature

### Critical Security Issue Resolved
- PGP "encryption" was only Base64 encoding - NOT real encryption
- Shipping addresses stored as easily decoded text
- False sense of security for users

### Changes Made
- Mark EncryptWithPGP method as [Obsolete] in PrivacyService.cs
- Remove PGP encryption logic from order creation (LittleShopService.cs)
- Mark PGP properties as [Obsolete] in UserSession.cs models
- Disable EnablePGPEncryption feature flag in appsettings.json
- Add comments explaining feature removal

### Recommendation
Implement proper PGP encryption using BouncyCastle in future, or keep removed.

## Testing Required
- Verify all prices display with £ symbol
- Verify crypto payments show correct amount format (e.g., "1.66000000 ETH")
- Verify no PGP options appear in UI
- Test order creation without PGP encryption

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 17:36:10 +01:00
16ec41ccca Fix: Replace Quick Buy/Details buttons with single Buy button using short IDs
- ProductCarouselService: Use Buy button with short IDs for products without images
- CallbackHandler: Fix HandleCategory to use Buy button with short IDs
- MenuBuilder: Remove obsolete SingleProductMenu method

This ensures consistent behavior across all product displays and fixes
the Details button that was broken due to GUID format incompatibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 17:08:11 +01:00
sysadmin
1d08dd0a52 "Fix-API-URL-use-littleshop-admin-8080" 2025-10-03 16:37:01 +01:00
sysadmin
be074b4446 "Fix-API-URL-to-use-internal-DNS-admin.dark.side" 2025-10-03 16:27:54 +01:00
sysadmin
e3f6ec4bac "Fix-LittleShop-API-URL-for-Docker-network-and-disable-TOR-for-internal-calls" 2025-10-03 16:27:14 +01:00
sysadmin
9192658f7d "Fix-TOR-proxy-host-configuration-in-LittleShop-Client" 2025-10-03 16:22:21 +01:00
sysadmin
28496c9546 "Add-TorSocksHost-configuration" 2025-10-03 16:16:40 +01:00
sysadmin
8fb8c56d9b "Fix-Use-short-IDs-for-product-buttons-and-simplify-to-Buy-button" 2025-10-03 15:48:54 +01:00
sysadmin
694ce15549 "Fix-BUTTON_DATA_INVALID-and-add-multi-buy-buttons" 2025-10-03 15:26:52 +01:00
sysadmin
c961dfa47a "Add-Multi-Buy-section-to-product-editor" 2025-10-03 14:41:00 +01:00
fa5e5fb9fa Fix: Implement selective TOR routing for internal vs external API calls
**Issue**: Order creation failed because TOR proxy was being used for internal
Docker network API calls to littleshop-admin, causing DNS resolution failures.

**Root Cause**:
- All HTTP clients (BotManager, ActivityTracker, ProductCarousel) used
  Socks5HttpHandler.Create() which checked Privacy:EnableTor globally
- TOR gateway can only proxy external traffic (to Telegram API)
- Internal Docker network calls to littleshop-admin failed through TOR

**Solution**:
- Updated BotManagerService to use Socks5HttpHandler.CreateDirect()
- Updated BotActivityTracker to use Socks5HttpHandler.CreateDirect()
- Updated ProductCarouselService to use Socks5HttpHandler.CreateDirect()
- TelegramBotService continues using TOR for external Telegram API
- LittleShop.Client respects LittleShop:UseTor = false setting

**Architecture**:
 External calls (Telegram API) → TOR for privacy
 Internal calls (LittleShop API) → Direct Docker network connection

**Testing**:
- Bot authenticated successfully with LittleShop API (200 OK)
- Telegram Bot API using TOR proxy (socks5://tor-gateway:9050)
- Container: 45eab050eeeca479680966b45742cf140cf7df0ed8e8ab5dc8c9e3e17739c88a

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 13:09:04 +01:00
7e2d8e50db Fix: Prevent 'message not modified' error when browsing products
**Issue**: When users clicked "Browse Products" multiple times, Telegram API
rejected the edit request with "message is not modified" error, causing the
browse functionality to appear broken.

**Root Cause**: HandleBrowse method used EditMessageTextAsync directly, which
throws an exception when the message content is identical.

**Solution**:
- Replaced direct EditMessageTextAsync with SafeEditMessageAsync
- SafeEditMessageAsync catches ApiRequestException for "message is not modified"
- Silently handles duplicate edits without user-facing errors

**Testing**:
- Deployed to production (container: e1467c559ff6)
- Bot running as @Slukdevukbot with TOR enabled
- Categories API confirmed working (3 categories, 10 products)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 12:59:54 +01:00
5a834dcbf8 Fix: Update all TOR proxy configurations to support TorSocksHost
Updated remaining hardcoded 127.0.0.1 references in:
- TelegramBotService.cs (bot token update handler)
- LittleShopService.cs (API client)
- Socks5HttpHandler.cs (factory method signature)

All TOR proxy configurations now respect Privacy:TorSocksHost setting.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 12:48:07 +01:00
84172d47a4 Feature: Add TorSocksHost configuration support
Allows TOR proxy host to be configured via Privacy:TorSocksHost setting.
Defaults to 127.0.0.1 if not specified for backward compatibility.

This enables using external TOR gateways in Docker/container environments.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 12:45:46 +01:00
2ee2ee79e6 Fix: Remove MaxAutomaticRedirections when AllowAutoRedirect is false
MaxAutomaticRedirections cannot be set to 0 in .NET 9.0. When AllowAutoRedirect
is false, the MaxAutomaticRedirections property should not be set at all.

This fixes the TeleBot TOR proxy configuration crash.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 12:43:30 +01:00
4992b6b839 Cleanup: Update .gitignore and verify TOR implementation
- Add publish directories to .gitignore (both root and TeleBot)
- Exclude compressed assets (*.br, *.gz) except wwwroot
- Exclude archive files (*.tar.gz, *.zip)
- Run TOR verification: 9/9 checks PASSED ✓
- Document nginx push notification configuration

This cleanup prevents build artifacts from cluttering git status while
maintaining proper TOR security configuration verification.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 16:20:16 +01:00
d31c0b4aeb CI/CD: Add GitLab CI/CD pipeline for Hostinger deployment
- Updated .gitlab-ci.yml with complete build, test, and deploy stages
- Added authentication redirect fix in Program.cs (302 redirect for admin routes)
- Fixed Cookie vs Bearer authentication conflict for admin panel
- Configure pipeline to build from .NET 9.0 source
- Deploy to Hostinger VPS with proper environment variables
- Include rollback capability for production deployments

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 13:10:48 +01:00
sysadmin
eb87148c63 Add variant collections system and enhance ProductVariant with weight/stock tracking
This commit introduces a comprehensive variant management system and enhances
the existing ProductVariant model with per-variant weight overrides and stock
tracking, integrated across Admin Panel and TeleBot.

Features Added:
- Variant Collections: Reusable variant templates (e.g., "Standard Sizes")
- Admin UI for managing variant collections (CRUD operations)
- Dynamic variant editor with JavaScript-based UI
- Per-variant weight and weight unit overrides
- Per-variant stock level tracking
- SalesLedger model for financial tracking

ProductVariant Enhancements:
- Added Weight (decimal, nullable) field for variant-specific weights
- Added WeightUnit (enum, nullable) field for variant-specific units
- Maintains backward compatibility with product-level weights

TeleBot Integration:
- Enhanced variant selection UI to display stock levels
- Shows weight information with proper unit conversion (µg, g, oz, lb, ml, L)
- Compact button format: "Medium (15 in stock, 350g)"
- Real-time stock availability display

Database Migrations:
- 20250928014850_AddVariantCollectionsAndSalesLedger
- 20250928155814_AddWeightToProductVariants

Technical Changes:
- Updated Product model to support VariantCollectionId and VariantsJson
- Extended ProductService with variant collection operations
- Enhanced OrderService to handle variant-specific pricing and weights
- Updated LittleShop.Client DTOs to match server models
- Added JavaScript dynamic variant form builder

Files Modified: 15
Files Added: 17
Lines Changed: ~2000

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 17:03:09 +01:00
fd02836450 Add TeleBot CI/CD pipeline configuration
- Created .gitlab-ci.yml for automated builds and deployment
- Added docker-compose.production.yml for VPS deployment
- Added .env.production.example for configuration template
- Follows LittleShop deployment pattern
- Auto-deploy on main branch commits

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-27 09:53:43 +01:00
8e3efb7c3a Update TeleBot configuration and add versioning
- Updated LittleShop API URL to use VPN hostname (hq.lan)
- Added Version 1.0.3 properties to project file
- Follows infrastructure changes with VPN-based access

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-27 09:50:12 +01:00
1588c79df0 Add BotActivityTracker service registration 2025-09-25 02:30:40 +01:00
ac4fe688d9 Add bot activity tracking system 2025-09-25 01:28:56 +01:00
f12f35cc48 Implement product variant selection in TeleBot
FEATURES IMPLEMENTED:

1. Enhanced Product Display:
   - Shows multi-buy deals with pricing (e.g., "3 for £25")
   - Displays available variants grouped by type (Color, Flavor, etc.)
   - Clear visual separation between multi-buys and variants

2. Variant Selection Flow:
   - Single item: Select one variant from available options
   - Multi-buy bundles: Select individual variants for each item
   - Example: 3-pack allows choosing Red, Blue, Green individually
   - Visual feedback with checkmarks and counters

3. Smart Cart Management:
   - Tracks selected variants for each cart item
   - Supports both single variant (regular items) and multiple variants (multi-buys)
   - Unique cart entries based on product + variant combination
   - Prevents duplicate multi-buy bundles

4. User Experience Improvements:
   - Clear "Select Color/Flavor" prompts
   - Progress indicator for multi-item selection
   - Confirm button appears when selection complete
   - Clear selection option for multi-buys
   - Back navigation preserves context

TECHNICAL CHANGES:
- ProductCarouselService: Enhanced caption formatting with variants/multi-buys
- MenuBuilder: New VariantSelectionMenu with dynamic button generation
- CallbackHandler: Added handlers for selectvar, setvariant, addvariant, confirmvar
- ShoppingCart: New AddItem overload accepting Product and variant list
- CartItem: Added SelectedVariants list for multi-buy support
- UserSession: Added SelectingVariants state

This update enables customers to:
- See all available product options at a glance
- Choose specific variants when ordering
- Mix and match variants in multi-buy deals
- Get exactly what they want with clear visual feedback

Next steps: Add bot activity tracking for live dashboard

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 23:09:33 +01:00
5013e60358 Fix TeleBot compilation errors - use RequiredAmount property
- Fixed CryptoAmount property that doesn't exist
- Display £ amounts with note about needing conversion
- Show actual crypto amounts when less than 1.0
2025-09-24 19:26:40 +01:00
ddff64991b Fix TeleBot checkout flow and currency display
- Remove unnecessary shipping name step (Step 1/5) - now collects all address details in one message
- Fix currency display to show crypto amounts instead of GBP values
- Display proper BTC amounts instead of showing £39.99 as 39.99 BTC
- Tor connectivity already working (verified via telebot-tor container)
2025-09-24 19:24:19 +01:00
162400b987 Add TeleBot Hostinger deployment configuration with source build 2025-09-24 18:12:27 +01:00
10cd2ac7a1 Fix TeleBot compilation errors - remove duplicate /review case 2025-09-24 15:18:33 +01:00
515ee4d08e Complete TeleBot improvements and fixes
- Add reviews section with /reviews command and menu button
- Fix /delete command to include main menu after deletion
- Remove unused commands (tor, ephemeral, pgpkey) from help
- Remove 'Products with Images' button from main menu
- Update main menu: rename Browse to 'Browse Products', add Reviews button
- Add placeholder reviews display handler (TODO: fetch from API)
- Clean up help text to reflect actual available commands

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 15:11:40 +01:00
524f0639e1 Fix multiple TeleBot and admin panel issues
- Fix admin panel to show all pending orders (PendingPayment + PaymentReceived)
- Fix currency display from USD ($) to GBP (£) throughout TeleBot
- Update payment methods to use dynamic SilverPay currency list
- Consolidate shipping address collection into single message
- Implement cart backup/restore on payment failure
- Remove unsupported XMR from TeleBot config

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 15:04:24 +01:00
622bdcf111 🔒 SECURITY: Emergency fixes and hardening
EMERGENCY FIXES:
 DELETE MockSilverPayService.cs - removed fake payment system
 REMOVE mock service registration - no fake payments possible
 GENERATE new JWT secret - replaced hardcoded key
 FIX HttpClient disposal - proper resource management

SECURITY HARDENING:
 ADD production guards - prevent mock services in production
 CREATE environment configs - separate dev/prod settings
 ADD config validation - fail fast on misconfiguration

IMPACT:
- Mock payment system completely eliminated
- JWT authentication now uses secure keys
- Production deployment now validated on startup
- Resource leaks fixed in TeleBot currency API

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 05:45:49 +01:00
034b8facee Implement product multi-buys and variants system
Major restructuring of product variations:
- Renamed ProductVariation to ProductMultiBuy for quantity-based pricing (e.g., "3 for £25")
- Added new ProductVariant model for string-based options (colors, flavors)
- Complete separation of multi-buy pricing from variant selection

Features implemented:
- Multi-buy deals with automatic price-per-unit calculation
- Product variants for colors/flavors/sizes with stock tracking
- TeleBot checkout supports both multi-buys and variant selection
- Shopping cart correctly calculates multi-buy bundle prices
- Order system tracks selected variants and multi-buy choices
- Real-time bot activity monitoring with SignalR
- Public bot directory page with QR codes for Telegram launch
- Admin dashboard shows multi-buy and variant metrics

Technical changes:
- Updated all DTOs, services, and controllers
- Fixed cart total calculation for multi-buy bundles
- Comprehensive test coverage for new functionality
- All existing tests passing with new features

Database changes:
- Migrated ProductVariations to ProductMultiBuys
- Added ProductVariants table
- Updated OrderItems to track variants

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 00:30:12 +01:00