add cvv-save configuration value to save the cvv data for specific card types
authorivan <ivan>
Fri, 24 Oct 2003 20:38:12 +0000 (20:38 +0000)
committerivan <ivan>
Fri, 24 Oct 2003 20:38:12 +0000 (20:38 +0000)
FS/FS/Conf.pm
FS/FS/cust_bill.pm

index 7a827dc..a58c7fe 100644 (file)
@@ -1087,6 +1087,22 @@ httemplate/docs/config.html
     'type'        => 'textarea',
   },
 
+  {
+    '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.',
+    'type'        => 'selectmultiple',
+    'select_enum' => [ "VISA card",
+                       "MasterCard",
+                       "Discover card",
+                       "American Express card",
+                       "Diner's Club/Carte Blanche",
+                       "enRoute",
+                       "JCB",
+                       "BankCard",
+                     ],
+  },
+
 );
 
 1;
index a4039c3..94299e8 100644 (file)
@@ -841,6 +841,8 @@ sub realtime_bop {
   # (though that probably violates cardholder agreements)
   if ( defined $cust_main->dbdef_table->column('paycvv')
        && length($cust_main->paycvv)
+       && ! grep { $_ eq cardtype($cust_main->payinfo) } $conf->config('cvv-save')
+
   ) {
     my $new = new FS::cust_main { $cust_main->hash };
     $new->paycvv('');