diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-09-11 02:23:37 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-09-11 02:23:37 -0700 |
commit | 3dff65c08ed16024f5fd5f55d23551f485ced164 (patch) | |
tree | 9096c1ab5ebeeffaef771169f157734010752c24 /FS/FS/payinfo_Mixin.pm | |
parent | f41b13b6abee080901f3b8d10ed7918102970ae6 (diff) |
multiple payment options, RT#23741
Diffstat (limited to 'FS/FS/payinfo_Mixin.pm')
-rw-r--r-- | FS/FS/payinfo_Mixin.pm | 18 |
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 |