<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>
<!DOCTYPE html>
<html>
  <head>
    <title><?php echo html_escape($this->payment->duitku->nama);?></title>
    <?php include_once(VIEWPATH. 'includes/head.php'); ?>
  </head>
  <body>
    <?php include_once(VIEWPATH. 'admin/_navbar.php'); ?>
    <div class="container">
      <ul class="breadcrumb">
        <li><a href="<?php echo site_url();?>"><i class="fa fa-home"></i></a></li>
        <li><a href="<?php echo site_url('admin');?>">Admin Panel</a></li>
        <li><a href="<?php echo site_url('admin/payments');?>">Metode Pembayaran</a></li>
        <li class="active"><span><?php echo html_escape($this->payment->duitku->nama);?></span></li>
      </ul>
      <div class="row">
        <div class="col-sm-4 col-md-3">
          <?php
          $params = array(array(
            'title' => html_escape($this->payment->duitku->nama),
            'links' => array(
                array('Overview', site_url('admin/payments/duitku'), 'fa fa-eye', true),
                array('Mutasi', site_url('admin/payments/duitku/mutasi'), 'fa fa-history'),
                array('Settings', site_url('admin/payments/duitku/settings'), 'fa fa-cog'),
            )
          ));
          echo sidebar_menu($params);
          ?>
        </div>
        <div class="col-sm-8 col-md-9">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h3><i class="fa fa-eye"></i> Overview</h3>
            </div>
            <div class="table-responsive">
              <table class="table">
                <tbody>
                  <tr><td style="width: 120px;">Merchant Code</td><td>: <?php echo html_escape($this->payment->duitku->data->merchant_code);?></td></tr>
                  <tr><td style="width: 120px;">API Key</td><td>: <?php echo substr($this->payment->duitku->data->api_key,0,80);?>...</td></tr>
                  <tr><td style="width: 120px;">Saldo</td><td>: <?php echo format_uang2(@$this->payment->duitku->saldo,0);?></td></tr>
                  <tr><td style="width: 120px;">Mutasi</td><td>: <a href="<?php echo site_url('admin/payments/duitku/mutasi');?>"><?php echo $this->db->query("SELECT COUNT(*) AS total FROM mutasi WHERE bank = 'duitku'")->row()->total;?> transaksi</a></td></tr>
                  <tr><td style="width: 120px;">Status</td><td>: <?php echo $this->payment->duitku->status == 'on' ? 'Aktif' : 'Tidak aktif';?></td></tr>
                </tbody>
              </table>
            </div>
            <div class="panel-footer">
              Untuk menggunakan metode pembayaran ini kamu harus terdaftar sebagai merchant <a href="https://duitku.com" class="alert-link" target="_blank">duitku.com</a> dan buatlah project pada akun <strong>Production</strong> kemudian edit <strong>Payment System</strong> dan bebankan semua biaya / fee kepada <strong>Pelanggan</strong>.
            </div>
          </div>
        </div>
      </div>
    </div>
    <?php include_once(VIEWPATH.'includes/foot.php'); ?>
  </body>
</html>