<?php if (isset($is_tagihan)):?>
<!-- Tagihan -->
<?php if ($trx->tg_status == 'sukses'):?>
<div class="panel-body">
  <div class="alert alert-success">Pembayaran berhasil diselesaikan.</div>
</div>
<?php else:?>
<div class="panel-body">
  <div class="table-responsive">
    <table class="table table-striped">
      <tbody>
        <tr><td>IDR</td><td><?php echo format_uang2($trx->tg_amount, 0, $this->payment->fasapay_id->template);?></td></tr>
      </tbody>
    </table>
  </div>
  <div>
    <ul style="padding-left: 15px;">
      <li>Pembayaran berlaku s/d <?php echo format_tanggal($trx->tg_tanggal + (3600 * $this->system->set['jam_pembayaran']));?>.</li>
    </ul>
  </div>
</div>
<form action="https://sci.fasapay.com/" method="POST">
  <input type="hidden" name="fp_acc" value="<?php echo html_escape($this->payment->fasapay_id->data->nomor_rekening);?>"/>
  <input type="hidden" name="fp_store" value="<?php echo html_escape($this->payment->fasapay_id->data->nama_rekening);?>"/>
  <input type="hidden" name="fp_item" value="<?php echo html_escape($this->system->produk->{$trx->op_produk}->nama.' '.$trx->op_nama.' '.$trx->vo_nominal);?>"/>
  <input type="hidden" name="fp_amnt" value="<?php echo $trx->tg_amount;?>"/>
  <input type="hidden" name="fp_fee_mode" value="FiS"/>
  <input type="hidden" name="fp_merchant_ref" value="<?php echo $trx->tg_note;?>"/>
  <input type="hidden" name="trx_id" value="TAG<?php echo $trx->tg_id;?>"/>
  <input type="hidden" name="fp_success_url" value="<?php echo site_url('akun/riwayat/transaksi/tagihan/view/'.$trx->tg_id);?>"/>
  <input type="hidden" name="fp_status_url" value="<?php echo site_url('payment/fasapay_id/tagihan/'.$trx->tg_id);?>"/>
  <input type="hidden" name="fp_fail_url" value="<?php echo site_url('akun/riwayat/transaksi/tagihan/view/'.$trx->tg_id);?>"/>
  <input type="hidden" name="fp_currency" value="IDR"/>
  <div class="panel-footer">
    <button type="submit" class="btn btn-primary btn-block"><i class="fa fa-money"></i> Bayar Sekarang</button>
  </div>
</form>
<?php endif;?>
<!-- End -->
<?php else:?>
<!-- Transaksi -->
<?php if ($trx->tr_status_pembayaran == 'sukses'):?>
<div class="panel-body">
  <div class="alert alert-success">Pembayaran berhasil diselesaikan.</div>
</div>
<?php else:?>
<div class="panel-body">
  <div class="table-responsive">
    <table class="table table-striped">
      <tbody>
        <tr><td>IDR</td><td><?php echo format_uang2($trx->tr_harga, 0, $this->payment->fasapay_id->template);?></td></tr>
      </tbody>
    </table>
  </div>
  <div>
    <ul style="padding-left: 15px;">
      <li>Pembayaran berlaku s/d <?php echo format_tanggal($trx->tr_tanggal + (3600 * $this->system->set['jam_pembayaran']));?>.</li>
    </ul>
  </div>
</div>
<form action="https://sci.fasapay.com/" method="POST">
  <input type="hidden" name="fp_acc" value="<?php echo html_escape($this->payment->fasapay_id->data->nomor_rekening);?>"/>
  <input type="hidden" name="fp_store" value="<?php echo html_escape($this->payment->fasapay_id->data->nama_rekening);?>"/>
  <input type="hidden" name="fp_item" value="<?php echo html_escape($this->system->produk->{$trx->op_produk}->nama.' '.$trx->op_nama.' '.$trx->vo_nominal);?>"/>
  <input type="hidden" name="fp_amnt" value="<?php echo $trx->tr_harga;?>"/>
  <input type="hidden" name="fp_fee_mode" value="FiS"/>
  <input type="hidden" name="fp_merchant_ref" value="<?php echo $trx->tr_id_pembayaran;?>"/>
  <input type="hidden" name="trx_id" value="TRX<?php echo $trx->tr_id;?>"/>
  <input type="hidden" name="fp_success_url" value="<?php echo site_url('history/view/'.$trx->tr_id);?>"/>
  <input type="hidden" name="fp_status_url" value="<?php echo site_url('payment/fasapay_id/trx/'.$trx->tr_id);?>"/>
  <input type="hidden" name="fp_fail_url" value="<?php echo site_url('history/view/'.$trx->tr_id);?>"/>
  <input type="hidden" name="fp_currency" value="IDR"/>
  <div class="panel-footer">
    <button type="submit" class="btn btn-primary btn-block"><i class="fa fa-money"></i> Bayar Sekarang</button>
  </div>
</form>
<?php endif;?>
<!-- End -->
<?php endif;?>