default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / httemplate / edit / process / agent_payment_gateway.html
1 <% $cgi->redirect(popurl(3). "browse/agent.cgi") %>
2 <%init>
3
4 die "access denied"
5   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
6
7 $cgi->param('agentnum') =~ /(\d+)$/ or die "illegal agentnum";
8 my $agent = qsearchs('agent', { 'agentnum' => $1 } );
9 die "agentnum $1 not found" unless $agent;
10
11 #my $old
12
13 my $new = new FS::agent_payment_gateway {
14                   ( map { $_ => scalar($cgi->param($_)) }
15                                     fields('agent_payment_gateway')
16                   ),
17                 };
18
19 my $error = $new->insert;
20 die $error if $error;
21
22 </%init>