<?php
include_once PJ_VIEWS_PATH . 'pjFront/elements/header.php';
?>
<div class="container-fluid pjMbContainer pjMbContent">
	<div class="pjCsCartContent">
		<h2 class="text-center"><?php __('front_order_completed');?></h2>
		<br/>
		<div class="row">
			<div class="col-sm-12">
				<?php
				if (isset($tpl['get']['payment_method']))
				{
					$status = __('front_order_statuses', true);
					switch ($tpl['get']['payment_method'])
					{
						case 'paypal':
							?><p class="text-success text-center"><?php echo $status[0]; ?></p><?php
							if (pjObject::getPlugin('pjPaypal') !== NULL)
							{
								$controller->requestAction(array('controller' => 'pjPaypal', 'action' => 'pjActionForm', 'params' => $tpl['params']));
							}
							break;
						case 'authorize':
							?><p class="text-success text-center"><?php echo $status[0]; ?></p><?php
							if (pjObject::getPlugin('pjAuthorize') !== NULL)
							{
								$controller->requestAction(array('controller' => 'pjAuthorize', 'action' => 'pjActionForm', 'params' => $tpl['params']));
							}
							break;
						case 'bank':
							?><p class="text-success text-center"><?php echo $status[1]; ?></p><?php
							break;
						case 'creditcard':
						case 'cash':
						default:
							?><p class="text-success text-center"><?php echo $status[1]; ?></p><?php
					}
				}
				?>
			</div><!-- /.col-sm-12 -->
			<?php
			if($tpl['get']['payment_method'] == 'bank' || $tpl['get']['payment_method'] == 'creditcard' || $tpl['get']['payment_method'] == 'cash' || $tpl['option_arr']['o_payment_disable'] == 'Yes') 
			{
				?>
				<div class="form-group">
					<div class="col-sm-12 text-center">
						<input type="button" class="btn btn-primary pjCsBtnStartOver" value="<?php __('front_btn_start_over')?>" />
					</div>
				</div>
				<?php
			} 
			?>
		</div><!-- /.row -->
	</div>
</div>