<div class="payment_content text-center">
	<div class="payment_icon payment">
		<img src="<?php echo base_url('assets/images/paypal.png'); ?>" alt="">
	</div>
	<?php $total_price = $package['price']; ?>
	<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><?= !empty(lang('package_name'))?lang('package_name'):"Package Name"?> : </b> <?= html_escape($package['type_name']);?></p>
		</div>

		<p class="payment_text">* <?= !empty(lang('payment_by'))?lang('payment_by'):"Payment via"?> <i class="fa fa-cc-paypal fa-2x"></i></p>
	</div>

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


	<form action="<?= isset($setting['is_paypal_live']) && $setting['is_paypal_live']==1?"https://www.paypal.com/cgi-bin/webscr":"https://www.sandbox.paypal.com/cgi-bin/webscr" ;?>"
		method="post" target="_top">
		<!-- csrf token -->
		<input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>" value="<?= $this->security->get_csrf_hash(); ?>">
		<input type='hidden' name='business'
		value='<?= isset($setting['paypal_email']) && !empty($setting['paypal_email'])?$setting['paypal_email']:'' ;?>'>
		<input type='hidden'
		name='item_name' value='<?=  html_escape($package['type_name']);?>'>

		<input type='hidden'
		name='item_number' value='1'>

		<input type='hidden'
		name='amount' value='<?=  $total_price;?>'> 

		<input type='hidden'
		name='no_shipping' value='1'>

		<input type='hidden'
		name='currency_code' value='<?= get_currency('currency_code') ;?>'>

		<input type='hidden' name='notify_url' value='<?= base_url('payment/success/'.$slug.'/'.$account_type) ;?>'>

		<input type='hidden' name='cancel_return'
		value='<?= base_url('payment/cancel') ;?>'>

		<input type='hidden' name='return'
		value='<?= base_url('payment/success/'.$slug.'/'.$account_type) ;?>'>

		<input type="hidden" name="cmd" value="_xclick">
		<?php if(is_demo()==0): ?>
			<button

			type="submit" name="pay_now" id="pay_now" class="btn btn-success pay_now"
			> <?= !empty(lang('pay_now'))?lang('pay_now'):"Pay Now"?> </button>
		<?php endif;?>
	</form>

</div><!-- payment_content -->