Fix issue where widgets would refresh to full site on timeout (closes #235)

This commit is contained in:
Dave Earley 2016-11-06 21:56:35 +00:00
parent f3635841f7
commit e1956b2da9
1 changed files with 2 additions and 1 deletions

View File

@ -239,7 +239,8 @@ class EventCheckoutController extends Controller
$order_session = session()->get('ticket_order_' . $event_id);
if (!$order_session || $order_session['expires'] < Carbon::now()) {
return redirect()->route('showEventPage', ['event_id' => $event_id]);
$route_name = $this->is_embedded ? 'showEmbeddedEventPage' : 'showEventPage';
return redirect()->route($route_name, ['event_id' => $event_id]);
}
$secondsToExpire = Carbon::now()->diffInSeconds($order_session['expires']);