[freeside-commits] branch FREESIDE_3_BRANCH updated. 34c0d2df4fc583073c164fc60653b485a4f4737f
Ivan
ivan at 420.am
Thu Feb 23 15:18:55 PST 2017
The branch, FREESIDE_3_BRANCH has been updated
via 34c0d2df4fc583073c164fc60653b485a4f4737f (commit)
from e0a6fad4e70e9027386be67c7cc38ad1337715fb (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 34c0d2df4fc583073c164fc60653b485a4f4737f
Author: Ivan Kohler <ivan at freeside.biz>
Date: Thu Feb 23 15:18:52 2017 -0800
fix "Unknown card type" error when using tokenization on v3? RT#74750
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index 54f5613..cfe93a9 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -1968,7 +1968,19 @@ sub check {
validate($payinfo)
or return gettext('invalid_card'); # . ": ". $self->payinfo;
- my $cardtype = cardtype($payinfo);
+ my $cardtype = $self->paycardtype;
+ if ( $payinfo =~ /^99\d{14}$/ ) {
+ $self->('is_tokenized', 'Y'); #so we don't try to do it again
+ if ( $self->paymask =~ /^\d+x/ ) {
+ $cardtype = cardtype($self->paymask);
+ } else {
+ #return "paycardtype required ".
+ # "(can't derive from a token and no paymask w/prefix provided)"
+ # unless $cardtype;
+ }
+ } else {
+ $cardtype = cardtype($self->payinfo);
+ }
return gettext('unknown_card_type') if $cardtype eq 'Unknown';
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_main.pm | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list