From 0f7643c1af2d909e0c3172e5bec0c01855fca1b9 Mon Sep 17 00:00:00 2001 From: levinse Date: Fri, 21 Jan 2011 22:17:30 +0000 Subject: add (unfinished) credit card surcharge, part 1 --- httemplate/misc/payment.cgi | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'httemplate/misc/payment.cgi') 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); } -- cgit v1.2.1