summaryrefslogtreecommitdiff
path: root/httemplate/misc/disable-payment_gateway.cgi
blob: 13e1f92bc760cf44d2531e8cffa2e56cae2a52ff (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
%if ( $error ) {
%  errorpage($error);
%} else {
%#<% $cgi->redirect(popurl(2). "browse/payment_gateway.html?showdiabled=$showdisabled") %>
<% $cgi->redirect(popurl(2). "browse/payment_gateway.html") %>
%}
<%init>

die "access deined"
  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');

#my $showdisabled = 0;
#$cgi->param('showdisabled') =~ /^(\d+)$/ and $showdisabled = $1;

#$cgi->param('gatewaynum') =~ /^(\d+)$/ or die 'illegal gatewaynum';
my($query) = $cgi->keywords;
$query =~ /^(\d+)$/ or die 'illegal gatewaynum';
my $gatewaynum = $1;

my $payment_gateway =
  qsearchs('payment_gateway', { 'gatewaynum' => $gatewaynum } );

my $error = $payment_gateway->disable;

</%init>