projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e2c0189
)
also mask EDI acct# on invoices, #26859
author
Mark Wells
<mark@freeside.biz>
Fri, 24 Jan 2014 00:08:53 +0000
(16:08 -0800)
committer
Mark Wells
<mark@freeside.biz>
Fri, 24 Jan 2014 00:08:53 +0000
(16:08 -0800)
FS/FS/payinfo_Mixin.pm
patch
|
blob
|
history
diff --git
a/FS/FS/payinfo_Mixin.pm
b/FS/FS/payinfo_Mixin.pm
index
f202bbd
..
23d24a8
100644
(file)
--- a/
FS/FS/payinfo_Mixin.pm
+++ b/
FS/FS/payinfo_Mixin.pm
@@
-169,6
+169,13
@@
sub mask_payinfo {
substr($account,(length($account)-2)).
( length($aba) ? "@".$aba : '');
substr($account,(length($account)-2)).
( length($aba) ? "@".$aba : '');
+ } elsif ($payby eq 'EDI') {
+ # EDI.
+ # These numbers have been seen anywhere from 8 to 30 digits, and
+ # possibly more. Lacking any better idea I'm going to mask all but
+ # the last 4 digits.
+ return 'x' x (length($payinfo) - 4) . substr($payinfo, -4);
+
} else { # Tie up loose ends
return $payinfo;
}
} else { # Tie up loose ends
return $payinfo;
}
@@
-277,6
+284,8
@@
sub payby_payinfo_pretty {
$lh->maketext('Western Union');
} elsif ( $self->payby eq 'MCRD' ) {
$lh->maketext('Manual credit card');
$lh->maketext('Western Union');
} elsif ( $self->payby eq 'MCRD' ) {
$lh->maketext('Manual credit card');
+ } elsif ( $self->payby eq 'EDI' ) {
+ $lh->maketext('EDI') . ' ' . $self->paymask;
} else {
$self->payby. ' '. $self->payinfo;
}
} else {
$self->payby. ' '. $self->payinfo;
}