2 % $cgi->param('error', $error);
3 <% $cgi->redirect(popurl(2). "payment_gateway.html?". $cgi->query_string ) %>
5 <% $cgi->redirect(popurl(3). "browse/payment_gateway.html") %>
10 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
12 my $gatewaynum = $cgi->param('gatewaynum');
14 my $old = qsearchs('payment_gateway',{'gatewaynum'=>$gatewaynum}) if $gatewaynum;
16 my $new = new FS::payment_gateway ( {
18 $_, scalar($cgi->param($_));
19 } fields('payment_gateway')
22 my @options = split(/\r?\n/, $cgi->param('gateway_options') );
24 if scalar(@options) % 2 && $options[-1] =~ /^\s*$/;
25 my %options = @options;
29 $error=$new->replace($old, \%options);
31 $error=$new->insert(\%options);
32 $gatewaynum=$new->getfield('gatewaynum');