feat(payment): implement secure payment cancellation page with session tracking

- Create PaymentCancelController with authentication and subscription detection
  - Design responsive cancellation view with red/orange gradient theme
  - Add session token logging and recent subscription lookup functionality
  - Update payment cancel route to use new controller with auth middleware
  - Include security assurances and proper navigation to checkout/dashboard
  - Remove broken route references and ensure all buttons link to valid pages
This commit is contained in:
idevakk
2025-12-05 06:59:08 -08:00
parent 34183dc3cb
commit ebb041c0cc
3 changed files with 209 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
<?php
use App\Http\Controllers\PaymentCancelController;
use App\Http\Controllers\PaymentController;
use App\Http\Controllers\PaymentProviderController;
use App\Http\Controllers\PaymentSuccessController;
@@ -16,7 +17,9 @@ Route::prefix('payment')->name('payment.')->group(function () {
Route::get('/success', [PaymentSuccessController::class, 'show'])
->middleware(['auth', 'verified'])
->name('success');
Route::get('/cancel', [PaymentController::class, 'cancel'])->name('cancel');
Route::get('/cancel', [PaymentCancelController::class, 'show'])
->middleware(['auth', 'verified'])
->name('cancel');
// UNIFIED: Payment processing endpoints (new unified payment system)
Route::post('/checkout', [PaymentController::class, 'createCheckout'])->name('checkout');