<?php $mercado = json_decode($settings['mercado_config'],true); ?>
<?php  if(!empty($mercado['access_token'])):?>
<div class="payment_content text-center">
	<div class="payment_icon payment">
		<img src="<?php echo base_url('assets/images/payout/mercado.png'); ?>" alt="">
	</div>
	<div class="payment_details">
		<h4> <?= isset($u_info['username'])?html_escape($u_info['username']):'';?></h4>
		<div class="">
			<h2><?= get_currency('icon');?> <?= isset($package['price'])?html_escape($package['price']):'';?> / <?= !empty(lang($package['type']))?lang($package['type']):$package['type']?></h2>
			<p><b><?= lang('package_name'); ?> : </b> <?= html_escape($package['type_name']);?></p>
		</div>
	</div>

	<?php include 'couponForm.php'; ?>

	<?php if(is_demo()==0): ?>
		<?php $mercado = $this->payment_m->mercado_init($slug,$package['slug'],$total_price); ?>
		<a href="<?= prep_url($mercado['init']); ?>" class="btn btn-success buy_now"><?= !empty(lang('pay_now'))?lang('pay_now'):"Pay Now"?></a>
	<?php endif;?>
</div><!-- payment_content -->
<?php else: ?>
	<div class="payment_content text-center">
		<h4><?= !empty(lang('credentials_not_found'))?lang('credentials_not_found'):"Credentials not found" ;?></h4>
	</div>
<?php endif;?>