subscription page updated 2
This commit is contained in:
@@ -27,14 +27,14 @@ class SubscriptionController extends Controller
|
||||
{
|
||||
try {
|
||||
// dd($request->header('access-token'));
|
||||
$token = readHeaderToken();
|
||||
$token = readHeaderToken();
|
||||
// dd("acc",$token);
|
||||
// $token = true;
|
||||
|
||||
// dd($token, Session::get('vendorToken'));
|
||||
if ($token) {
|
||||
// $user_id = 12;
|
||||
$user_id = $token['sub'];
|
||||
$user_id = $token['sub'];
|
||||
|
||||
$dateTime = now();
|
||||
$formattedDateTime = $dateTime->format('Y-m-d H:i:s');
|
||||
@@ -55,7 +55,7 @@ class SubscriptionController extends Controller
|
||||
}
|
||||
$productList = SubscriptionProducts::where('is_active', 1)->first();
|
||||
|
||||
return view('Admin.pages.subscriptions.list-of-products', compact('productList','userData'));
|
||||
return view('Admin.pages.subscriptions.list-of-products', compact('productList', 'userData'));
|
||||
} else {
|
||||
return jsonResponseWithErrorMessageApi(__('auth.user_deleted'), 409);
|
||||
}
|
||||
@@ -136,7 +136,7 @@ class SubscriptionController extends Controller
|
||||
'recurring' => ['interval' => 'month'],
|
||||
'product' => $productCreate->id,
|
||||
'nickname' => 'Monthly Price',
|
||||
|
||||
|
||||
]);
|
||||
|
||||
$updateCreatedPlan = SubscriptionProducts::where('id', $id->id)->update([
|
||||
@@ -191,9 +191,9 @@ class SubscriptionController extends Controller
|
||||
// $taxId = (config('services.stripe.tax_id'));
|
||||
|
||||
$userData = IamPrincipal::where('id', $userId)->first();
|
||||
|
||||
|
||||
if ($userData) {
|
||||
|
||||
|
||||
$subscriptionPlan = SubscriptionProducts::where('id', $subscriptionProductXid)->first();
|
||||
|
||||
|
||||
@@ -222,8 +222,8 @@ class SubscriptionController extends Controller
|
||||
|
||||
return Redirect::away($checkout->url);
|
||||
//note:-for now i am just sending the cveonly=0 and lmacve=1 for reference .'&lmacve=1&cveonly=0'
|
||||
}else{
|
||||
return redirect()->back()->with(['error' => "Something went wrong while subscription!" ]);
|
||||
} else {
|
||||
return redirect()->back()->with(['error' => "Something went wrong while subscription!"]);
|
||||
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ class SubscriptionController extends Controller
|
||||
|
||||
public function thankyou(Request $request)
|
||||
{
|
||||
|
||||
|
||||
return view('Admin.pages.subscriptions.thank-you');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user