From eaa23db9db0362a1a188d753892f8b9fd4a76d2c Mon Sep 17 00:00:00 2001 From: merdan Date: Thu, 9 Jan 2020 17:32:12 +0500 Subject: [PATCH] payment check --- app/Http/Controllers/EventCheckoutController.php | 1 + app/Models/Event.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/EventCheckoutController.php b/app/Http/Controllers/EventCheckoutController.php index c624232d..a1d98c23 100644 --- a/app/Http/Controllers/EventCheckoutController.php +++ b/app/Http/Controllers/EventCheckoutController.php @@ -623,6 +623,7 @@ class EventCheckoutController extends Controller $response = $this->gateway->getPaymentStatus($transaction_data[0]['orderId']); + //todo try catch for connection errors if ($response->isSuccessfull()) { session()->push('ticket_order_' . $event_id . '.transaction_id', $response->getPaymentReferenceId()); return $this->completeOrder($event_id, false); diff --git a/app/Models/Event.php b/app/Models/Event.php index 47335736..124ae87e 100644 --- a/app/Models/Event.php +++ b/app/Models/Event.php @@ -485,8 +485,8 @@ ICSTemplate; if(isset($start_date) && isset($end_date)) $query->where('start_date','<',$end_date) ->where('end_date','>',$start_date); - else - $query->where('end_date','>',Carbon::now(config('app.timezone'))); +// else +// $query->where('end_date','>',Carbon::now(config('app.timezone'))); return $query->where('is_live',1) ->withCount(['images as image_url' => function($q){