allow third-party payment customers to be recorded as CARD, #11734
authormark <mark>
Thu, 3 Mar 2011 19:08:46 +0000 (19:08 +0000)
committermark <mark>
Thu, 3 Mar 2011 19:08:46 +0000 (19:08 +0000)
FS/FS/ClientAPI/Signup.pm
FS/FS/Conf.pm

index 50b0b5d..b18f21f 100644 (file)
@@ -586,7 +586,8 @@ sub new_customer {
     unless grep { $_ eq $packet->{'payby'} }
                 $conf->config('signup_server-payby');
 
     unless grep { $_ eq $packet->{'payby'} }
                 $conf->config('signup_server-payby');
 
-  if (FS::payby->realtime($packet->{payby})) {
+  if (FS::payby->realtime($packet->{payby})
+    and not $conf->exists('signup_server-third_party_as_card')) {
     my $payby = $packet->{payby};
 
     my $agent = qsearchs('agent', { 'agentnum' => $agentnum });
     my $payby = $packet->{payby};
 
     my $agent = qsearchs('agent', { 'agentnum' => $agentnum });
index 3f53989..d42956b 100644 (file)
@@ -1921,6 +1921,13 @@ and customer address. Include units.',
   },
 
   {
   },
 
   {
+    'key'         => 'signup_server-third_party_as_card',
+    'section'     => 'self-service',
+    'description' => 'Allow customer payment type to be set to CARD even when using third-party credit card billing.',
+    'type'        => 'checkbox',
+  },
+
+  {
     'key'         => 'selfservice-xmlrpc',
     'section'     => 'self-service',
     'description' => 'Run a standalone self-service XML-RPC server on the backend (on port 8080).',
     'key'         => 'selfservice-xmlrpc',
     'section'     => 'self-service',
     'description' => 'Run a standalone self-service XML-RPC server on the backend (on port 8080).',