subscription module updated
This commit is contained in:
@@ -61,7 +61,8 @@ class SubscriptionController extends Controller
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
Log::error("An error occurred in " . _METHOD_ . ": " . $e->getMessage(), ['exception' => $e]);
|
||||
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
|
||||
|
||||
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'));
|
||||
}
|
||||
}
|
||||
@@ -80,7 +81,8 @@ class SubscriptionController extends Controller
|
||||
return view('Admin.pages.subscriptions.list-of-products', compact('productList'));
|
||||
|
||||
} catch (\Exception $e) {
|
||||
Log::error("An error occurred in " . _METHOD_ . ": " . $e->getMessage(), ['exception' => $e]);
|
||||
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
|
||||
|
||||
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
|
||||
}
|
||||
}
|
||||
@@ -195,7 +197,7 @@ class SubscriptionController extends Controller
|
||||
$stripeId = $request->stripe_id;
|
||||
$timestamp = $request->timestamp_to_update;
|
||||
|
||||
|
||||
|
||||
$updateSubscription = $stripe->subscriptions->update(
|
||||
$stripeId,
|
||||
['trial_end' => $timestamp] //8 RD aUG
|
||||
@@ -303,7 +305,8 @@ class SubscriptionController extends Controller
|
||||
|
||||
|
||||
} catch (\Exception $e) {
|
||||
Log::error("An error occurred in " . _METHOD_ . ": " . $e->getMessage(), ['exception' => $e]);
|
||||
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
|
||||
|
||||
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'));
|
||||
// return redirect()->back()->with(['error' => "Something went wrong while subscription!" . $e->getMessage()]);
|
||||
|
||||
@@ -368,9 +371,9 @@ class SubscriptionController extends Controller
|
||||
|
||||
} catch (\Exception $e) {
|
||||
DB::rollBack();
|
||||
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
|
||||
|
||||
return redirect()->back()->with(['error' => "Something went wrong while cancelling subscription!" . $e->getMessage()]);
|
||||
// Log::error("An error occurred in " . _METHOD_ . ": " . $e->getMessage(), ['exception' => $e]);
|
||||
// return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user