summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/agent_payment_gateway.html
blob: 436317ec4f09449c4a77330bbad371ddaa49b8b4 (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
%
%
%$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;
%}
%
%
<% $cgi->redirect(popurl(3). "browse/agent.cgi") %>