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,
21 'fields' => [ 'gatewaynum',
22 'namespace_description',
27 'gateway_callback_url',
35 <% include('/elements/footer.html') %>
39 <A HREF="${p}edit/payment_gateway.html"><I>Add a new payment gateway</I></A>
43 function areyousure(href) {
44 if (confirm("Are you sure you want to disable this payment gateway?") == true)
45 window.location.href = href;
51 my $gateway_sub = sub {
52 my($payment_gateway) = @_;
54 my $gatewaynum = $payment_gateway->gatewaynum;
56 my $html = $payment_gateway->gateway_module. ' '. qq!
58 <A HREF="${p}edit/payment_gateway.html?$gatewaynum">(edit)</A>
61 unless ( $payment_gateway->disabled ) {
63 <A HREF="javascript:areyousure('${p}misc/disable-payment_gateway.cgi?$gatewaynum')">(disable)</A>
73 my $options_sub = sub {
74 my($payment_gateway) = @_;
76 #should return a structure instead of this manual formatting...
78 my $html = '<TABLE CELLSPACING=0 CELLPADDING=0>';
80 tie my %options, 'Tie::IxHash', $payment_gateway->options;
81 foreach my $option ( keys %options ) {
82 $html .= '<TR><TH ALIGN="right">'. $option. ':</TH>'.
83 '<TD>'. $options{$option}. '</TD></TR>';
90 my $count_query = 'SELECT COUNT(*) FROM payment_gateway';
96 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');