summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2003-10-24 20:38:10 +0000
committerivan <ivan>2003-10-24 20:38:10 +0000
commit3da1a075bdfba74af39b52a468241bc2e12d2692 (patch)
tree8b8bd845d03abf8f576acffd071105750b7197b3
parentf63c0e821610c885f9f49d301eeccf804e1ca6d3 (diff)
add cvv-save configuration value to save the cvv data for specific card types
-rw-r--r--FS/FS/Conf.pm16
-rw-r--r--FS/FS/cust_main.pm1
2 files changed, 17 insertions, 0 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 51feb3847..ea32b2c23 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -1080,6 +1080,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;
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index 0ab2aa50d..1d2e9edcd 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -1791,6 +1791,7 @@ sub realtime_bop {
# (though that probably violates cardholder agreements)
if ( defined $self->dbdef_table->column('paycvv')
&& length($self->paycvv)
+ && ! grep { $_ eq cardtype($self->payinfo) } $conf->config('cvv-save')
) {
my $new = new FS::cust_main { $self->hash };
$new->paycvv('');