summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/agent_payment_gateway.html
blob: c9789cff688b3316e90a711b57777035770ea31f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<% $cgi->redirect(popurl(3). "browse/agent.cgi") %>
<%init>

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

$cgi->param('agentnum') =~ /(\d+)$/ or die "illegal agentnum";
my $agent = qsearchs('agent', { 'agentnum' => $1 } );
die "agentnum $1 not found" unless $agent;

#my $old

my $new = new FS::agent_payment_gateway {
                  ( map { $_ => scalar($cgi->param($_)) }
                                    fields('agent_payment_gateway')
                  ),
                };

my $error = $new->insert;
die $error if $error;

</%init>