changes to support eWay third-party payment, #10208
[freeside.git] / FS / FS / Conf.pm
index 072982a..5fb5a27 100644 (file)
@@ -584,6 +584,26 @@ my %msg_template_options = (
   'per_agent' => 1,
 );
 
+my $_gateway_name = sub {
+  my $g = shift;
+  return '' if !$g;
+  ($g->gateway_username . '@' . $g->gateway_module);
+};
+
+my %payment_gateway_options = (
+  'type'        => 'select-sub',
+  'options_sub' => sub {
+    my @gateways = qsearch({
+        'table' => 'payment_gateway',
+        'hashref' => { 'disabled' => '' },
+      });
+    map { $_->gatewaynum, $_gateway_name->($_) } @gateways;
+  },
+  'option_sub'  => sub {
+    my $gateway = FS::payment_gateway->by_key(shift);
+    $_gateway_name->($gateway);
+  },
+);
 
 #Billing (81 items)
 #Invoicing (50 items)
@@ -1726,6 +1746,13 @@ and customer address. Include units.',
   },
 
   {
+    'key'         => 'selfservice-payment_gateway',
+    'section'     => 'self-service',
+    'description' => 'Force the use of this payment gateway for self-service.',
+    %payment_gateway_options,
+  },
+
+  {
     'key'         => 'selfservice-save_unchecked',
     'section'     => 'self-service',
     'description' => 'In self-service, uncheck "Remember information" checkboxes by default (normally, they are checked by default).',
@@ -2270,6 +2297,28 @@ and customer address. Include units.',
   },
 
   {
+    'key'         => 'selfservice_server-login_svcpart',
+    'section'     => 'self-service',
+    'description' => 'If specified, only allow the specified svcparts to login to self-service.',
+    'type'        => 'select-part_svc',
+    'multiple'    => 1,
+  },
+  
+  {
+    'key'         => 'selfservice-recent-did-age',
+    'section'     => 'self-service',
+    'description' => 'If specified, defines "recent", in number of seconds, for "Download recently allocated DIDs" in self-service.',
+    'type'        => 'text',
+  },
+
+  {
+    'key'         => 'selfservice_server-view-wholesale',
+    'section'     => 'self-service',
+    'description' => 'If enabled, use a wholesale package view in the self-service.',
+    'type'        => 'checkbox',
+  },
+  
+  {
     'key'         => 'selfservice-agent_signup',
     'section'     => 'self-service',
     'description' => 'Allow agent signup via self-service.',
@@ -2949,7 +2998,7 @@ and customer address. Include units.',
 #  {
 #    'key'         => 'batch-manual_approval',
 #    'section'     => 'billing',
-#    'description' => 'Allow manual batch closure, which will approve all payments that do not yet have a status.  This is dangerous, but may be needed if your processor does not provide a list of approved payments.',
+#    'description' => 'Allow manual batch closure, which will approve all payments that do not yet have a status.  This is very dangerous.',
 #    'type'        => 'checkbox',
 #  },
 #
@@ -4117,6 +4166,20 @@ and customer address. Include units.',
     'type'        => 'textarea',
   },
 
+  {
+    'key'         => 'menu-prepend_links',
+    'section'     => 'UI',
+    'description' => 'Links to prepend to the main menu, one per line, with format "URL Link Label (optional ALT popup)".',
+    'type'        => 'textarea',
+  },
+
+  {
+    'key'         => 'cust_main-external_links',
+    'section'     => 'UI',
+    'description' => 'External links available in customer view, one per line, with format "URL Link Label (optional ALT popup)".  The URL will have custnum appended.',
+    'type'        => 'textarea',
+  },
+
   { key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
   { key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
   { key => "apachemachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },