blob: 671f7118cc26c6425f8256f90ef08aeebc5c097c (
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
|
<% include("/elements/header.html",'Payment gateways', menubar(
'Agents' => $p. 'browse/agent.cgi',
)) %>
<A HREF="<% $p %>edit/payment_gateway.html"><I>Add a new payment gateway</I></A><BR><BR>
<% $cgi->param('showdisabled')
? do { $cgi->param('showdisabled', 0);
'( <a href="'. $cgi->self_url. '">hide disabled gateways</a> )'; }
: do { $cgi->param('showdisabled', 1);
'( <a href="'. $cgi->self_url. '">show disabled gateways</a> )'; }
%>
<% table() %>
<TR>
<TH COLSPAN=<% $cgi->param('showdisabled') ? 1 : 2 %>>#</TH>
<TH>Gateway</TH>
<TH>Username</TH>
<TH>Password</TH>
<TH>Action</TH>
<TH>Options</TH>
</TR>
% foreach my $payment_gateway ( qsearch( 'payment_gateway', \%search ) ) {
<TR>
<TD><% $payment_gateway->gatewaynum %></TD>
% if ( !$cgi->param('showdisabled') ) {
<TD><% $payment_gateway->disabled ? 'DISABLED' : '' %></TD>
% }
<TD><% $payment_gateway->gateway_module %>
<FONT SIZE="-1">
<A HREF="<%$p%>edit/payment_gateway.html?<% $payment_gateway->gatewaynum %>">(edit)</A>
<% !$payment_gateway->disabled
? '<A HREF="'. $p. 'misc/disable-payment_gateway.cgi?'. $payment_gateway->gatewaynum.'">(disable)</A>'
: ''
%>
</FONT>
</TD>
<TD><% $payment_gateway->gateway_username %></TD>
<TD> - </TD>
<TD><% $payment_gateway->gateway_action %></TD>
<TD>
<TABLE CELLSPACING=0 CELLPADDING=0>
% my %options = $payment_gateway->options;
% foreach my $option ( keys %options ) {
%
<TR>
<TH><% $option %>:</TH>
<TD><% $options{$option} %></TD>
</TR>
% }
</TABLE>
</TD>
</TR>
% }
</TABLE>
<% include('/elements/footer.html') %>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
my %search;
if ( $cgi->param('showdisabled') ) {
%search = ();
} else {
%search = ( 'disabled' => '' );
}
</%init>
|