'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') ],
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 {
{
'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,
},
'type' => 'checkbox',
},
+ {
+ 'key' => 'selfservice-require_cvv',
+ 'section' => 'self-service',
+ 'description' => 'Require CVV for credit card self-service payments.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'manual_process-pkgpart',
'section' => 'billing',