1 <% include( 'elements/browse.html',
2 'title' => 'Payment gateways',
3 'menubar' => [ 'Agents' => $p.'browse/agent.cgi', ],
4 'html_init' => $html_init,
5 'name' => 'payment gateways',
7 'disabled_statuspos' => 1,
8 'query' => { 'table' => 'payment_gateway',
11 'count_query' => $count_query,
19 'fields' => [ 'gatewaynum',
31 <% include('/elements/footer.html') %>
35 <A HREF="${p}edit/payment_gateway.html"><I>Add a new payment gateway</I></A>
39 function areyousure(href) {
40 if (confirm("Are you sure you want to disable this payment gateway?") == true)
41 window.location.href = href;
47 my $gateway_sub = sub {
48 my($payment_gateway) = @_;
50 my $gatewaynum = $payment_gateway->gatewaynum;
52 my $html = $payment_gateway->gateway_module. ' '. qq!
54 <A HREF="${p}edit/payment_gateway.html?$gatewaynum">(edit)</A>
57 unless ( $payment_gateway->disabled ) {
59 <A HREF="javascript:areyousure('${p}misc/disable-payment_gateway.cgi?$gatewaynum')">(disable)</A>
69 my $options_sub = sub {
70 my($payment_gateway) = @_;
72 #should return a structure instead of this manual formatting...
74 my $html = '<TABLE CELLSPACING=0 CELLPADDING=0>';
76 my %options = $payment_gateway->options;
77 foreach my $option ( keys %options ) {
78 $html .= '<TR><TH>'. $option. ':</TH>'.
79 '<TD>'. $options{$option}. '</TD></TR>';
86 my $count_query = 'SELECT COUNT(*) FROM payment_gateway';
92 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');