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