<div class="modal fade backdrop" data-backdrop="false" id="paypal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel"><?= lang('paypal_payment'); ?></h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
       <div class="paypal_payment">
       	<div class="paypalPaymentarea">
       		<img src="<?= base_url('assets/images/payout/paypal.png') ;?>" alt="">
       		<div class="paypalPaymentDetails">
       			<h4><?= !empty(lang('service_name'))?lang('service_name'):"service name" ;?> : <?= $service['title'] ;?></h4>
       			<div class="sellerInfo">
       				<div class="user_info_details">
       					<div class="left_user_info">
       						<img src="<?= base_url($user['thumb']) ;?>" alt="" />
       						<div class="">
       							<h5><?= !empty($user['name'])?$user['name']:$user['username'] ;?></h5>
       							<p><?= $user['designation'] ;?></p>
       						</div>
       					</div>
       					<div class="right_user_info">
       						<a href="<?= base_url($slug) ;?>"><?= !empty(lang('contact'))?lang('contact'):"Contact";?></a>
       					</div>
       				</div>
       			</div>
       		</div>
       	</div>
       <div class="serviceUserForm" id="paypal_login">
       	<!-- userLogin.php -->
      </div>



      <div class="paymentFormarea" style="display:none;">
      	 <form action="<?= isset($paypal['is_paypal_live']) && $paypal['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($paypal['paypal_email']) && !empty($paypal['paypal_email'])?$paypal['paypal_email']:'' ;?>'>
				<input type='hidden'
				name='item_name' value='<?=  html_escape($service['title']);?>'>
				
				<input type='hidden'
				name='item_number' value='1'>

				<input type='hidden'
				name='item_id' value='<?=  $service['id'];?>'>
				
				<input type='hidden'
				name='amount' value='<?=  $service['price'];?>'> 

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

				<input type='hidden'
				name='currency_code' value='<?=  my_currency($service_settings['country_id'],'currency_code');?>'>

				<input type='hidden' name='notify_url' value='<?= base_url('service/paypal_payment/'.$slug.'/'.$service['id'].'?customer_id='.auth('customer_id')) ;?>'>

				<input type='hidden' name='cancel_return'
				value='<?= base_url('service/payment_failed/'.$slug.'?method=paypal&amount='.$service['price']) ;?>'>
				<input type='hidden' name='return'
				value='<?= base_url('service/paypal_payment/'.$slug.'/'.$service['id']) ;?>'>

				<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"?> &nbsp;(<?=  my_currency($service_settings['country_id'],'currency_symbol');?> <?= isset($service['price'])?html_escape($service['price']):'';?> ) <i class="icofont-paypal"></i> </button>
				<?php endif;?>
			</form>
      	</div><!-- paymentFormarea -->

  
       </div>	
      </div>
      
    </div>
  </div>
</div>