summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-04-23 13:33:59 -0700
committerIvan Kohler <ivan@freeside.biz>2014-04-23 13:33:59 -0700
commit6bf2bd02e49b8e1beb8a334e842f56d62e89bd11 (patch)
treea2f4c3b7902f38a9f5f42f9465666b6ba4113694
parent7ff73ebf72cb30c9e9b8135038c30832d8f9188b (diff)
selfservice-require_cvv configuration option, RT#28486
-rw-r--r--FS/FS/ClientAPI/MyAccount.pm5
-rw-r--r--FS/FS/Conf.pm9
2 files changed, 13 insertions, 1 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index 4f4121900..d4c0d3723 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -839,6 +839,9 @@ sub payment_info {
'card_types' => card_types(),
+ 'withcvv' => $conf->exists('selfservice-require_cvv'), #or enable optional cvv?
+ 'require_cvv' => $conf->exists('selfservice-require_cvv'),
+
'paytypes' => [ @FS::cust_main::paytypes ],
'paybys' => [ $conf->config('signup_server-payby') ],
@@ -1015,6 +1018,8 @@ sub validate_payment {
or return { 'error' => "CVV2 (CVC2/CID) is three digits." };
$paycvv = $1;
}
+ } elsif ( $conf->exists('selfservice-require_cvv') ) { #and you weren't using a card on file?
+ return { 'error' => 'CVV2 is required' };
}
} else {
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index a61dbd465..59198045d 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -2662,7 +2662,7 @@ and customer address. Include units.',
{
'key' => 'cvv-save',
'section' => 'billing',
- 'description' => 'Save CVV2 information after the initial transaction for the selected credit card types. Enabling this option may be in violation of your merchant agreement(s), so please check them carefully before enabling this option for any credit card types.',
+ 'description' => 'NOT RECOMMENDED. Saves CVV2 information after the initial transaction for the selected credit card types. Enabling this option is almost certainly in violation of your merchant agreement(s), so please check them carefully before enabling this option for any credit card types.',
'type' => 'selectmultiple',
'select_enum' => \@card_types,
},
@@ -2675,6 +2675,13 @@ and customer address. Include units.',
},
{
+ 'key' => 'selfservice-require_cvv',
+ 'section' => 'self-service',
+ 'description' => 'Require CVV for credit card self-service payments.',
+ 'type' => 'checkbox',
+ },
+
+ {
'key' => 'manual_process-pkgpart',
'section' => 'billing',
'description' => 'Package to add to each manual credit card and ACH payment entered by employees from the backend. Enabling this option may be in violation of your merchant agreement(s), so please check it(/them) carefully before enabling this option.',