event_id) { JR::message(JR::error, ['wrong_event' => 1]); } if(empty($_GET['validated_count'])) { if ($booking->validated_count < $booking->tickets_count) { JR::message(JR::done, $booking->responseData()); } else { JR::message(JR::done, $booking->responseData()); } } else { $count = $booking->validated_count ?? 0; $booking->validated_count = $count + $_GET['validated_count']; $booking->last_validation_time = date('Y-m-d H:i:s'); $booking->save(); JR::message(JR::done, ['ready' => 1]); } } else { JR::message(JR::not_authenticated); }