diff options
author | levinse <levinse> | 2011-01-21 22:17:30 +0000 |
---|---|---|
committer | levinse <levinse> | 2011-01-21 22:17:30 +0000 |
commit | 0f7643c1af2d909e0c3172e5bec0c01855fca1b9 (patch) | |
tree | 44ef002a6a32f77b1a369a319ee10f1f597c0b82 /httemplate | |
parent | fd4aeda41e6b9318af8e367d761bb2b2c0a402f9 (diff) |
add (unfinished) credit card surcharge, part 1
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/misc/payment.cgi | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index bcab68aae..aec68af45 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -332,6 +332,10 @@ if ( $balance > 0 ) { $amount = $balance; $amount += $fee if $fee && $fee_display eq 'subtract'; + + my $cc_surcharge_pct = $conf->config('credit-card-surcharge-percentage'); + $amount += $amount * $cc_surcharge_pct/100 if $cc_surcharge_pct > 0; + $amount = sprintf("%.2f", $amount); } |