#!/usr/bin/env python3
"""
Quick fix for missing User import in payments/views.py
This fixes the NameError at /payments/callbacks/
"""

print("=" * 60)
print("DEPLOYING USER IMPORT FIX TO PRODUCTION")
print("=" * 60)
print()
print("Issue: NameError: name 'User' is not defined")
print("Location: payments/views.py, line 406")
print()
print("Fix Applied: Added 'from users.models import User' to imports")
print()
print("=" * 60)
print("DEPLOYMENT STEPS FOR CPANEL:")
print("=" * 60)
print()
print("1. Upload the fixed payments/views.py file to:")
print("   /home/acbptxvs/public_html/branchbusinessadvance.co.ke/payments/")
print()
print("2. Restart the application:")
print("   - Go to cPanel > Setup Python App")
print("   - Click 'Restart' button")
print()
print("3. Test the fix:")
print("   - Visit: https://branchbusinessadvance.co.ke/payments/callbacks/")
print("   - Should load without NameError")
print()
print("=" * 60)
print("ALTERNATIVE: SSH DEPLOYMENT")
print("=" * 60)
print()
print("If you have SSH access, run these commands:")
print()
print("cd /home/acbptxvs/public_html/branchbusinessadvance.co.ke")
print("touch tmp/restart.txt  # Restart the app")
print()
print("=" * 60)
print("✓ Fix is ready for deployment!")
print("=" * 60)
