diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-08-03 13:09:05 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-08-03 13:09:05 -0700 |
commit | 45346fd655ba53b82c80b920da945cc0b87ece01 (patch) | |
tree | 25453139d733720bb9c2b92817d35adffd63c776 /fs_selfservice/FS-SelfService | |
parent | 8b4b2a97a84d17087c3fac19b8f768ca146cf897 (diff) |
selfservice payment fees, RT#18345
Diffstat (limited to 'fs_selfservice/FS-SelfService')
-rw-r--r-- | fs_selfservice/FS-SelfService/cgi/make_payment.html | 24 | ||||
-rwxr-xr-x[-rw-r--r--] | fs_selfservice/FS-SelfService/cgi/selfservice.cgi | 16 |
2 files changed, 20 insertions, 20 deletions
diff --git a/fs_selfservice/FS-SelfService/cgi/make_payment.html b/fs_selfservice/FS-SelfService/cgi/make_payment.html index bec37cac3..defd4a551 100644 --- a/fs_selfservice/FS-SelfService/cgi/make_payment.html +++ b/fs_selfservice/FS-SelfService/cgi/make_payment.html @@ -9,29 +9,15 @@ <TH ALIGN="right">Amount Due</TH> <TD COLSPAN=7> <TABLE><TR><TD BGCOLOR="#ffffff"> - $<%=sprintf("%.2f",$balance)%> - </TD></TR></TABLE> - </TD> -</TR> -<TR> - <TH ALIGN="right">Payment amount</TH> - <TD COLSPAN=7> - <TABLE><TR><TD BGCOLOR="#ffffff"> -<%= - $amt = ''; - if ( $balance > 0 ) { - $amt = $balance; - $amt += $amt * $credit_card_surcharge_percentage/100 - if $credit_card_surcharge_percentage > 0; - $amt = sprintf("%.2f",$amt); - } - ''; -%> - $<INPUT TYPE="text" NAME="amount" SIZE=8 VALUE="<%=$amt%>"> + <FONT COLOR="#000000">$<%=sprintf("%.2f",$balance)%></FONT> </TD></TR></TABLE> </TD> </TR> + +<%= $tr_amount_fee %> + <%= include('discount_term') %> + <TR> <TH ALIGN="right">Card type</TH> <TD COLSPAN=7> diff --git a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi index fe8d08209..61361b8ee 100644..100755 --- a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi +++ b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi @@ -476,7 +476,21 @@ sub process_order_recharge { } sub make_payment { - payment_info( 'session_id' => $session_id ); + + my $payment_info = payment_info( 'session_id' => $session_id ); + + my $tr_amount_fee = mason_comp( + 'session_id' => $session_id, + 'comp' => '/elements/tr-amount_fee.html', + 'args' => [ 'amount' => $payment_info->{'balance'}, + ], + ); + + $tr_amount_fee = $tr_amount_fee->{'error'} || $tr_amount_fee->{'output'}; + + $payment_info->{'tr_amount_fee'} = $tr_amount_fee; + + $payment_info; } sub payment_results { |