per-agent configuration of batch processors, #71837
[freeside.git] / httemplate / edit / agent_payment_gateway.html
1 <% include("/elements/header.html","$action payment gateway override for ". $agent->agent,  menubar(
2   #'View all payment gateways' => $p. 'browse/payment_gateway.html',
3   'View all agents' => $p. 'browse/agent.html',
4 )) %>
5
6 <% include('/elements/error.html') %>
7
8 <FORM ACTION="<%popurl(1)%>process/agent_payment_gateway.html" METHOD=POST>
9 <INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $agent->agentnum %>">
10
11 Use gateway <SELECT NAME="gatewaynum">
12 % foreach my $payment_gateway (
13 %      qsearch('payment_gateway', { 'disabled' => '' } )
14 %    ) {
15 %   # don't let these be selected as agent overrides; there's a different mechanism
16 %   next if $payment_gateway->gateway_namespace eq 'Business::BatchPayment';
17 %
18
19   <OPTION VALUE="<% $payment_gateway->gatewaynum %>"><% $payment_gateway->gateway_module %> (<% $payment_gateway->gateway_username %>)
20 % } 
21
22 </SELECT>
23 <BR><BR>
24
25 for <SELECT NAME="cardtype" MULTIPLE>
26 % foreach my $cardtype (
27 %  "",
28 %  "VISA card",
29 %  "MasterCard",
30 %  "Discover card",
31 %  "American Express card",
32 %  "Diner's Club/Carte Blanche",
33 %  "enRoute",
34 %  "JCB",
35 %  "BankCard",
36 %  "Switch",
37 %  "Solo",
38 %  'ACH',
39 %  'PayPal',
40 %) { 
41
42   <OPTION VALUE="<% $cardtype %>"><% $cardtype || '(Default fallback)' %>
43 % } 
44
45 </SELECT>
46 <BR><BR>
47
48 (optional) when invoice contains only items of taxclass <INPUT TYPE="text" NAME="taxclass">
49 <BR><BR>
50
51 <INPUT TYPE="submit" VALUE="Add gateway override">
52 </FORM>
53
54 <% include('/elements/footer.html') %>
55
56 <%init>
57
58 die "access denied"
59   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
60
61 $cgi->param('agentnum') =~ /(\d+)$/ or die "illegal agentnum";
62 my $agent = qsearchs('agent', { 'agentnum' => $1 } );
63 die "agentnum $1 not found" unless $agent;
64
65 #my @agent_payment_gateway;
66 if ( $cgi->param('error') ) {
67 }
68
69 my $action = 'Add';
70
71 </%init>