| Server IP : 103.161.17.216 / Your IP : 216.73.216.1 Web Server : nginx/1.18.0 System : Linux tipsysaigoncharming 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 7.4.3-4ubuntu2.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/app.houseland.info/application/helpers/ |
Upload File : |
<?php
defined('BASEPATH') or exit('No direct script access allowed');
define('PAYMENT_GATEWAYS_ASSETS_GROUP', 'payment-gateways');
/**
* Payment gateway logo, user can apply hook to change the logo
* @return string
*/
function payment_gateway_logo()
{
$url = payment_gateway_logo_url();
$width = hooks()->apply_filters('payment_gateway_logo_width', 'auto');
$height = hooks()->apply_filters('payment_gateway_logo_height', '34px');
return '<img src="' . $url . '" width="' . $width . '" height="' . $height . '">';
}
function payment_gateway_logo_url()
{
$logoURL = '';
$logoDark = get_option('company_logo_dark');
$logoLight = get_option('company_logo');
if ($logoDark != '' && file_exists(get_upload_path_by_type('company') . $logoDark)) {
$logoURL = base_url('uploads/company/' . $logoDark);
} elseif ($logoLight != '' && file_exists(get_upload_path_by_type('company') . $logoLight)) {
$logoURL = base_url('uploads/company/' . $logoLight);
}
$logoURL = hooks()->apply_filters('payment_gateway_logo_url', $logoURL);
return $logoURL;
}
/**
* Outputs payment gateway head, commonly used
* @param string $title Document title
* @return mixed
*/
function payment_gateway_head($title = 'Payment for Invoice')
{
$CI = &get_instance();
add_favicon_link_asset(PAYMENT_GATEWAYS_ASSETS_GROUP);
$CI->app_css->add('inter-font', 'assets/plugins/inter/inter.css', PAYMENT_GATEWAYS_ASSETS_GROUP);
$CI->app_css->add(
'reset-css',
base_url($CI->app_css->core_file('assets/css', 'reset.css')) . '?v=' . $CI->app_css->core_version(),
PAYMENT_GATEWAYS_ASSETS_GROUP
);
$CI->app_css->add('bootstrap-css', 'assets/plugins/bootstrap/css/bootstrap.min.css', PAYMENT_GATEWAYS_ASSETS_GROUP);
$CI->app_css->add('tailwind-css', base_url($CI->app_css->core_file('assets/builds', 'tailwind.css')) . '?v=' . $CI->app_css->core_version(), PAYMENT_GATEWAYS_ASSETS_GROUP, ['bootstrap-css']);
$CI->app_css->add(
'theme-css',
base_url($CI->app_scripts->core_file(theme_assets_path() . '/css', 'style.css')) . '?v=' . $CI->app_css->core_version(),
PAYMENT_GATEWAYS_ASSETS_GROUP
);
$html = '<!DOCTYPE html>' . PHP_EOL;
$html .= '<html lang="en">' . PHP_EOL;
$html .= '<head>' . PHP_EOL;
$html .= '<meta charset="utf-8">' . PHP_EOL;
$html .= '<meta http-equiv="X-UA-Compatible" content="IE=edge" />' . PHP_EOL;
$html .= '<meta name="viewport" content="width=device-width, initial-scale=1">' . PHP_EOL;
$html .= '<title>' . PHP_EOL;
$html .= $title . PHP_EOL;
$html .= '</title>' . PHP_EOL;
$html .= app_compile_css(PAYMENT_GATEWAYS_ASSETS_GROUP) . PHP_EOL;
$html .= '<style>' . PHP_EOL;
$html .= '.text-danger { color: #fc2d42; }' . PHP_EOL;
$html .= '</style>' . PHP_EOL;
$html .= hooks()->apply_filters('payment_gateway_head', '') . PHP_EOL;
$html .= '</head>' . PHP_EOL;
return $html;
}
/**
* Used in payment gateways head, commonly used sscripts
* @return html
*/
function payment_gateway_scripts()
{
$html = '<script src="' . base_url() . 'assets/plugins/jquery/jquery.min.js"></script>' . PHP_EOL;
$html .= '<script src="' . base_url() . 'assets/plugins/bootstrap/js/bootstrap.min.js"></script>' . PHP_EOL;
$html .= '<script src="' . base_url() . 'assets/plugins/jquery-validation/jquery.validate.min.js"></script>' . PHP_EOL;
$html .= '<script>
$.validator.setDefaults({
errorElement: \'span\',
errorClass: \'text-danger\',
});
</script>' . PHP_EOL;
$html .= hooks()->apply_filters('payment_gateway_scripts', '') . PHP_EOL;
return $html;
}
/**
* Used in payment gateways document footer
* @return html
*/
function payment_gateway_footer()
{
$html = hooks()->apply_filters('payment_gateway_footer', '') . PHP_EOL;
$html .= '</body>' . PHP_EOL;
$html .= '</html>' . PHP_EOL;
return $html;
}