Your IP : 216.73.216.84


Current Path : /home/h/e/l/helpink/www/components/com_jbusinessdirectory/views/payment/
Upload File :
Current File : /home/h/e/l/helpink/www/components/com_jbusinessdirectory/views/payment/view.html.php

<?php
/**
 * @package    J-BusinessDirectory
 *
 * @author     CMSJunkie http://www.cmsjunkie.com/
 * @copyright  Copyright (C) 2007 - 2022 CMSJunkie. All rights reserved.
 * @license    https://www.gnu.org/licenses/agpl-3.0.en.html
 */
defined('_JEXEC') or die('Restricted access');


JBusinessUtil::includeValidation();

class JBusinessDirectoryViewPayment extends JViewLegacy {
	public function __construct() {
		parent::__construct();
	}
	
	
	public function display($tpl = null) {
		$user = JBusinessUtil::getUser();
		$layout = JFactory::getApplication()->input->get('layout', null);
		if (isset($layout)) {
			$tpl = $layout;
		}
		
		$this->order = $this->get('Order');

		if ($layout != 'redirect' && (empty($this->order) || ($this->order->user_id != $user->id && $this->order->user_id != 0))) {
			$app = JFactory::getApplication();
			$app->redirect(JBusinessUtil::getWebsiteURL(true));
		}
		
		$this->paymentMethods = PaymentService::getPaymentProcessors(true, JBD_PACKAGES, DEFAULT_PAYMENT_PROCESSOR);
		$this->paymentMethods = JBusinessUtil::filterPaymentMethods($this->order, $this->paymentMethods);
		
		$this->state = $this->get('State');
		$this->appSettings = JBusinessUtil::getApplicationSettings();
		$this->companyId = JFactory::getApplication()->input->get("companyId");
		$this->discount_code = JFactory::getApplication()->input->get("discount_code", "");
		
		parent::display($tpl);
	}
	
	public function getPaymentMethodFormHtml($paymentMethod) {
		return JText::_("LNG_PAYMENT_REDIRECT");
	}
}