summaryrefslogtreecommitdiff
path: root/FS/FS/payinfo_Mixin.pm
diff options
context:
space:
mode:
Diffstat (limited to 'FS/FS/payinfo_Mixin.pm')
-rw-r--r--FS/FS/payinfo_Mixin.pm18
1 files changed, 7 insertions, 11 deletions
diff --git a/FS/FS/payinfo_Mixin.pm b/FS/FS/payinfo_Mixin.pm
index 66c1e59..ef260cf 100644
--- a/FS/FS/payinfo_Mixin.pm
+++ b/FS/FS/payinfo_Mixin.pm
@@ -76,20 +76,16 @@ Card Verification Value, "CVV2" (also known as CVC2 or CID), the 3 or 4 digit nu
=cut
+#this prevents encrypting empty values on insert?
sub paycvv {
my($self,$paycvv) = @_;
- # This is only allowed in cust_main... Even then it really shouldn't be stored...
- if ($self->table eq 'cust_main') {
- if ( defined($paycvv) ) {
- $self->setfield('paycvv', $paycvv); # This is okay since we are the 'setter'
- } else {
- $paycvv = $self->getfield('paycvv'); # This is okay since we are the 'getter'
- return $paycvv;
- }
+ # This is only allowed in cust_payby (formerly cust_main)
+ # It shouldn't be stored longer than necessary to run the first transaction
+ if ( defined($paycvv) ) {
+ $self->setfield('paycvv', $paycvv);
} else {
-# warn "This doesn't work for other tables besides cust_main
- '';
- }
+ $self->getfield('paycvv');
+ }
}
=item paymask