1 <% include("/elements/header.html","$action Payment gateway", menubar(
2 'View all payment gateways' => $p. 'browse/payment_gateway.html',
5 <% include('/elements/error.html') %>
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)" %>
11 <% ntable('#cccccc', 2, '') %>
14 <TH ALIGN="right">Gateway: </TH>
16 % if ( $payment_gateway->gatewaynum ) {
19 <% $payment_gateway->gateway_module %>
20 <INPUT TYPE="hidden" NAME="gateway_module" VALUE="<% $payment_gateway->gateway_module %>">
24 <SELECT NAME="gateway_module" SIZE=1>
25 % foreach my $module ( qw(
60 <OPTION VALUE="<% $module %>"><% $module %>
71 <TH ALIGN="right">Username: </TH>
72 <TD><INPUT TYPE="text" NAME="gateway_username" VALUE="<% $payment_gateway->gateway_username %>"></TD>
76 <TH ALIGN="right">Password: </TH>
77 <TD><INPUT TYPE="text" NAME="gateway_password" VALUE="<% $payment_gateway->gateway_password %>"></TD>
81 <TH ALIGN="right">Action: </TH>
83 <SELECT NAME="gateway_action" SIZE=1>
84 % foreach my $action (
85 % 'Normal Authorization',
86 % 'Authorization Only',
87 % 'Authorization Only, Post Authorization',
91 <OPTION VALUE="<% $action %>"<% $action eq $payment_gateway->gateway_action ? ' SELECTED' : '' %>><% $action %>
99 <TH ALIGN="right">Options: (Name/Value pairs, one element per line)</TH>
101 <TEXTAREA ROWS="5" NAME="gateway_options"><% join("\r", $payment_gateway->options ) %></TEXTAREA>
107 <BR><INPUT TYPE="submit" VALUE="<% $payment_gateway->gatewaynum ? "Apply changes" : "Add gateway" %>">
110 <% include('/elements/footer.html') %>
115 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
118 if ( $cgi->param('error') ) {
119 $payment_gateway = new FS::payment_gateway ( {
120 map { $_, scalar($cgi->param($_)) } fields('payment_gateway')
122 } elsif ( $cgi->keywords ) {
123 my($query) = $cgi->keywords;
125 $payment_gateway = qsearchs( 'payment_gateway', { 'gatewaynum' => $1 } );
127 $payment_gateway = new FS::payment_gateway {};
129 my $action = $payment_gateway->gatewaynum ? 'Edit' : 'Add';
130 #my $hashref = $payment_gateway->hashref;