diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2016-11-30 05:45:29 -0600 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2016-11-30 05:45:29 -0600 |
commit | 0d2bf5deba111547f84f1adf66a3c0d5432204e4 (patch) | |
tree | 818bf186c4e7be460aa50d57dc3dad81ebb9ff8d /httemplate | |
parent | 51f97ec141f77064ca020634e7eccd85d9ead753 (diff) |
71513: Card tokenization [bug fixes, removed cardtype/taxclass override ui]
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/browse/agent.cgi | 24 | ||||
-rw-r--r-- | httemplate/edit/agent_payment_gateway.html | 28 | ||||
-rw-r--r-- | httemplate/edit/process/agent_payment_gateway.html | 13 |
3 files changed, 12 insertions, 53 deletions
diff --git a/httemplate/browse/agent.cgi b/httemplate/browse/agent.cgi index 3fe68c15d..751e8b69b 100755 --- a/httemplate/browse/agent.cgi +++ b/httemplate/browse/agent.cgi @@ -42,7 +42,7 @@ full offerings (via their type).<BR><BR> <TH CLASS="grid" BGCOLOR="#cccccc">Currencies</TH> % } - <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Payment Gateway Overrides</FONT></TH> + <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Payment Gateway Override</FONT></TH> <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Configuration Overrides</FONT></TH> </TR> @@ -331,32 +331,24 @@ Unused % } % ## -% # payment gateway overrides +% # payment gateway override % ## <TD CLASS="inv" BGCOLOR="<% $bgcolor %>"> <TABLE CLASS="inv" CELLSPACING=0 CELLPADDING=0> -% foreach my $override ( -% # sort { } want taxclass-full stuff first? and default cards (empty cardtype) -% qsearch('agent_payment_gateway', { 'agentnum' => $agent->agentnum } ) -% ) { -% - +% my $gw_override = qsearchs('agent_payment_gateway', { 'agentnum' => $agent->agentnum } ); +% if ($gw_override) { <TR> <TD> - <% $override->cardtype || 'Default' %> to <% $override->payment_gateway->gateway_module %> (<% $override->payment_gateway->gateway_username %>) - <% $override->taxclass - ? ' for '. $override->taxclass. ' only' - : '' - %> - <FONT SIZE=-1><A HREF="javascript:areyousure('delete this payment gateway override', '<%$p%>misc/delete-agent_payment_gateway.cgi?<% $override->agentgatewaynum %>')">(delete)</A></FONT> + <% $gw_override->payment_gateway->gateway_module %> (<% $gw_override->payment_gateway->gateway_username %>) + <FONT SIZE=-1><A HREF="javascript:areyousure('delete this payment gateway override', '<%$p%>misc/delete-agent_payment_gateway.cgi?<% $gw_override->agentgatewaynum %>')">(delete)</A></FONT> </TD> </TR> -% } - +% } else { <TR> <TD><FONT SIZE=-1><A HREF="<%$p%>edit/agent_payment_gateway.html?agentnum=<% $agent->agentnum %>">(add override)</A></FONT></TD> </TR> +% } </TABLE> </TD> diff --git a/httemplate/edit/agent_payment_gateway.html b/httemplate/edit/agent_payment_gateway.html index 41a9f3e95..753bc763c 100644 --- a/httemplate/edit/agent_payment_gateway.html +++ b/httemplate/edit/agent_payment_gateway.html @@ -1,6 +1,6 @@ <% 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.html', + 'View all agents' => $p. 'browse/agent.cgi', )) %> <% include('/elements/error.html') %> @@ -20,32 +20,6 @@ Use gateway <SELECT NAME="gatewaynum"> </SELECT> <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', -% 'PayPal', -%) { - - <OPTION VALUE="<% $cardtype %>"><% $cardtype || '(Default fallback)' %> -% } - -</SELECT> -<BR><BR> - -(optional) when invoice contains only items of taxclass <INPUT TYPE="text" NAME="taxclass"> -<BR><BR> - <INPUT TYPE="submit" VALUE="Add gateway override"> </FORM> diff --git a/httemplate/edit/process/agent_payment_gateway.html b/httemplate/edit/process/agent_payment_gateway.html index 5b5fd948a..c9789cff6 100644 --- a/httemplate/edit/process/agent_payment_gateway.html +++ b/httemplate/edit/process/agent_payment_gateway.html @@ -10,20 +10,13 @@ die "agentnum $1 not found" unless $agent; #my $old -my @new = map { - my $cardtype = $_; - new FS::agent_payment_gateway { +my $new = 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; -} +my $error = $new->insert; +die $error if $error; </%init> |