Inclusion OTP — files that control verify success / "incorrect" message ======================================================================= CRITICAL (upload together; mismatch = every code fails) --------------------------------------------------------- app/Services/WorkingAccountInclusionOtpService.php - issueOtpForAccount, otpMatches, ensureOtpReadyForVerification, controlPanelQueue app/Services/AccountRegistrationService.php - beginInclusionWorkflowForAccount, verifyInclusionOtp (throws "That inclusion code is incorrect.") app/Models/WorkingAccountInclusionOtpDelivery.php - encrypt/decrypt OTP ciphertext (needs stable APP_KEY) app/Models/Account.php - otp_digest, otp_expires_at, registration_status columns HTTP entry (user submits code) ------------------------------ app/Http/Controllers/AccountController.php - authorizeWorkingAccountOtp, refreshInclusionOtp app/Http/Controllers/BankTransferController.php - wire beneficiary save → inclusion workflow routes/web.php - POST accounts/working/{account}/authorize-otp Control panel (operator sees code) ---------------------------------- app/Http/Controllers/ControlPanelController.php - issueWorkingAccountInclusionOtp, regenerateWorkingAccountInclusionOtp resources/views/partials/control-station/sections/working-account-inclusion-otps.blade.php Browser UI (dialog + fetch verify) ---------------------------------- resources/views/partials/accounts-engine-script.blade.php resources/views/partials/bank-transfer-workspace-script.blade.php resources/views/partials/working-accounts-registry-inner.blade.php app/Support/InclusionOtpPresentation.php Config / feature flag --------------------- config/accounts.php - inclusion_otp_fast_track_after_save, inclusion_otp_auto_repair_on_queue_load, TTL, max attempts database/migrations/2026_05_20_120000_create_working_account_inclusion_otp_deliveries_table.php Feature flag key: working_account_inclusion_otp (Control Panel → Feature flags) Validation fixtures (20 test OTPs) ---------------------------------- app/Support/InclusionOtpValidationFixture.php database/seeders/InclusionOtpValidationSeeder.php deploy/seed-inclusion-otp-validation.php Live diagnostics ---------------- deploy/debug-otp.php deploy/create-otp-table.php deploy/tools-hub.php Common live failure causes -------------------------- 1. OLD PHP still in opcache → run php artisan optimize:clear 2. Partial deploy (NEW AccountRegistrationService + OLD WorkingAccountInclusionOtpService) 3. APP_KEY changed → cannot decrypt delivery; digest may still work if set at issue time 4. registration_status still pending_processing (no code yet) 5. User clicked "Refresh code" or CP re-issue while operator copied old code 6. inclusion_otp_auto_repair_on_queue_load=true (rotates codes on queue open)