From fa45d5f4b5abb3e925ff6090d0bc1368d99d6394 Mon Sep 17 00:00:00 2001
From: Ibnu Maksum
Date: Tue, 14 May 2024 10:25:21 +0700
Subject: [PATCH] Customizeable Payment Recharge
---
system/controllers/plan.php | 8 +++++++-
system/lan/english.json | 5 +++--
ui/ui/app-settings.tpl | 7 +++++++
ui/ui/recharge.tpl | 4 +++-
4 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/system/controllers/plan.php b/system/controllers/plan.php
index 9155efed..4cb6c12d 100644
--- a/system/controllers/plan.php
+++ b/system/controllers/plan.php
@@ -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);
diff --git a/system/lan/english.json b/system/lan/english.json
index bfad1304..fe65c543 100644
--- a/system/lan/english.json
+++ b/system/lan/english.json
@@ -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"
}
\ No newline at end of file
diff --git a/ui/ui/app-settings.tpl b/ui/ui/app-settings.tpl
index 29ca5175..c47db57e 100644
--- a/ui/ui/app-settings.tpl
+++ b/ui/ui/app-settings.tpl
@@ -86,6 +86,13 @@
href="https://github.com/hotspotbilling/phpnuxbill/wiki/Themes" target="_blank">Theme
info
+