- <SELECT NAME="gateway_module" SIZE=1>
- <% foreach my $module ( qw(
- 2CheckOut
- AuthorizeNet
- BankOfAmerica
- Beanstream
- Capstone
- Cardstream
- CashCow
- CyberSource
- eSec
- eSelectPlus
- Exact
- iAuthorizer
- IPaymentTPG
- Jettis
- LinkPoint
- MerchantCommerce
- Network1Financial
- OCV
- OpenECHO
- PayConnect
- PayflowPro
- PaymentsGateway
- PXPost
- SecureHostingUPG
- Skipjack
- StGeorge
- SurePay
- TCLink
- TransactionCentral
- VirtualNet
- ) ) {
- %>
- <OPTION VALUE="<%= $module %>"><%= $module %>
- <% } %>
- </SELECT>
-
- <% } %>
-
- </TD>
-</TR>
-
-<TR>
- <TH ALIGN="right">Username: </TH>
- <TD><INPUT TYPE="text" NAME="gateway_username" VALUE="<%= $payment_gateway->gateway_username %>"></TD>
-</TR>
-
-<TR>
- <TH ALIGN="right">Password: </TH>
- <TD><INPUT TYPE="text" NAME="gateway_password" VALUE="<%= $payment_gateway->gateway_password %>"></TD>
-</TR>
-
-<TR>
- <TH ALIGN="right">Action: </TH>
- <TD>
- <SELECT NAME="gateway_action" SIZE=1>
- <% foreach my $action (
- 'Normal Authorization',
- 'Authorization Only',
- 'Authorization Only, Post Authorization',
- ) {
- %>
- <OPTION VALUE="<%= $action %>"<%= $action eq $payment_gateway->gateway_action ? ' SELECTED' : '' %>><%= $action %>
- <% } %>
- </SELECT>
- </TD>
-</TR>
-
-<TR>
- <TH ALIGN="right">Options: </TH>
- <TD>
- <TEXTAREA ROWS="5" NAME="gateway_options"><%= join("\r", $payment_gateway->options ) %></TEXTAREA>
- </TD>
-</TR>
-
-</TABLE>
-
-<BR><INPUT TYPE="submit" VALUE="<%= $payment_gateway->gatewaynum ? "Apply changes" : "Add gateway" %>">
- </FORM>
- </BODY>
-</HTML>
+<SCRIPT TYPE="text/javascript">
+ var modulesForNamespace = <% to_json(\%modules_for_namespace, {canonical=>1}) %>;
+ function changeNamespace(what) {
+ var ns = what.value;
+ var select_module = document.getElementById('gateway_module');
+ select_module.options.length = 0;
+ for (var x in modulesForNamespace[ns]) {
+ var o = document.createElement('option');
+ o.value = o.text = modulesForNamespace[ns][x];
+ select_module.add(o, null);
+ }
+ }
+</SCRIPT>
+
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+my %modules = (
+ '2CheckOut' => 'Business::OnlinePayment',
+ 'AuthorizeNet' => 'Business::OnlinePayment',
+ 'BankOfAmerica' => 'Business::OnlinePayment', #deprecated?
+ 'Beanstream' => 'Business::OnlinePayment',
+ 'Capstone' => 'Business::OnlinePayment',
+ 'Cardstream' => 'Business::OnlinePayment',
+ 'CashCow' => 'Business::OnlinePayment',
+ 'CyberSource' => 'Business::OnlinePayment',
+ 'eSec' => 'Business::OnlinePayment',
+ 'eSelectPlus' => 'Business::OnlinePayment',
+ 'eWayShared' => 'Business::OnlineThirdPartyPayment',
+ 'ElavonVirtualMerchant' => 'Business::OnlinePayment',
+ 'Exact' => 'Business::OnlinePayment',
+ 'iAuthorizer' => 'Business::OnlinePayment',
+ 'Ingotz' => 'Business::OnlinePayment',
+ 'InternetSecure' => 'Business::OnlinePayment',
+ 'Interswitchng' => 'Business::OnlineThirdPartyPayment',
+ 'IPaymentTPG' => 'Business::OnlinePayment',
+ 'IPPay' => 'Business::OnlinePayment',
+ 'Iridium' => 'Business::OnlinePayment',
+ 'Jettis' => 'Business::OnlinePayment',
+ 'Jety' => 'Business::OnlinePayment',
+ 'LinkPoint' => 'Business::OnlinePayment',
+ 'MerchantCommerce' => 'Business::OnlinePayment',
+ 'Network1Financial' => 'Business::OnlinePayment',
+ 'OCV' => 'Business::OnlinePayment',
+ 'OpenECHO' => 'Business::OnlinePayment',
+ 'PayConnect' => 'Business::OnlinePayment',
+ 'PayflowPro' => 'Business::OnlinePayment',
+ 'PaymenTech' => 'Business::OnlinePayment',
+ 'PaymentsGateway' => 'Business::OnlinePayment',
+ 'PayPal' => 'Business::OnlinePayment',
+ #'PaySystems' => 'Business::OnlinePayment',
+ 'PlugnPay' => 'Business::OnlinePayment',
+ 'PPIPayMover' => 'Business::OnlinePayment',
+ 'Protx' => 'Business::OnlinePayment', #now SagePay
+ 'PXPost' => 'Business::OnlinePayment',
+ 'SagePay' => 'Business::OnlinePayment',
+ 'SecureHostingUPG' => 'Business::OnlinePayment',
+ 'Skipjack' => 'Business::OnlinePayment',
+ 'StGeorge' => 'Business::OnlinePayment',
+ 'SurePay' => 'Business::OnlinePayment',
+ 'TCLink' => 'Business::OnlinePayment',
+ 'TransactionCentral' => 'Business::OnlinePayment',
+ 'TransFirsteLink' => 'Business::OnlinePayment',
+ 'Vanco' => 'Business::OnlinePayment',
+ 'viaKLIX' => 'Business::OnlinePayment',
+ 'VirtualNet' => 'Business::OnlinePayment',
+ 'WesternACH' => 'Business::OnlinePayment',
+ 'WorldPay' => 'Business::OnlinePayment',
+
+ 'KeyBank' => 'Business::BatchPayment',
+ 'Paymentech' => 'Business::BatchPayment',
+ 'TD_EFT' => 'Business::BatchPayment',
+);
+
+my %modules_for_namespace;
+for (keys %modules) {
+ $modules_for_namespace{$modules{$_}} ||= [];
+ push @{ $modules_for_namespace{$modules{$_}} }, $_;
+}