[freeside-commits] branch FREESIDE_3_BRANCH updated. 0b84aeb64263783a180012aa79a91626701ae391
Ivan
ivan at 420.am
Wed Jan 25 17:31:17 PST 2017
The branch, FREESIDE_3_BRANCH has been updated
via 0b84aeb64263783a180012aa79a91626701ae391 (commit)
from baca421d2fa815a6338e9525e3e404928b59235e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0b84aeb64263783a180012aa79a91626701ae391
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Jan 25 17:31:14 2017 -0800
fix upgrades, fix bogus "Tokenized" paycardtype, RT#71513
diff --git a/FS/FS/payinfo_Mixin.pm b/FS/FS/payinfo_Mixin.pm
index 520b245..bca0878 100644
--- a/FS/FS/payinfo_Mixin.pm
+++ b/FS/FS/payinfo_Mixin.pm
@@ -199,14 +199,16 @@ sub payinfo_check {
if ( $self->payby eq 'CARD' && ! $self->is_encrypted($self->payinfo) ) {
- my $payinfo = $self->payinfo;
- my $cardtype = cardtype($payinfo);
- $cardtype = 'Tokenized' if $payinfo =~ /^99\d{14}$/;
- $self->set('paycardtype', $cardtype);
+ if ( $self->payinfo =~ /^99\d{14}$/ && ! $self->paycardtype ) {
+ return "paycardtype required (cannot be derived from a token)";
+ } else {
+ $self->set('paycardtype', cardtype($self->payinfo));
+ }
if ( $ignore_masked_payinfo and $self->mask_payinfo eq $self->payinfo ) {
# allow it
} else {
+ my $payinfo = $self->payinfo;
$payinfo =~ s/\D//g;
$self->payinfo($payinfo);
if ( $self->payinfo ) {
@@ -214,7 +216,7 @@ sub payinfo_check {
or return "Illegal (mistyped?) credit card number (payinfo)";
$self->payinfo($1);
validate($self->payinfo) or return "Illegal credit card number";
- return "Unknown card type" if $cardtype eq "Unknown";
+ return "Unknown card type" if $self->paycardtype eq "Unknown";
} else {
$self->payinfo('N/A'); #???
}
-----------------------------------------------------------------------
Summary of changes:
FS/FS/payinfo_Mixin.pm | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
More information about the freeside-commits
mailing list