- Add stripeGW field to SubscriberService and initialize in NewSubscriberService with API key and webhook secret
- Add processPaymentToken to call Stripe API and retrieve payment method details from token
- Update AddPaymentMethod to call processPaymentToken and use real card details (last4, brand, expiry dates) from Stripe
- Update AddPaymentMethod to use req.IsDefault instead of hardcoded false value
- Import
- Update SubscribeToSubscriberUpdates to poll database every 3 seconds for subscriber changes since last update
- Add buffered channel (size 5) to prevent blocking on subscriber updates
- Track lastUpdatedAt timestamp to query only new subscriber changes
- Add SubscribeToAlertUpdates to poll database every 2 seconds for new alerts
- Add buffered channel (size 10) for alert updates with ID-based filtering
- Support optional
- Update GetAccount to query actual usage events and balance from database instead of returning zeros
- Update ListInvoices to query invoices with filters, pagination, and preload subscriber data
- Update GetInvoice to query invoice by ID with line items and subscriber preloading
- Update ListRatingPlans to query active rating plans ordered by monthly fee
- Update GetRatingPlan to query rating plan by ID with active
- Add ChargingEngineClient with base URL and HTTP client with configurable timeout
- Add CheckCredit to verify subscriber credit availability by IP with bytes requested
- Add DeductCredit to deduct bytes from subscriber credit balance
- Add AddCredit to add bytes to subscriber credit balance
- Add GetBalance to retrieve current credit balance for subscriber by IP
- Add HealthCheck to verify charging engine availability
- Add ChargingService with database and charging engine client dependencies
- Add GetSystemStats to retrieve active sessions, accounts, blocked users, and uptime metrics
- Add GetHealthStatus to check Redis connection, sync status, and memory usage
- Add GetUsageStats to get subscriber usage statistics with data/voice/SMS volumes, costs, and trends
- Add GetRealTimeUsage to track current session and today's usage metrics
- Add InvoiceService with database dependency for invoice management operations
- Add GenerateMonthlyInvoice to create invoices with plan fees and usage charges from billing period
- Add SendInvoice to update invoice status to pending (email integration TODO)
- Add MarkInvoiceAsPaid to update invoice payment status
- Add GetOverdueInvoices to query invoices past due date with pending status
- Add GetSubscriber
- Add GetAccount to retrieve subscriber account information with balance and usage limits
- Add ListInvoices/GetInvoice for invoice management with line items
- Add ListRatingPlans/GetRatingPlan for rating plan queries
- Add ListAlerts/CreateAlert/ResolveAlert for alert management
- Add SearchSubscribers for subscriber search functionality
- Add SubscribeToSubscriberUpdates/SubscribeToAlertUpdates
- Move ES2 request/response types to es2_types.go
- Move profile operations (download, activate, deactivate, delete, status, list) to es2_operations.go
- Move helper methods (send requests, validation, generateRequestID) to es2_helpers.go
- Keep core ES2Service struct and ProvisionProfile in es2_client.go
- Revert sendDeactivationRequest parameter type from any back to interface{}
- Remove omitempty from Plan field in Subscriber model
- Update NotifySubscriberUpdate to use any instead of interface{}
- Update sendDeactivationRequest parameter type from interface{} to any
- Add os import for environment variable access
- Update getOperatorVariant to read OP from OPERATOR_VARIANT env var
- Add fallback to default "TelecomOP1234567" for development
- Add zero-padding for OP values shorter than 16 bytes
- Update comments to reference environment variable configuration
- Replace XOR-based OPc generation with AES-128 ECB encryption
- Add getOperatorVariant for consistent OP across subscribers
- Add AES cipher block creation with error handling
- Add OP length validation for AES-128 block size
- Update generateOPc to use crypto/aes for 3GPP-compliant OPc derivation
- Add hardcoded OP placeholder with production configuration note
- Add AMFClient and ES2Service dependencies to SubscriberService
- Initialize AMF client with default URL and ES2 service in NewSubscriberService
- Implement provisionESIMProfile with EID validation, profile provisioning, activation, and AMF notification
- Implement deactivateESIMProfile with profile deactivation, status updates, and session termination
- Add generateOPc helper for deriving OPc from OP and K using XOR-based
- Add AMFClient struct with base URL and HTTP client
- Add NewAMFClient with 30s timeout
- Add TerminateSession for subscriber session termination with reason and timestamp
- Add NotifySubscriberUpdate for subscriber status change notifications
- Add SessionTerminationRequest and SessionTerminationResponse models
- Add generateRequestID helper for request tracking
- Add ES2Service struct with HTTP client and ES2Config
- Add NewES2Service with 30s timeout and TLS configuration
- Add ProvisionProfile for eSIM profile provisioning with metadata support
- Add ActivateProfile, DeactivateProfile, and DeleteProfile for profile lifecycle management
- Add GetProfileStatus for profile state queries
- Add ListProfiles for eUICC profile enumeration
- Add ValidateEID and ValidateICCID for identifier
- Add SubscriberService struct with Database and Config dependencies
- Add NewSubscriberService constructor
- Add CreateSubscriber with IMSI allocation, auth key generation, and eSIM provisioning support
- Add GetSubscriber and GetSubscriberByIMSI for subscriber retrieval
- Add UpdateSubscriber for subscriber information updates
- Add SuspendSubscriber with session termination
- Add TerminateSubscriber with session termination and eSIM profile deactivation
- Add ListSubscribers with pagination and