<section id="profile" class="content_wrapper innerPage">
    <div class="container clearfix">
    
         <div class="invoice-row">
          <div class="orders tab-div" >
           <h3><?php echo getLang('credit_cards'); ?> </h3>
           <input type="hidden" id="baseUrl" value="<?php echo base_url();?>">
           <table style="width:100%" id="newCardAddTable">
              <thead>
                <tr>
                  <td><?php echo getLang('Card_Number'); ?></td>
                  <td><?php echo getLang('Expiration__MM/YY'); ?></td>
                  <td><?php echo getLang('Default'); ?></td>
                  <td><?php echo getLang('Action'); ?></td>
                </tr>
              </thead>
              
              <tbody>
                <?php if($card_infos) { 
                      foreach ($card_infos as $key => $value) {
                        $expYr = substr($value['saferpay_exp'], -2);
                        $expMth = sprintf("%02d", substr($value['saferpay_exp'], 0, -2));
                        $saferpay_exp = $expMth.'/'.$expYr;
                ?>
                    <tr>
                      <td><?php echo $value['cc_pan']; ?></td>
                      <td><?php echo $saferpay_exp; ?></td>
                      <td><?php if($value['is_default']==1){ echo '<i class="fa fa-check-circle-o active"></i>';} ?></td>
                      <td><?php if($value['is_default']==0){ ?><a href="<?php echo base_url('profile/make_default_card/'.$value['id']); ?>" onclick="return confirm('Are you sure to make it default?');" title="make default card"><i class="fa fa-check make-active"></i></a><?php } ?></td>
                    </tr>
                <?php } } else { ?>
                    <tr>
                      <td colspan="4" style="width: 100%;"><?php echo getLang('No_record_found'); ?></td>
                    </tr>
                <?php } ?>
              </tbody>
             
            </table>
            </div> 
            <a href="javascript:void(0)" class="modal_popup newCardAdd btn_gold" data-id="newCardAdd"><?php echo getLang('Add_new_card'); ?></a>
         </div>
    </div>
</section>
            
<section class="all_popups">
         <div class="modal_container register" id="newCardAdd_modal" >
            <span class="modal_close"><i class="fa  fa-times-circle-o"></i></span>
               <div id="" class="">
                  <form action="" method="POST" id="newCardAdd-form" >
                  
                  <div id="" class="" >
                          <div class="center">
                             <p class="text_white allcaps"><?php echo getLang('Payment_Method'); ?></p>
                          </div>
                          <div class="center">
                          <span class="newCardAdd-errors" style="color:red;"></span>
                        <span class="payment_details"></span>
                         <p class="ssl_text"><img src="<?php echo  base_url().'assets/images/ssl-icon.png'; ?>">
                          <?php echo getLang('To_guarantee_for_maximum_safety__your_data'); ?>.
                         </p>
                          <div class="form_group">
                    
                          <label><?php echo getLang('Card_Holder'); ?></label>
                          <input type="text" size="20" name="card_holder" id="card_holder" placeholder="<?php echo getLang('Enter_Holder_name'); ?>">
                        
                      </div>

                      <div class="form_group">
                        
                          <label><?php echo getLang('Card_Number'); ?></label>
                          <input type="text" size="20" name="card_number" id="card_number" placeholder="<?php echo getLang('Enter_Card_Number'); ?>">
                        
                      </div>
                     
                      <div class="form_group doubleinput clearfix">
                                   
                                      <label><?php echo getLang('Expiration__MM/YY'); ?></label>
                                      <!--<input type="text" size="2" data-stripe="exp_month" placeholder="Enter Month">-->
                                      <select name="exp_month" id="exp_month">
                                            <option value=""><?php echo getLang('Month'); ?></option>
                                            <option value="1">Jan</option>
                                            <option value="2">Feb</option>
                                            <option value="3">Mar</option>
                                            <option value="4">Apr</option>
                                            <option value="5">May</option>
                                            <option value="6">Jun</option>
                                            <option value="7">Jul</option>
                                            <option value="8">Aug</option>
                                            <option value="9">Sep</option>
                                            <option value="10">Oct</option>
                                            <option value="11">Nov</option>
                                            <option value="12">Dec</option>
                                      </select>
                                      <select name="exp_year" id="exp_year">
                                         <option value=""><?php echo getLang('Year'); ?></option>
                                            <?php for($i=date('Y');$i<date('Y')+50;$i++){ ?>
                                               <option value="<?php echo $i; ?>"><?php echo $i; ?></option>
                                            <?php } ?>  
                                     </select>
                                   <!--<input type="text" size="2" data-stripe="exp_year" placeholder="Enter Year">-->
                                 </div>
                                
                                 <div class="form_group cvc">
                               
                                     <label><?php echo getLang('CVC'); ?> <?php echo getLang('3_digits'); ?></label>
                                     <input type="text" size="4" name="card_cvc" id="card_cvc" placeholder="<?php echo getLang('Enter_CVC'); ?>">
                                  
                                 </div>
                                <div class="text_center margin_top30">
                             <button type="submit" class="btn_gold newCardAdd_submit" id=""><?php echo getLang('Save'); ?></button>
                          </div>
                      <!--<input type="submit" class="bigbutton" value="Submit Payment">-->
                        </div>
                       </div>
                </form> 
               
            </div>
         </div>
      <div class="modalmask"></div>
</section>  
