projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cc7638f
)
also mask EDI acct# on invoices, #26859
author
Mark Wells
<mark@freeside.biz>
Tue, 28 Jan 2014 00:52:32 +0000
(16:52 -0800)
committer
Mark Wells
<mark@freeside.biz>
Tue, 28 Jan 2014 00:52:32 +0000
(16:52 -0800)
FS/FS/payinfo_Mixin.pm
patch
|
blob
|
history
diff --git
a/FS/FS/payinfo_Mixin.pm
b/FS/FS/payinfo_Mixin.pm
index
1104e3f
..
e14c589
100644
(file)
--- a/
FS/FS/payinfo_Mixin.pm
+++ b/
FS/FS/payinfo_Mixin.pm
@@
-159,6
+159,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;
}
@@
-269,6
+276,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;
} elsif ( $self->payby eq 'PPAL' ) {
$lh->maketext('PayPal transaction#') . $self->order_number;
} else {
} elsif ( $self->payby eq 'PPAL' ) {
$lh->maketext('PayPal transaction#') . $self->order_number;
} else {