[freeside-commits] branch master updated. 54355a47c10ecdfd86c26c8f5568f5c2f87de172
Ivan
ivan at 420.am
Wed Feb 1 14:49:06 PST 2017
The branch, master has been updated
via 54355a47c10ecdfd86c26c8f5568f5c2f87de172 (commit)
from 5701cfb8cfe8458f2083957bc13fef15190c201c (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 54355a47c10ecdfd86c26c8f5568f5c2f87de172
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Feb 1 14:49:03 2017 -0800
never blank an existing paycardtype inadvertantly
diff --git a/FS/FS/cust_payby.pm b/FS/FS/cust_payby.pm
index e25d73e..136acf1 100644
--- a/FS/FS/cust_payby.pm
+++ b/FS/FS/cust_payby.pm
@@ -357,14 +357,14 @@ sub check {
or return gettext('invalid_card'); # . ": ". $self->payinfo;
# see parallel checks in check_payinfo_cardtype & payinfo_Mixin::payinfo_check
- my $cardtype = '';
+ my $cardtype = $self->paycardtype;
if ( $self->tokenized ) {
if ( $self->paymask =~ /^\d+x/ ) {
$cardtype = cardtype($self->paymask);
} else {
- $cardtype = '';
#return "paycardtype required ".
- # "(can't derive from a token and no paymask w/prefix provided)";
+ # "(can't derive from a token and no paymask w/prefix provided)"
+ # unless $cardtype;
}
} else {
$cardtype = cardtype($self->payinfo);
diff --git a/FS/FS/payinfo_Mixin.pm b/FS/FS/payinfo_Mixin.pm
index cb9b723..84759cc 100644
--- a/FS/FS/payinfo_Mixin.pm
+++ b/FS/FS/payinfo_Mixin.pm
@@ -202,7 +202,7 @@ sub payinfo_check {
if ( $self->paymask =~ /^\d+x/ ) {
$self->set('paycardtype', cardtype($self->paymask));
} else {
- $self->set('paycardtype', '');
+ $self->set('paycardtype', '') unless $self->paycardtype;
#return "paycardtype required ".
# "(can't derive from a token and no paymask w/prefix provided)";
}
@@ -233,7 +233,7 @@ sub payinfo_check {
# if we can't decrypt the card, at least detect the cardtype
$self->set('paycardtype', cardtype($self->paymask));
} else {
- $self->set('paycardtype', '');
+ $self->set('paycardtype', '') unless $self->paycardtype;
# return "paycardtype required ".
# "(can't derive from a token and no paymask w/prefix provided)";
}
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_payby.pm | 6 +++---
FS/FS/payinfo_Mixin.pm | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
More information about the freeside-commits
mailing list