summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2002-04-24 09:09:36 +0000
committerivan <ivan>2002-04-24 09:09:36 +0000
commit70e1035b6a95d2bb0b2bacc4316e9d0a973db813 (patch)
tree7200d8992caf431eff62d3c963405d2e29e9c728 /FS
parentf3d48cda02218523b2cafcc3c3edfe5771d8676e (diff)
require_cardname option
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/Conf.pm7
-rw-r--r--FS/FS/cust_main.pm2
2 files changed, 8 insertions, 1 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 2a7a4c1..3565be9 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -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;
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index 4a6a952..64e9b5f 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -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 \,\.\-\']+)$/