diff --git a/app/Http/Controllers/EventCheckoutController.php b/app/Http/Controllers/EventCheckoutController.php index 5dbf1f6e..633ccc32 100644 --- a/app/Http/Controllers/EventCheckoutController.php +++ b/app/Http/Controllers/EventCheckoutController.php @@ -186,14 +186,14 @@ class EventCheckoutController extends Controller $paymentGateway = $activeAccountPaymentGateway; } else { $activeAccountPaymentGateway = $event->account->getGateway($event->account->payment_gateway_id); - //if no payment gateway configured don't go to the next step and show user error - if (empty($activeAccountPaymentGateway)) { + //if no payment gateway configured and no offline pay, don't go to the next step and show user error + if (empty($activeAccountPaymentGateway) && !$event->enable_offline_payments) { return response()->json([ 'status' => 'error', 'message' => 'No payment gateway configured', ]); } - $paymentGateway = $activeAccountPaymentGateway->payment_gateway; + $paymentGateway = $activeAccountPaymentGateway ? $activeAccountPaymentGateway->payment_gateway : false; } /* @@ -389,7 +389,7 @@ class EventCheckoutController extends Controller break; default: Log::error('No payment gateway configured.'); - return repsonse()->json([ + return response()->json([ 'status' => 'error', 'message' => 'No payment gateway configured.' ]); diff --git a/app/Jobs/SendOrderNotification.php b/app/Jobs/SendOrderNotification.php index 9c23a7c2..5a12704d 100644 --- a/app/Jobs/SendOrderNotification.php +++ b/app/Jobs/SendOrderNotification.php @@ -7,6 +7,7 @@ use App\Models\Order; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; +use Log; class SendOrderNotification extends Job implements ShouldQueue { diff --git a/resources/views/Public/ViewEvent/Partials/EventCreateOrderSection.blade.php b/resources/views/Public/ViewEvent/Partials/EventCreateOrderSection.blade.php index 12bd1272..280de691 100644 --- a/resources/views/Public/ViewEvent/Partials/EventCreateOrderSection.blade.php +++ b/resources/views/Public/ViewEvent/Partials/EventCreateOrderSection.blade.php @@ -159,7 +159,13 @@ @if($event->enable_offline_payments)
- + @if($payment_gateway === false) + {{-- Force offline payment if no gateway --}} + + + @else + + @endif