summaryrefslogtreecommitdiff
path: root/httemplate/edit/agent_payment_gateway.html
blob: 38411f12e99240f5492fe53f33f6bcd2ce06fa7b (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<% include("/elements/header.html","$action payment gateway override for ". $agent->agent,  menubar(
  #'View all payment gateways' => $p. 'browse/payment_gateway.html',
  'View all agents' => $p. 'browse/agent.cgi',
)) %>

<% include('/elements/error.html') %>

<FORM ACTION="<%popurl(1)%>process/agent_payment_gateway.html" METHOD=POST>
<INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $agent->agentnum %>">

Use gateway <SELECT NAME="gatewaynum">
% foreach my $payment_gateway (
%      qsearch('payment_gateway', { 'disabled' => '' } )
%    ) {
%   # don't let these be selected as agent overrides; there's a different mechanism
%   next if $payment_gateway->gateway_namespace eq 'Business::BatchPayment';
%

  <OPTION VALUE="<% $payment_gateway->gatewaynum %>"><% $payment_gateway->gateway_module %> (<% $payment_gateway->gateway_username %>)
% } 
</SELECT>
<BR>

<INPUT TYPE="checkbox" NAME="cardtype" VALUE="ACH"> for ACH only.
<BR>
<BR>

<INPUT TYPE="submit" VALUE="Add gateway override">
</FORM>

<% include('/elements/footer.html') %>

<%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 @agent_payment_gateway;
if ( $cgi->param('error') ) {
}

my $action = 'Add';

</%init>