- File:
routes/mpesaCallback.js - Issue: Currently using 'purchase' activity type instead of 'loan_repay_initiated'
- Fix: Update the query to use 'loan_repay_initiated' action
- File:
routes/mpesaCallback.js - Issue: WiFi duration for loans is hardcoded
- Fix: Use environment variable
LOAN_WIFI_DURATION_HOURSwith default of 1 hour
- File:
routes/loanRoutes.js - Issue: Test/bypass endpoint needs removal for production
- Fix: Remove the admin bypass loan endpoint and related code
- Files:
services/loanService.js,index.js - Issue: console.log statements need proper logging
- Fix: Replace all console.log/error with winston logger calls
- File:
routes/loanRoutes.js - Issue: Current regex may not be robust enough
- Fix: Update regex to be more comprehensive for MAC address validation
- Action: Manual testing of loan request → repayment → WiFi access
- Verify: End-to-end functionality works correctly
- Action: Test with real MikroTik hardware
- Verify: Whitelist functionality works in production environment
- Am done up to this point of testing with real Mikrotik RB750UPr, but i choose to retain this to-do file. Currently working on DDOS management.