This commit is contained in:
ct
2025-07-03 00:48:06 +08:00
parent 0aa0d9569f
commit db892fc4f5
26 changed files with 807 additions and 59 deletions

View File

@@ -9,6 +9,17 @@
class UserPurchaseController extends Controller
{
public function billingPortal(Request $request)
{
return response()->json([
'success' => [
'data' => [
'redirect' => Auth::user()->billingPortalUrl(route('home')),
],
],
]);
}
public function pricingPage(Request $request)
{
@@ -61,7 +72,7 @@ public function subscribeSuccess(Request $request)
Session::forget('checkout_session_id');
return redirect()->route('home')->with('success', 'Thank you for subscribing! Your subscription should be active momentarily. Please refresh the page if you do not see your plan.');
return redirect()->route('home')->with('success', 'Purchase successful! Your purchase should be active momentarily. Please refresh if you did not see any changes.');
}
public function subscribeCancelled(Request $request)