add a config flag to ignore new style taxes instead of throwing fatal errors
[freeside.git] / httemplate / edit / payment_gateway.html
1 <% include("/elements/header.html","$action Payment gateway", menubar(
2   'View all payment gateways' => $p. 'browse/payment_gateway.html',
3 )) %>
4
5 <% include('/elements/error.html') %>
6
7 <FORM ACTION="<%popurl(1)%>process/payment_gateway.html" METHOD=POST>
8 <INPUT TYPE="hidden" NAME="gatewaynum" VALUE="<% $payment_gateway->gatewaynum %>">
9 Gateway #<% $payment_gateway->gatewaynum || "(NEW)" %>
10
11 <% ntable('#cccccc', 2, '') %>
12
13 <TR>
14   <TH ALIGN="right">Gateway: </TH>
15   <TD>
16 % if ( $payment_gateway->gatewaynum ) { 
17
18
19       <% $payment_gateway->gateway_module %>
20       <INPUT TYPE="hidden" NAME="gateway_module" VALUE="<% $payment_gateway->gateway_module %>">
21 % } else { 
22
23
24       <SELECT NAME="gateway_module" SIZE=1>
25 % foreach my $module ( qw(
26 %             2CheckOut
27 %             AuthorizeNet
28 %             BankOfAmerica
29 %             Beanstream
30 %             Capstone
31 %             Cardstream
32 %             CashCow
33 %             CyberSource
34 %             eSec
35 %             eSelectPlus
36 %             Exact
37 %             iAuthorizer
38 %             IPaymentTPG
39 %             Jettis
40 %             LinkPoint
41 %             MerchantCommerce
42 %             Network1Financial
43 %             OCV
44 %             OpenECHO
45 %             PayConnect
46 %             PayflowPro
47 %             PaymentsGateway
48 %             PXPost
49 %             SecureHostingUPG
50 %             Skipjack
51 %             StGeorge
52 %             SurePay
53 %             TCLink
54 %             TransactionCentral
55 %             TransFirsteLink
56 %             VirtualNet
57 %           ) ) {
58 %        
59
60           <OPTION VALUE="<% $module %>"><% $module %>
61 % } 
62
63       </SELECT>
64 % } 
65
66
67   </TD>
68 </TR>
69
70 <TR>
71   <TH ALIGN="right">Username: </TH>
72   <TD><INPUT TYPE="text" NAME="gateway_username" VALUE="<% $payment_gateway->gateway_username %>"></TD>
73 </TR>
74
75 <TR>
76   <TH ALIGN="right">Password: </TH>
77   <TD><INPUT TYPE="text" NAME="gateway_password" VALUE="<% $payment_gateway->gateway_password %>"></TD>
78 </TR>
79
80 <TR>
81   <TH ALIGN="right">Action: </TH>
82   <TD>
83     <SELECT NAME="gateway_action" SIZE=1>
84 % foreach my $action ( 
85 %                              'Normal Authorization',
86 %                              'Authorization Only',
87 %                              'Authorization Only, Post Authorization',
88 %                            ) {
89 %      
90
91         <OPTION VALUE="<% $action %>"<% $action eq $payment_gateway->gateway_action ? ' SELECTED' : '' %>><% $action %>
92 % } 
93
94     </SELECT>
95   </TD>
96 </TR>
97
98 <TR>
99   <TH ALIGN="right">Options: (Name/Value pairs, one element per line)</TH>
100   <TD>
101     <TEXTAREA ROWS="5" NAME="gateway_options"><% join("\r", $payment_gateway->options ) %></TEXTAREA>
102   </TD>
103 </TR>
104
105 </TABLE>
106
107 <BR><INPUT TYPE="submit" VALUE="<% $payment_gateway->gatewaynum ? "Apply changes" : "Add gateway" %>">
108     </FORM>
109
110 <% include('/elements/footer.html') %>
111
112 <%init>
113
114 die "access denied"
115   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
116
117 my $payment_gateway;
118 if ( $cgi->param('error') ) {
119   $payment_gateway = new FS::payment_gateway ( {
120     map { $_, scalar($cgi->param($_)) } fields('payment_gateway')
121   } );
122 } elsif ( $cgi->keywords ) {
123   my($query) = $cgi->keywords;
124   $query =~ /^(\d+)$/;
125   $payment_gateway = qsearchs( 'payment_gateway', { 'gatewaynum' => $1 } );
126 } else { #adding
127   $payment_gateway = new FS::payment_gateway {};
128 }
129 my $action = $payment_gateway->gatewaynum ? 'Edit' : 'Add';
130 #my $hashref = $payment_gateway->hashref;
131
132 </%init>