summaryrefslogtreecommitdiff
path: root/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html
blob: 8b5908ef0e0b1c103cfc20af0ed14068079baba4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<%= include('header', 'Make a payment') %>

<FORM NAME="OneTrueForm" METHOD="POST" ACTION="<%=$selfurl%>" onSubmit="document.OneTrueForm.process.disabled=true">
<INPUT TYPE="hidden" NAME="action" VALUE="ach_payment_results">
<TABLE BGCOLOR="#cccccc">
<%= 
if ($balance > 0) {
  $OUT .= <<EOF;
<TR>
  <TD ALIGN="right">Amount&nbsp;Due</TD>
  <TD>
    <TABLE><TR><TD BGCOLOR="#ffffff">
      $money_char$balance
    </TD></TR></TABLE>
  </TD>
</TR>
EOF
}
%>
<TR>
  <TD ALIGN="right">Payment&nbsp;amount</TD>
  <TD>
    <TABLE><TR><TD>
      <%= $money_char %><INPUT TYPE="text" NAME="amount" SIZE=8 VALUE="<%= ($balance > 0) ? $balance : '' %>">
    </TD></TR></TABLE>
  </TD>
</TR>
<%= include('discount_term') %>
<%= include('check') %>

<%=
  $OUT = '';
  if ($ach_read_only) {
    if ($payby eq 'CHEK') {
      $OUT .= '<TR><TD COLSPAN=2><INPUT TYPE="hidden" NAME="auto" VALUE="1"></TD></TR>';
    }
  } else {

    my $save_ck = $save_unchecked  ? ''         : 'CHECKED';
    my $auto_ck = $payby eq 'CHEK' ? ' CHECKED' : '';

    if ( $payby eq 'CHEK' && ! $save_unchecked ) {

      $OUT .=<<EOF;
        <TR>
          <TD COLSPAN=8>
            <INPUT TYPE="checkbox" $save_ck NAME="save" VALUE="1" STYLE="display:none">
            <INPUT TYPE="checkbox" $auto_ck NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; } else { document.OneTrueForm.save.checked=false; }">
            Remember this information, and charge future payments to this account automatically
          </TD>
        </TR>
EOF

    } else {

      $OUT .=<<EOF;
        <TR>
          <TD COLSPAN=8>
            <INPUT TYPE="checkbox" $save_ck NAME="save" VALUE="1">
            Remember this information
          </TD>
        </TR><TR>
          <TD COLSPAN=8>
            <INPUT TYPE="checkbox" $auto_ck NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }">
            Charge future payments to this account automatically
          </TD>
        </TR>
EOF

    }

  }

%>

</TABLE>
<BR>
<INPUT TYPE="hidden" NAME="paybatch" VALUE="<%=$paybatch%>">
<INPUT TYPE="submit" NAME="process" VALUE="Process payment"> <!-- onClick="this.disabled=true"> -->
</FORM>

<%= include('footer') %>