3d78974af7
- Add retry_count column to guest_purchases with Alembic migration - Add expression indexes on metadata_json->>'purchase_token' for all 12 payment provider tables (partial indexes filtered by is_paid/status) - Implement _find_succeeded_provider_payment() covering all providers: YooKassa, Heleket, MulenPay, Pal24, Wata, Platega, CloudPayments, Freekassa, KassaAi, RioPay, SeverPay, and CryptoBot (payload field) - Add amount verification in _check_and_recover_pending_purchase(): compares provider payment amount with GuestPurchase.amount_kopeks, skips for CryptoBot (USD conversion imprecision) - Increment retry_count on each retry attempt in retry_stuck_paid_purchases and retry_stuck_pending_activation - Mark purchases as FAILED after 20 retries with admin Telegram alert via AdminNotificationService (ERRORS category)