projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix parsing of multiple To: addresses, #73241
[freeside.git]
/
FS
/
FS
/
payinfo_Mixin.pm
diff --git
a/FS/FS/payinfo_Mixin.pm
b/FS/FS/payinfo_Mixin.pm
index
dfcce2f
..
3a51022
100644
(file)
--- a/
FS/FS/payinfo_Mixin.pm
+++ b/
FS/FS/payinfo_Mixin.pm
@@
-8,7
+8,8
@@
use FS::UID qw(driver_name);
use FS::Cursor;
use Time::Local qw(timelocal);
use FS::Cursor;
use Time::Local qw(timelocal);
-use vars qw($ignore_masked_payinfo);
+# allow_closed_replace only relevant to cust_pay/cust_refund, for upgrade tokenizing
+use vars qw( $ignore_masked_payinfo $allow_closed_replace );
=head1 NAME
=head1 NAME
@@
-213,7
+214,7
@@
sub payinfo_check {
validate($self->payinfo) or return "Illegal credit card number";
return "Unknown card type" if $cardtype eq "Unknown";
} else {
validate($self->payinfo) or return "Illegal credit card number";
return "Unknown card type" if $cardtype eq "Unknown";
} else {
- $self->payinfo('N/A'); #???
+ $self->payinfo('N/A'); #???
re-masks card
}
}
} else {
}
}
} else {
@@
-465,6
+466,7
@@
Optionally, an arbitrary payby and payinfo can be passed.
sub tokenized {
my $self = shift;
my $payinfo = scalar(@_) ? shift : $self->payinfo;
sub tokenized {
my $self = shift;
my $payinfo = scalar(@_) ? shift : $self->payinfo;
+ return 0 unless $payinfo; #avoid uninitialized value error
$payinfo =~ /^99\d{14}$/;
}
$payinfo =~ /^99\d{14}$/;
}