-%
-%
-%$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';
-%
-%
-
-
<% include("/elements/header.html","$action payment gateway override for ". $agent->agent, menubar(
- 'Main Menu' => $p,
#'View all payment gateways' => $p. 'browse/payment_gateway.html',
- 'View all agents' => $p. 'browse/agent.html',
+ 'View all agents' => $p. 'browse/agent.cgi',
)) %>
<% include('/elements/error.html') %>
% 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><BR>
+<BR>
-for <SELECT NAME="cardtype" MULTIPLE>
-% foreach my $cardtype (
-% "",
-% "VISA card",
-% "MasterCard",
-% "Discover card",
-% "American Express card",
-% "Diner's Club/Carte Blanche",
-% "enRoute",
-% "JCB",
-% "BankCard",
-% "Switch",
-% "Solo",
-% 'ACH',
-%) {
+<INPUT TYPE="checkbox" NAME="cardtype" VALUE="ACH"> for ACH only.
+<BR>
+<BR>
- <OPTION VALUE="<% $cardtype %>"><% $cardtype || '(Default fallback)' %>
-% }
+<INPUT TYPE="submit" VALUE="Add gateway override">
+</FORM>
-</SELECT>
-<BR><BR>
+<% include('/elements/footer.html') %>
-(optional) when invoice contains only items of taxclass <INPUT TYPE="text" NAME="taxclass">
-<BR><BR>
+<%init>
-<INPUT TYPE="submit" VALUE="Add gateway override">
-</FORM>
-</BODY>
-</HTML>
+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>