[freeside-commits] branch FREESIDE_3_BRANCH updated. 297ddd01fb112cf45a6dab819ec56803c953bda5

Ivan ivan at 420.am
Wed Apr 23 13:34:02 PDT 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  297ddd01fb112cf45a6dab819ec56803c953bda5 (commit)
      from  8b8ebd929229c8376bb81076071c5e76d2baa0ee (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 297ddd01fb112cf45a6dab819ec56803c953bda5
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Apr 23 13:34:00 2014 -0700

    selfservice-require_cvv configuration option, RT#28486

diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index 54d5306..d3b58e3 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -850,6 +850,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') ],
@@ -1026,6 +1029,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 508a6c3..5f50eca 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -2661,7 +2661,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,
   },
@@ -2674,6 +2674,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.',

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/ClientAPI/MyAccount.pm |    5 +++++
 FS/FS/Conf.pm                |    9 ++++++++-
 2 files changed, 13 insertions(+), 1 deletions(-)




More information about the freeside-commits mailing list