diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-01-13 21:37:38 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-01-13 21:37:38 -0800 |
commit | bdf9732a992deb1332b3496ba112885806a67798 (patch) | |
tree | 324751e9602427d60fafc7f06e90ab18fc7f8d23 /FS/FS/ClientAPI | |
parent | 1552ee615a8f73ee8a72cc85c6e1a2fcfc601dda (diff) |
add option to require cvv for signup, RT#25476
Diffstat (limited to 'FS/FS/ClientAPI')
-rw-r--r-- | FS/FS/ClientAPI/Signup.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm index 57091c4fe..c968d3b2e 100644 --- a/FS/FS/ClientAPI/Signup.pm +++ b/FS/FS/ClientAPI/Signup.pm @@ -174,6 +174,7 @@ sub signup_info { 'card_types' => card_types(), 'paytypes' => [ @FS::cust_main::paytypes ], 'cvv_enabled' => 1, + 'require_cvv' => $conf->exists('signup-require_cvv'), 'stateid_enabled' => $conf->exists('show_stateid'), 'paystate_enabled' => $conf->exists('show_bankstate'), 'ship_enabled' => 1, @@ -631,6 +632,11 @@ sub new_customer { if $gw && $gw->gateway_namespace eq 'Business::OnlineThirdPartyPayment'; } + return { 'error' => "CVV2 is required" } + if $cust_main->payby =~ /^(CARD|DCRD)$/ + && ! $cust_main->paycvv + && $conf->exists('signup-require_cvv'); + $cust_main->payinfo($cust_main->daytime) if $cust_main->payby eq 'LECB' && ! $cust_main->payinfo; |