require_cardname option
authorivan <ivan>
Wed, 24 Apr 2002 09:09:36 +0000 (09:09 +0000)
committerivan <ivan>
Wed, 24 Apr 2002 09:09:36 +0000 (09:09 +0000)
FS/FS/Conf.pm
FS/FS/cust_main.pm

index 2a7a4c1..3565be9 100644 (file)
@@ -909,6 +909,13 @@ httemplate/docs/config.html
     'type'        => 'checkbox',
   },
 
+  {
+    'key'         => 'require_cardname',
+    'section'     => 'billing',
+    'description' => 'Require an "Exact name on card" to be entered explicitly; don\'t default to using the first and last name.',
+    'type'        => 'checkbox',
+  },
+
 );
 
 1;
index 4a6a952..64e9b5f 100644 (file)
@@ -689,7 +689,7 @@ sub check {
     return gettext('expired_card') if $y<$nowy || ( $y==$nowy && $1<$nowm );
   }
 
-  if ( $self->payname eq '' ) {
+  if ( $self->payname eq '' && ! $conf->exists('require_cardname') ) {
     $self->payname( $self->first. " ". $self->getfield('last') );
   } else {
     $self->payname =~ /^([\w \,\.\-\']+)$/