<?php
/**
 * @version		3.0.0
 * @package		JomLand TicketCenter
 * @copyright	Copyright (C) 2010 JomLand.com. All rights reserved.
 * @link 		www.jomland.com
 * @license		GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');

jimport('joomla.html.pane');

require 'jlticketpayment.php';
class JLTicketCenterCash extends JLTicketPayment
{

	public $payment_params = array('msg'=>'Our customer care would contact you soon.');

	private $payment_data = array();


	private $returnURL;
	private $cancelURL;

	function __construct(){
		$this->returnURL = JURI::base()."index.php?option=com_jlticketcenter&view=checkout&step=pay_comp";
		$this->cancelURL = JURI::base()."index.php?option=com_jlticketcenter&view=checkout&step=pay_cancel";

		if (session_id() == "")
		session_start();
	}

	function buildPanel($payment_class){

		$payment_config = $this->getConfig($payment_class);

        $output = JHtml::_('tabs.start', 'slider-', array('useCookie' => 1));
        $output .= JHtml::_('tabs.panel', JText::_('Parameters'), 'panel1');
        $output .='<div id="payment_params">'."\n";

		$output .='<tr>'."\n";
		$output .='<td width="100" class="key">'."\n";
		$output .='<label for="published">'.JText::_('Massage').'</label>'."\n";
		$output .='</td>'."\n";
		$output .='<td>'."\n";
		$output .= '<input name ="params[msg]" value="'.$payment_config->msg.'" size="80"/>';

		$output .='</td>'."\n";
		$output .='</tr>'."\n";

		$output .='</div>';
        $output .= JHtml::_('tabs.end');

		return $output;
	}//EOF buildPanel


	function pross_payment($data){

		$mainframe = JFactory::getApplication();

		$payment_config = $this->getConfig('phone');
		$msg =$payment_config->msg;


		$session = JFactory::getSession();
		$order_id = $session->set('jlticketcenter_order_id',$data['order_id']);

		$url= JURI::base()."index.php?option=com_jlticketcenter&view=order";

		$mainframe->redirect($url, $msg);

		return;
	}// EOF pross
}//EOC