[freeside-commits] branch master updated. 4d77cd40a01ff3526aa92adccca89d305f232eea
Mark Wells
mark at 420.am
Fri Jul 22 09:57:36 PDT 2016
The branch, master has been updated
via 4d77cd40a01ff3526aa92adccca89d305f232eea (commit)
via 61eae331f47a5482f7e1ee8dfa6c5c0b4461f32e (commit)
via 3694d0f6d331847947a72e26b1778b7f19d73cad (commit)
from 6262584c58bdc26ee7e7958e3a96483efe88500e (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 4d77cd40a01ff3526aa92adccca89d305f232eea
Author: Mark Wells <mark at freeside.biz>
Date: Fri Jul 22 09:57:25 2016 -0700
turn off debugging, make Tokenized work
diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html
index 03aaedd..2361624 100755
--- a/httemplate/search/elements/cust_pay_or_refund.html
+++ b/httemplate/search/elements/cust_pay_or_refund.html
@@ -74,6 +74,7 @@ my %cardtype_of = (
'Amex' => q['American Express card'],
'Discover' => q['Discover card'],
'Maestro' => q['Switch', 'Solo', 'Laser'],
+ 'Tokenized' => q['Tokenized'],
);
</%shared>
<%init>
@@ -326,18 +327,9 @@ if ( $cgi->param('magic') ) {
if ( $subtype ) {
- if ( $subtype eq 'Tokenized' ) {
-
- $payby_search .= " AND substring($table.payinfo from 1 for 2 ) = '99' ";
- # XXX should store the cardtype as 'Tokenized' in this case?
-
- } else {
-
- my $in_cardtype = $cardtype_of{$subtype}
- or die "unknown card type $subtype";
- $payby_search .= " AND $table.paycardtype IN($in_cardtype)";
-
- }
+ my $in_cardtype = $cardtype_of{$subtype}
+ or die "unknown card type $subtype";
+ $payby_search .= " AND $table.paycardtype IN($in_cardtype)";
}
@@ -499,8 +491,6 @@ if ( $cgi->param('magic') ) {
'addl_from' => $addl_from,
};
-warn Dumper \$sql_query;
-
} else {
#hmm... is this still used?
commit 61eae331f47a5482f7e1ee8dfa6c5c0b4461f32e
Author: Mark Wells <mark at freeside.biz>
Date: Thu Jul 21 19:57:31 2016 -0700
set card types in a queued job to avoid excessive upgrade time, #71291
diff --git a/FS/FS/payinfo_Mixin.pm b/FS/FS/payinfo_Mixin.pm
index 4f26e8c..5f7ce35 100644
--- a/FS/FS/payinfo_Mixin.pm
+++ b/FS/FS/payinfo_Mixin.pm
@@ -420,15 +420,30 @@ sub paydate_epoch_sql {
Find all records with a credit card payment type and no paycardtype, and
replace them in order to set their paycardtype.
+This method actually just starts a queue job.
+
=cut
sub upgrade_set_cardtype {
my $class = shift;
+ my $table = $class->table or die "upgrade_set_cardtype needs a table";
+
+ if ( ! FS::upgrade_journal->is_done("${table}__set_cardtype") ) {
+ my $job = FS::queue->new({ job => 'FS::payinfo_Mixin::process_set_cardtype' });
+ my $error = $job->insert($table);
+ die $error if $error;
+ FS::upgrade_journal->set_done("${table}__set_cardtype");
+ }
+}
+
+sub process_set_cardtype {
+ my $table = shift;
+
# assign cardtypes to CARD/DCRDs that need them; check_payinfo_cardtype
# will do this. ignore any problems with the cards.
local $ignore_masked_payinfo = 1;
my $search = FS::Cursor->new({
- table => $class->table,
+ table => $table,
extra_sql => q[ WHERE payby IN('CARD','DCRD') AND paycardtype IS NULL ],
});
while (my $record = $search->fetch) {
commit 3694d0f6d331847947a72e26b1778b7f19d73cad
Author: Mark Wells <mark at freeside.biz>
Date: Thu Jul 21 15:05:50 2016 -0700
demand Business::CreditCard 0.36 in package specs
diff --git a/debian/control b/debian/control
index 24ddea3..4de8fee 100644
--- a/debian/control
+++ b/debian/control
@@ -28,7 +28,7 @@ Description: Billing and trouble ticketing for service providers
Package: freeside-lib
Architecture: all
Depends: aspell-en,gnupg,ghostscript,gsfonts,gzip,latex-xcolor,
- libbusiness-creditcard-perl,libcache-cache-perl,
+ libbusiness-creditcard-perl (>= 0.36),libcache-cache-perl,
libcache-simple-timedexpiry-perl,libchart-perl,libclass-container-perl,
libclass-data-inheritable-perl,libclass-returnvalue-perl,libcolor-scheme-perl,
libcompress-zlib-perl,libconvert-binhex-perl,libcrypt-passwdmd5-perl,
-----------------------------------------------------------------------
Summary of changes:
FS/FS/payinfo_Mixin.pm | 17 ++++++++++++++++-
debian/control | 2 +-
httemplate/search/elements/cust_pay_or_refund.html | 18 ++++--------------
3 files changed, 21 insertions(+), 16 deletions(-)
More information about the freeside-commits
mailing list