summaryrefslogtreecommitdiff
path: root/fs_selfservice/FS-SelfService/cgi/make_payment.html
blob: b14c901fd88a8fefa882ecd0b1e0c0dd47e4ede7 (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
<%= include('header', 'Make a payment') %>

<FORM NAME="OneTrueForm" METHOD="POST" ACTION="<%=$selfurl%>" onSubmit="document.OneTrueForm.process.disabled=true">
<INPUT TYPE="hidden" NAME="action" VALUE="payment_results">
<TABLE BGCOLOR="#cccccc">

<%= 
if ($balance > 0) {
  $OUT .= <<EOF;
<TR>
  <TH ALIGN="right">Amount&nbsp;Due</TH>
  <TD COLSPAN=7>
    <TABLE><TR><TD BGCOLOR="#ffffff">
      $money_char$balance
    </TD></TR></TABLE>
  </TD>
</TR>
EOF
}
%>

<%= $tr_amount_fee %>

<%= include('discount_term') %>

<TR>
  <TH ALIGN="right">Card&nbsp;type</TH>
  <TD COLSPAN=7>
    <SELECT NAME="card_type"><OPTION></OPTION>
      <%= foreach ( keys %card_types ) {
            $selected = $card_type eq $card_types{$_} ? ' SELECTED' : '';
            $OUT .= qq(<OPTION$selected VALUE="). $card_types{$_}. qq(">$_\n);
      } %>
    </SELECT>
  </TD>
</TR>
<%= include('card') %>

<%=

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

if ( $payby eq 'CARD' && ! $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 card and billing address, and charge future payments to this card automatically
      </TD>
    </TR>
EOF

} else {

  $OUT .=<<EOF;
    <TR>
      <TD COLSPAN=8>
        <INPUT TYPE="checkbox" $save_ck NAME="save" VALUE="1">
        Remember this card and billing address
      </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 card automatically
      </TD>
    </TR>
EOF

}
%>

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

<%= include('footer') %>