diff options
| author | Christopher Burger <burgerc@freeside.biz> | 2018-11-05 17:44:50 -0500 |
|---|---|---|
| committer | Christopher Burger <burgerc@freeside.biz> | 2018-11-06 17:02:02 -0500 |
| commit | 959a59186f30a33d167b12e67d3c9cc4ce58a0f5 (patch) | |
| tree | d61a05795fcdf4c40116ee3cca546577025165a3 /httemplate/misc | |
| parent | ad94da6a8b46ba0cb915a69307810c8a5bcf6749 (diff) | |
RT# 76093 - Added ability to charge a processing fee when taking a payment on the back end
Conflicts:
FS/FS/Conf.pm
FS/FS/cust_main/Billing_Batch.pm
httemplate/elements/tr-amount_fee.html
httemplate/elements/tr-select-payment_options.html
httemplate/misc/process/payment.cgi
Diffstat (limited to 'httemplate/misc')
| -rw-r--r-- | httemplate/misc/payment.cgi | 1 | ||||
| -rw-r--r-- | httemplate/misc/process/payment.cgi | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index b882da061..6a1fd550b 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -27,6 +27,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 6163b93dd..4d4e62a32 100644 --- a/httemplate/misc/process/payment.cgi +++ b/httemplate/misc/process/payment.cgi @@ -32,6 +32,8 @@ my $custnum = $1; my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ); die "unknown custnum $custnum" unless $cust_main; +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; @@ -204,6 +206,7 @@ if ( $cgi->param('batch') ) { 'payinfo' => $payinfo, 'paydate' => "$year-$month-01", 'payname' => $payname, + 'processing-fee' => $processing_fee, map { $_ => scalar($cgi->param($_)) } @{$payby2fields{$payby}} ); @@ -225,6 +228,7 @@ if ( $cgi->param('batch') ) { 'discount_term' => $discount_term, 'no_auto_apply' => ($cgi->param('apply') eq 'never') ? 'Y' : '', 'no_invnum' => 1, + 'processing-fee' => $processing_fee, map { $_ => scalar($cgi->param($_)) } @{$payby2fields{$payby}} ); errorpage($error) if $error; |
