blob: 5b5fd948ac50e0eef08ceb60448397c066376ea5 (
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
26
27
28
29
|
<% $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 = map {
my $cardtype = $_;
new FS::agent_payment_gateway {
( map { $_ => scalar($cgi->param($_)) }
fields('agent_payment_gateway')
),
'cardtype' => $cardtype,
};
}
$cgi->param('cardtype');
foreach my $new (@new) {
my $error = $new->insert;
die $error if $error;
}
</%init>
|