From 70e1035b6a95d2bb0b2bacc4316e9d0a973db813 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 24 Apr 2002 09:09:36 +0000 Subject: [PATCH] require_cardname option --- FS/FS/Conf.pm | 7 +++++++ FS/FS/cust_main.pm | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 2a7a4c103..3565be965 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 4a6a95251..64e9b5f91 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 \,\.\-\']+)$/ -- 2.11.0