<?php
defined('_WPBOOKINGPRO_EXEC') or die;
if(!class_exists("WpBookingPro_PaymentController")) {
    /**
     * Class WpBookingPro_PaymentController
     */
    class WpBookingPro_PaymentController extends woobooking_controller_frontend
    {
        /**
         * @param $order_id
         * @throws Exception
         */
        public function pay_now_by_order_id($order_id)
        {
            $orderModel = WoobookingModel::getInstance('order');
            $order = $orderModel->getItem($order_id);
            $paymentModel = WoobookingModel::getInstance('payment');
            $paymentPlugin = $paymentModel->getPaymentPlugin($order->payment_id);
            $app = Factory::getApplication();
            $paymentPlugin->onAfterOrderConfirm($order);
        }

    }
}