

<div class="ps-page--single">
    <div class="ps-breadcrumb">
        <div class="container">
            <ul class="breadcrumb">
                <li><a href="<?php echo base_url(); ?>">Home</a></li>
                <li><a href="#">Members</a></li>
                <li><?= $title ?></li>
            </ul>
        </div>
    </div>
</div>
<div class="ps-vendor-dashboard pro" style='margin-top:10px'>
    <div class="container">
        <div class="ps-section__content">
            <?php include "menu-members.php"; ?>
            <div class="row">
                <div class="col-xl-3 col-lg-3 col-md-12 col-sm-12 col-12 ">
                    <?php
                      include "sidebar-members.php";
                    ?><div style='clear:both'><br></div>
                </div>

                <div class="col-xl-9 col-lg-9 col-md-12 col-sm-12 col-12 ">
                    <figure class="ps-block--vendor-status biodata">
                        <?php 
                        $attributes = array('id' => 'formku');
                        echo form_open_multipart('members/donasi?send='.$row['id_donasi'],$attributes); 
                        echo $this->session->flashdata('message'); 
                              $this->session->unset_userdata('message');
                              if ($donasi->num_rows()>=1){
                                foreach ($donasi->result_array() as $row) {
                                  echo "<a class='url-surat' href='#'>
                                          <div class='col-sm mb-3' style='padding:5px 10px'>
                                          <p>Nominal</p>
                                          <h3>Rp ".rupiah($row['nominal_donasi'])."</h3>
                                          
                                          <div style='clear:both'><br></div>
                                          <p>Pilih Metode Bayar</p>";
                                                  if (config('ipaymu_aktif')=='Y'){
                                                    echo "<a target='_BLANK' style='border-left:1px solid' class='ps-btn ps-btn--outline ps-btn--fullwidth mb-2 ipaymu' href='".base_url()."konfirmasi/donasi?inv=$row[id_donasi_masuk]'>Bayar via Ipaymu <br><small>(VA, Gopay, OVO, Alfamart dll)</small></a>";
                                                  }else{
                                                    echo "<a style='border-left:1px solid' class='ps-btn ps-btn--outline ps-btn--fullwidth mb-2 ipaymu' href='#' onclick=\"return confirm('Pembayaran via Ipaymu tidak aktif!')\">Bayar via Ipaymu <br><small>(VA, Gopay, OVO, Alfamart dll)</small></a>";
                                                  }
                                                  
                                                  if (config('tripay_aktif')=='Y'){
                                                    echo "<a style='border-left:1px solid' target='_BLANK' class='ps-btn ps-btn--outline ps-btn--fullwidth mb-2 tripay' data-id='4' data-id1='$row[id_donasi_masuk]' href='#'>Bayar via Tripay <br><small>(VA, Gopay, OVO, Alfamart dll)</small></a>";
                                                  }else{
                                                    echo "<a style='border-left:1px solid' class='ps-btn ps-btn--outline ps-btn--fullwidth mb-2 ipaymu' href='#' onclick=\"return confirm('Pembayaran via Tripay tidak aktif!')\">Bayar via Tripay <br><small>(VA, Gopay, OVO, Alfamart dll)</small></a>";
                                                  }
                                                  
                                                  if (config('xendit_aktif')=='Y'){
                                                    echo "<a style='border-left:1px solid' target='_BLANK' class='ps-btn ps-btn--outline ps-btn--fullwidth mb-2 xendit' href='".base_url()."konfirmasi/donasi_xendit?inv=$row[id_donasi_masuk]'>Bayar via Xendit <br><small>(VA, Gopay, OVO, Alfamart dll)</small></a>";
                                                  }else{
                                                    echo "<a style='border-left:1px solid' class='ps-btn ps-btn--outline ps-btn--fullwidth mb-2 ipaymu' href='#' onclick=\"return confirm('Pembayaran via Xendit tidak aktif!')\">Bayar via Xendit <br><small>(VA, Gopay, OVO, Alfamart dll)</small></a>";
                                                  }
                                              echo "
                                          </div>
                                        </a>
                                          <div style='clear:both'></div>";
                                }
                              }
                        echo form_close();
                        ?>
                    </figure>
                </div>
              
            </div>
        </div>
    </div>
</div>

<div style='z-index: 9999;' class="modal fade bs-example-modal-lg" id="myModalDetail" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered">
      <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title h4" style='font-size:1.7rem' id="myModalLabel">Pilih Metode Pembayaran</h5>
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
            </div>
          <div class="modal-body">
            <div class="content-body"></div>
          </div>
      </div>
  </div>
</div>

<script type="text/javascript">
    $(function(){
        $(document).on('click','.tripay',function(e){
            e.preventDefault();
            $("#myModalDetail").modal('show');
            $.post("<?php echo site_url()?>konfirmasi/pembayaran",
                {id:$(this).attr('data-id'),trx:$(this).attr('data-id1')},
                function(html){
                    //console.log(html);
                    $(".content-body").html(html);
                }   
            );
        });
    });
</script>



