X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fpayment.cgi;h=36e8255f1d1fa938ffd7ef86d52b3ee3aae1ad98;hb=f1802f4b19c6741b50007b56bbac13af61012fe5;hp=813b560bd017574742929e24b5205538ca82e894;hpb=40a7b3dc653e099f7bd0bd762b649b04c4432db2;p=freeside.git diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index 813b560bd..36e8255f1 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -1,18 +1,16 @@ -<% include( '/elements/header.html', "Process $type{$payby} payment" ) %> -<% include( '/elements/small_custview.html', $cust_main, '', '', popurl(2) . "view/cust_main.cgi" ) %> +<& /elements/header.html, emt("Process [_1] payment",$type{$payby}) &> +<& /elements/small_custview.html, $cust_main, '', '', popurl(2) . "view/cust_main.cgi" &>
-<% include('/elements/init_overlib.html') %> - -% #include( '/elements/table.html', '#cccccc' ) +<& /elements/init_overlib.html &> <% ntable('#cccccc') %> - Payment amount + <% mt('Payment amount') |h %> - +
<% $money_char %> $custnum, + 'cgi' => $cgi +&> % if ( $payby eq 'CARD' ) { % @@ -80,13 +82,13 @@ % }
Card number<% mt('Card number') |h %> - + - + - + - <% include( '/elements/location.html', + <& /elements/location.html, 'object' => $cust_main, #XXX errors??? 'no_asterisks' => 1, - 'address1_label' => 'Card billing address', - ) - %> + 'address1_label' => emt('Card billing address'), + &> % } elsif ( $payby eq 'CHEK' ) { % @@ -148,34 +149,33 @@ - + - + - + - + % if ( $conf->exists('show_bankstate') ) { - - + % } else { @@ -185,8 +185,8 @@ % if ( $conf->exists('show_ss') ) { @@ -197,19 +197,18 @@ % if ( $conf->exists('show_stateid') ) { - - + % } else { @@ -223,7 +222,7 @@ @@ -240,7 +239,7 @@ @@ -250,24 +249,24 @@
Exp.<% mt('Exp.') |h %>
CVV2<% mt('CVV2') |h %> - (help) + (<% mt('help') |h %>)
Exact name on card<% mt('Exact name on card') |h %>
Account number<% mt('Account number') |h %> Type<% mt('Type') |h %>
ABA/Routing number<% mt('ABA/Routing number') |h %> - (help) + (<% mt('help') |h %>)
Bank name<% mt('Bank name') |h %>
Bank state<% include('/elements/select-state.html', + <% mt('Bank state') |h %><& /elements/select-state.html, 'disable_empty' => 0, - 'empty_label' => '(choose)', + 'empty_label' => emt('(choose)'), 'state' => $paystate, 'country' => $cust_main->country, 'prefix' => 'pay', - ) - %> + &>
- Account holder
- Social security or tax ID # + <% mt('Account holder') |h %>
+ <% mt('Social security or tax ID #') |h %>
- Account holder
- Driver’s license or state ID # + <% mt('Account holder') |h %>
+ <% mt("Driver's license or state ID #") |h %>
State<% include('/elements/select-state.html', + <% mt('State') |h %><& /elements/select-state.html, 'disable_empty' => 0, - 'empty_label' => '(choose)', + 'empty_label' => emt('(choose)'), 'state' => $stateid_state, 'country' => $cust_main->country, 'prefix' => 'stateid_', - ) - %> + &>
- Remember this information + <% mt('Remember this informatio') |h %>
- Add to current batch + <% mt('Add to current batch') |h %>
payby ne 'DCRD' ) || ( $payby eq 'CHEK' && $cust_main->payby eq 'CHEK' ) ) ? ' CHECKED' : '' %> NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }"> - Charge future payments to this <% $type{$payby} %> automatically + <% mt("Charge future payments to this [_1] automatically",$type{$payby}) |h %>

- + -<% include('/elements/footer.html') %> +<& /elements/footer.html &> <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Process payment'); -my %type = ( 'CARD' => 'credit card', - 'CHEK' => 'electronic check (ACH)', +my %type = ( 'CARD' => emt('credit card'), + 'CHEK' => emt('electronic check (ACH)'), ); $cgi->param('payby') =~ /^(CARD|CHEK)$/ @@ -327,6 +326,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); }