Customizeable Payment Recharge

This commit is contained in:
Ibnu Maksum 2024-05-14 10:25:21 +07:00
parent 895bb26b02
commit fa45d5f4b5
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
4 changed files with 20 additions and 4 deletions

View File

@ -68,6 +68,12 @@ switch ($action) {
if (isset($routes['2']) && !empty($routes['2'])) {
$ui->assign('cust', ORM::for_table('tbl_customers')->find_one($routes['2']));
}
$usings = explode(',', $config['payment_usings']);
$usings = array_filter(array_unique($usings));
if(count($usings)==0){
$usings[] = Lang::T('Cash');
}
$ui->assign('usings', $usings);
run_hook('view_recharge'); #HOOK
$ui->display('recharge.tpl');
break;
@ -146,7 +152,7 @@ switch ($action) {
}
if ($msg == '') {
$gateway = 'Recharge';
$gateway = ucwords($using);
$channel = $admin['fullname'];
$cust = User::_info($id_customer);
list($bills, $add_cost) = User::getBills($id_customer);

View File

@ -578,6 +578,7 @@
"Confirmation_Message": "Confirmation Message",
"You_are_already_logged_in": "You are already logged in",
"Extend": "Extend",
"Created___Expires": "Created \/ Expires",
"Created___Expired": "Created \/ Expired"
"Created___Expired": "Created \/ Expired",
"Bank_Transfer": "Bank Transfer",
"Recharge_Using": "Recharge Using"
}

View File

@ -86,6 +86,13 @@
href="https://github.com/hotspotbilling/phpnuxbill/wiki/Themes" target="_blank">Theme
info</a></p>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Recharge Using')}</label>
<div class="col-md-6">
<input type="text" name="payment_usings" class="form-control" value="{$_c['payment_usings']}" placeholder="{Lang::T('Cash')}, {Lang::T('Bank Transfer')}">
</div>
<p class="help-block col-md-4">This used for admin to select payment in recharge, using comma for every new options</p>
</div>
<div class="form-group">
<label class="col-md-2 control-label">APP URL</label>
<div class="col-md-6">

View File

@ -45,7 +45,9 @@
<label class="col-md-2 control-label">{Lang::T('Using')}</label>
<div class="col-md-6">
<select name="using" class="form-control">
<option value="cash">{Lang::T('Cash')}</option>
{foreach $usings as $using}
<option value="{trim(ucWords($using))}">{trim(ucWords($using))}</option>
{/foreach}
{if $_c['enable_balance'] eq 'yes'}
<option value="balance">{Lang::T('Customer Balance')}</option>
{/if}