<?php
defined('_WPBOOKINGPRO_EXEC') or die;
use WooBooking\CMS\Utilities\Utility;
if(!class_exists("WpBookingPro_PackageBookingController")) {
    /**
     * Class WpBookingPro_PackageBookingController
     */
    class WpBookingPro_PackageBookingController extends woobooking_controller_frontend
    {
        /**
         * @throws Exception
         */
        public function book_now()
        {
            $app = Factory::getApplication();
            $input = Factory::getInput();
            $data = $input->getData();
            $modelPackage = WoobookingModel::getInstance('packageBooking');
            $order = $modelPackage->book_now($data);
            Utility::redirect(Utility::getFrontendGoToLink("payment.paynow", array("order_id" => $order->id)));
        }

    }
}