% include( 'elements/browse.html',
'title' => 'Payment gateways',
'menubar' => [ 'Agents' => $p.'browse/agent.cgi', ],
'html_init' => $html_init,
'name' => 'payment gateways',
'disableable' => 1,
'disabled_statuspos' => 1,
'query' => { 'table' => 'payment_gateway',
'hashref' => {},
},
'count_query' => $count_query,
'header' => [ '#',
'Gateway',
'Username',
'Password',
'Action',
'Options',
],
'fields' => [ 'gatewaynum',
$gateway_sub,
'gateway_username',
sub { ' - '; },
'gateway_action',
$options_sub,
],
)
%>
<% include('/elements/footer.html') %>
<%once>
my $html_init = qq!
Add a new payment gateway
!;
my $gateway_sub = sub {
my($payment_gateway) = @_;
my $gatewaynum = $payment_gateway->gatewaynum;
my $html = $payment_gateway->gateway_module. ' '. qq!
(edit)
!;
unless ( $payment_gateway->disabled ) {
$html .= qq!
(disable)
!;
}
$html .= '';
$html;
};
my $options_sub = sub {
my($payment_gateway) = @_;
#should return a structure instead of this manual formatting...
my $html = '
'. $option. ': | '. ''. $options{$option}. ' |
---|