summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2018-11-05 17:44:50 -0500
committerChristopher Burger <burgerc@freeside.biz>2018-11-05 17:44:50 -0500
commit94b60bb13c044e436800239be3e3c5a029bdff8e (patch)
tree9491c9a0f78210df8631df281a485ec003ca84cc /httemplate/misc
parent1144312a89d0a9d9598f7279bb7c7b8f65e5b0b9 (diff)
RT# 76093 - Added ability to charge a processing fee when taking a payment on the back end
Diffstat (limited to 'httemplate/misc')
-rw-r--r--httemplate/misc/payment.cgi1
-rw-r--r--httemplate/misc/process/payment.cgi4
2 files changed, 5 insertions, 0 deletions
diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi
index 77f5acd6a..7911a5dd9 100644
--- a/httemplate/misc/payment.cgi
+++ b/httemplate/misc/payment.cgi
@@ -29,6 +29,7 @@
? scalar($conf->config('credit-card-surcharge-flatfee', $cust_main->agentnum))
: 0
),
+ 'processing_fee' => scalar($conf->config('processing-fee', $cust_main->agentnum)),
&>
% if ( $conf->exists('part_pkg-term_discounts') ) {
diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi
index 7747bcbea..56bcfd872 100644
--- a/httemplate/misc/process/payment.cgi
+++ b/httemplate/misc/process/payment.cgi
@@ -41,6 +41,8 @@ my $cust_main = qsearchs({
my $invoice = ($cgi->param('invoice') =~ /^(\d+)$/) ? $cgi->param('invoice') : '';
+my $processing_fee = $cgi->param('processing_fee') ? $cgi->param('processing_fee') : '';
+
$cgi->param('amount') =~ /^\s*(\d*(\.\d\d)?)\s*$/
or errorpage("illegal amount ". $cgi->param('amount'));
my $amount = $1;
@@ -233,6 +235,7 @@ if ( $cgi->param('batch') ) {
'paydate' => $paydate,
'payname' => $payname,
'invnum' => $invoice,
+ 'processing-fee' => $processing_fee,
map { $_ => scalar($cgi->param($_)) }
@{$payby2fields{$payby}}
);
@@ -256,6 +259,7 @@ if ( $cgi->param('batch') ) {
'no_auto_apply' => ($cgi->param('apply') eq 'never') ? 'Y' : '',
'no_invnum' => 1,
'invnum' => $invoice,
+ 'processing-fee' => $processing_fee,
map { $_ => scalar($cgi->param($_)) } @{$payby2fields{$payby}}
);
errorpage($error) if $error;