Revert "Fix the view"

This commit is contained in:
iBNu Maksum 2024-08-07 09:32:01 +07:00 committed by GitHub
parent 9720822c79
commit d35c7080d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 83 additions and 118 deletions

View File

@ -1,122 +1,79 @@
{include file="sections/header.tpl"}
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="panel panel-primary mb-3">
<div class="row">
<div class="col-sm-5">
<div class="panel panel-hovered mb20 panel-primary">
<div class="panel-heading">
{$pg['id']}
{$pg['gateway_trx_id']}
</div>
<div class="panel-body">
<ul class="list-group list-group-flush">
<ul class="list-group list-group-unbordered">
<li class="list-group-item">
<b>Gateway trx id</b>
<span class="float-end">{$pg['gateway_trx_id']}</span>
<b>TRX ID</b> <span class="pull-right">&nbsp;{$pg['id']}&nbsp;</span>
</li>
<li class="list-group-item">
<b>{Lang::T('Invoice')}</b>
<span class="float-end">
<a href="{$_url}reports/activation&q={$pg['trx_invoice']}" class="text-dark">{$pg['trx_invoice']}</a>
</span>
<b>{Lang::T('Invoice')}</b> <span class="pull-right">&nbsp;
<a href="{$_url}reports/activation&q={$pg['trx_invoice']}" class="text-black">{$pg['trx_invoice']}</a>
&nbsp;</span>
</li>
<li class="list-group-item">
<b>{Lang::T('Status')}</b>
<span class="float-end">
{if $pg['status'] == 1}UNPAID{elseif $pg['status'] == 2}PAID{elseif $pg['status'] == 3}FAILED{else}CANCELED{/if}
</span>
<b>{Lang::T('Status')}</b> <span
class="pull-right">&nbsp;{if $pg['status'] == 1}UNPAID{elseif $pg['status'] == 2}PAID{elseif $pg['status'] == 3}FAILED{else}CANCELED{/if}&nbsp;</span>
</li>
<li class="list-group-item">
<b>{Lang::T('Username')}</b>
<span class="float-end">
<a href="{$_url}customers/viewu/{$pg['username']}" class="text-dark">{$pg['username']}</a>
</span>
<span class="pull-right">&nbsp;<a href="{$_url}customers/viewu/{$pg['username']}" class="text-black">{$pg['username']}</a>&nbsp;</span>
</li>
<li class="list-group-item">
<b>{Lang::T('Plan Name')}</b>
<span class="float-end">{$pg['plan_name']}</span>
<b>{Lang::T('Plan Name')}</b> <span class="pull-right">&nbsp;{$pg['plan_name']}&nbsp;</span>
</li>
<li class="list-group-item">
<b>{Lang::T('Routers')}</b>
<span class="float-end">{$pg['routers']}</span>
<b>{Lang::T('Routers')}</b> <span class="pull-right">&nbsp;{$pg['routers']}&nbsp;</span>
</li>
<li class="list-group-item">
<b>{Lang::T('Price')}</b>
<span class="float-end">{Lang::moneyFormat($pg['price'])}</span>
<b>{Lang::T('Price')}</b> <span
class="pull-right">&nbsp;{Lang::moneyFormat($pg['price'])}&nbsp;</span>
</li>
<li class="list-group-item">
<b>{Lang::T('Payment Link')}</b>
<span class="float-end">
{if $pg['pg_url_payment']}
<a href="{$pg['pg_url_payment']}" target="_blank" class="btn btn-outline-secondary btn-sm" rel="noopener noreferrer">click here</a>
{/if}
</span>
<b>{Lang::T('Payment Link')}</b> <span class="pull-right">&nbsp;{if $pg['pg_url_payment']}
<a href="{$pg['pg_url_payment']}" target="_blank" class="btn btn-xs btn-default"
rel="noopener noreferrer">open</a>
{/if}&nbsp;</span>
</li>
<li class="list-group-item">
<b>{Lang::T('Channel')}</b>
<span class="float-end">{$pg['payment_method']} - {$pg['payment_channel']}</span>
<b>{Lang::T('Channel')}</b> <span class="pull-right">&nbsp;{$pg['payment_method']} -
{$pg['payment_channel']}&nbsp;</span>
</li>
<li class="list-group-item">
<b>{Lang::T('Created')}</b>
<span class="float-end">{if $pg['created_date'] != null}{Lang::dateTimeFormat($pg['created_date'])}{/if}</span>
<b>{Lang::T('Created')}</b> <span
class="pull-right">&nbsp;{if $pg['created_date'] != null}{Lang::dateTimeFormat($pg['created_date'])}{/if}&nbsp;</span>
</li>
<li class="list-group-item">
<b>{Lang::T('Expired')}</b>
<span class="float-end">{if $pg['expired_date'] != null}{Lang::dateTimeFormat($pg['expired_date'])}{/if}</span>
<b>{Lang::T('Expired')}</b> <span
class="pull-right">&nbsp;{if $pg['expired_date'] != null}{Lang::dateTimeFormat($pg['expired_date'])}{/if}&nbsp;</span>
</li>
<li class="list-group-item">
<b>{Lang::T('Paid')}</b>
<span class="float-end">{if $pg['paid_date'] != null}{Lang::dateTimeFormat($pg['paid_date'])}{/if}</span>
<b>{Lang::T('Paid')}</b> <span
class="pull-right">&nbsp;{if $pg['paid_date'] != null}{Lang::dateTimeFormat($pg['paid_date'])}{/if}&nbsp;</span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-primary mb-3">
<div class="panel panel-hovered mb20 panel-primary">
<div class="panel-heading">
Response
</div>
<div class="panel-body">
{if $pg['pg_paid_response'] != null}
{assign var='paid_response' value=json_decode($pg['pg_paid_response'], true)}
<table class="table table-bordered">
<thead>
<tr>
<th>Key</th>
<th>Value</th>
</tr>
</thead>
<tbody>
{foreach from=$paid_response key=k item=v}
{if is_array($v)}
{foreach from=$v key=vk item=vv}
{if is_array($vv)}
{foreach from=$vv key=vvk item=vvv}
<tr>
<td>{$k} - {$vk} - {$vvk}</td>
<td>{$vvv|json_encode}</td>
</tr>
{/foreach}
{else}
<tr>
<td>{$k} - {$vk}</td>
<td>{$vv|json_encode nofilter}</td>
</tr>
{/if}
{/foreach}
{else}
<tr>
<td>{$k}</td>
<td>{if is_array(json_decode($v, true))}{$v|json_encode}{else}{$v nofilter}{/if}</td>
</tr>
{/if}
{/foreach}
</tbody>
</table>
{/if}
Response when request payment
</div>
<pre class="panel-body p-1">{if $pg['pg_request'] != null}{Lang::jsonArray2text(json_decode($pg['pg_request'], true))}{/if}</pre>
</div>
<div class="panel panel-hovered mb20 panel-primary">
<div class="panel-heading">
Response when payment PAID
</div>
<pre class="panel-body p-1">{if $pg['pg_request'] != null}{Lang::jsonArray2text(json_decode($pg['pg_paid_response'], true))}{/if}</pre>
</div>
{include file="sections/footer.tpl"}

View File

@ -17,12 +17,16 @@
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>TRX ID</th>
<th>PG ID</th>
<th>{Lang::T('Username')}</th>
<th>{Lang::T('Plan Name')}</th>
<th>{Lang::T('Routers')}</th>
<th>{Lang::T('Price')}</th>
<th>{Lang::T('Payment Link')}</th>
<th>{Lang::T('Channel')}</th>
<th>{Lang::T('Created')}</th>
<th>{Lang::T('Expired')}</th>
<th>{Lang::T('Paid')}</th>
<th>{Lang::T('Invoice')}</th>
<th>{Lang::T('Status')}</th>
@ -31,11 +35,13 @@
<tbody>
{foreach $pgs as $pg}
<tr class="{if $pg['status'] == 1}warning{elseif $pg['status'] == 2}success{else}danger{/if}">
<td>{$pg['id']}</td>
<td><a href="{$_url}paymentgateway/audit-view/{$pg['id']}"
class="text-black">{$pg['id']}</a></td>
class="text-black">{$pg['gateway_trx_id']}</a></td>
<td><a href="{$_url}customers/viewu/{$pg['username']}" class="text-black">{$pg['username']}</a>
</td>
<td>{$pg['plan_name']}</td>
<td>{$pg['routers']}</td>
<td>{Lang::moneyFormat($pg['price'])}</td>
<td>
{if $pg['pg_url_payment']}
@ -43,7 +49,9 @@
rel="noopener noreferrer">open</a>
{/if}
</td>
<td>{$pg['payment_method']} - {$pg['payment_channel']}</td>
<td>{if $pg['created_date'] != null}{Lang::dateTimeFormat($pg['created_date'])}{/if}</td>
<td>{if $pg['expired_date'] != null}{Lang::dateTimeFormat($pg['expired_date'])}{/if}</td>
<td>{if $pg['paid_date'] != null}{Lang::dateTimeFormat($pg['paid_date'])}{/if}</td>
<td>{if $pg['trx_invoice']}<a href="{$_url}reports/activation&q={$pg['trx_invoice']}"
class="text-black">{$pg['trx_invoice']}</a>{/if}</td>
@ -55,7 +63,7 @@
</table>
</div>
{include file="pagination.tpl"}
<button type="button" class="btn btn-primary btn-block" onclick="window.history.back();">{Lang::T('back')}</button>
<a href="{$_url}paymentgateway/" class="btn btn-default btn-xs">kembali</a>
</div>
</div>