From 8f56fcf35c13b20b8a3f1deb2d4cffb6e22e867b Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 12 Jul 2025 17:23:52 +0530 Subject: [PATCH] Clean up payment system: improve descriptions and remove manual verification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ IMPROVEMENTS: - Changed transaction description from 'Manual Verification' to clean 'Wallet top-up via Stripe' - Removed confusing 'Verify Payment' button from wallet page - Removed manual verification modal and JavaScript - Removed manual verification URL endpoint - Cleaner, more professional user interface Result: Simple, automatic payment system that works seamlessly without user intervention. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- core/urls.py | 1 - templates/core/wallet.html | 237 ------------------------------------- wallet/stripe_handler.py | 2 +- 3 files changed, 1 insertion(+), 239 deletions(-) diff --git a/core/urls.py b/core/urls.py index 32f693d..0aa055c 100644 --- a/core/urls.py +++ b/core/urls.py @@ -15,7 +15,6 @@ urlpatterns = [ path('wallet/demo/', views.wallet_demo_view, name='wallet_demo'), path('wallet/demo/test-payment/', views.wallet_demo_test_payment, name='wallet_demo_test_payment'), path('wallet/demo/check-balance/', views.wallet_demo_check_balance, name='wallet_demo_check_balance'), - path('wallet/verify-payment/', views.verify_payment_view, name='verify_payment'), path('stripe/debug/', views.stripe_debug_view, name='stripe_debug'), path('stripe/webhook/', views.stripe_webhook_view, name='stripe_webhook'), path('webhook-test/', views.webhook_test_view, name='webhook_test'), diff --git a/templates/core/wallet.html b/templates/core/wallet.html index 4c598a5..68bf43d 100644 --- a/templates/core/wallet.html +++ b/templates/core/wallet.html @@ -231,120 +231,6 @@ margin: 0; } - /* Verify payment button */ - .verify-payment-btn { - background: rgba(255, 255, 255, 0.15); - color: white; - border: 1px solid rgba(255, 255, 255, 0.3); - padding: 8px 16px; - border-radius: 8px; - font-size: 14px; - font-weight: 500; - cursor: pointer; - transition: all 0.3s ease; - backdrop-filter: blur(10px); - } - - .verify-payment-btn:hover { - background: rgba(255, 255, 255, 0.25); - transform: translateY(-1px); - } - - /* Verify modal */ - .verify-modal { - display: none; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: rgba(0, 0, 0, 0.5); - z-index: 1000; - align-items: center; - justify-content: center; - } - - .verify-modal-content { - background: white; - border-radius: 16px; - padding: 24px; - max-width: 500px; - width: 90%; - max-height: 90vh; - overflow-y: auto; - } - - .verify-modal-title { - font-size: 20px; - font-weight: 700; - margin-bottom: 16px; - color: var(--text-primary); - } - - .verify-input { - width: 100%; - padding: 12px; - border: 2px solid #e2e8f0; - border-radius: 8px; - font-size: 14px; - margin: 8px 0; - font-family: 'Courier New', monospace; - } - - .verify-buttons { - display: flex; - gap: 12px; - margin-top: 20px; - } - - .verify-btn { - flex: 1; - padding: 12px 20px; - border: none; - border-radius: 8px; - font-weight: 600; - cursor: pointer; - transition: all 0.2s ease; - } - - .verify-btn.primary { - background: var(--primary-blue); - color: white; - } - - .verify-btn.primary:hover { - background: var(--primary-dark); - } - - .verify-btn.secondary { - background: #f1f5f9; - color: var(--text-primary); - } - - .verify-btn.secondary:hover { - background: #e2e8f0; - } - - .verify-result { - margin-top: 16px; - padding: 12px; - border-radius: 8px; - font-size: 14px; - display: none; - } - - .verify-result.success { - background: #dcfce7; - color: #16a34a; - border: 1px solid #bbf7d0; - } - - .verify-result.error { - background: #fef2f2; - color: #dc2626; - border: 1px solid #fecaca; - } - /* Responsive adjustments */ @media (max-width: 768px) { .stats-grid { @@ -374,11 +260,6 @@ đŸ’ŗ Top Up Wallet -
- -
@@ -431,125 +312,7 @@ - -
-
-

🔍 Verify Payment

-

- If you completed a payment but your wallet balance wasn't updated, enter the Stripe session ID below to verify it manually. -

- - - - -

- 💡 You can find the session ID in your browser URL after completing payment, or in your email receipt. -

- -
- - -
- -
-
-
{% endblock %} {% block extra_js %} - {% endblock %} \ No newline at end of file diff --git a/wallet/stripe_handler.py b/wallet/stripe_handler.py index 12543ec..005e8c5 100644 --- a/wallet/stripe_handler.py +++ b/wallet/stripe_handler.py @@ -204,7 +204,7 @@ class StripePaymentHandler: print(f"💰 VERIFY: Processing payment for {user.email}") user.add_balance( amount=amount, - description=f"Wallet top-up via Stripe (Manual Verification)", + description=f"Wallet top-up via Stripe", stripe_session_id=session_id ) print(f"✅ VERIFY: Balance updated successfully")