/** * Display */ public function display($tpl = null) { // determine return view $view = 'booking'; $booking = $this->get('Booking'); if ($booking) { // processing status if ($booking->booking_status >= 40) { $view = 'confirm'; } // confirmed status if ($booking->booking_status < 20) { $view = 'confirmed'; } } $layout = new JLayoutFile('chclient_return', JPATH_ROOT . '/components/com_chclient/layouts'); CHLib::rawExit($layout->render(['view' => $view])); }
/** * Asyncronous email notification * External operation performed basically on remote card form submission */ function async_notification() { // load model $model = $this->getModel('Booking'); // execute action $response = $model->asyncNotification(); // exit app CHLib::rawExit($response); }
/** * Print Voucher */ private function printVoucher() { // render and quit app CHLib::rawExit(CHClientDisplay::renderVoucher($this->booking)); }