projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7fbe88a
)
fix credit cards showing up as PO#s, RT#16291
author
ivan
<ivan>
Wed, 8 Feb 2012 07:09:45 +0000
(07:09 +0000)
committer
ivan
<ivan>
Wed, 8 Feb 2012 07:09:45 +0000
(07:09 +0000)
FS/FS/ClientAPI/MyAccount.pm
patch
|
blob
|
history
FS/FS/cust_main.pm
patch
|
blob
|
history
diff --git
a/FS/FS/ClientAPI/MyAccount.pm
b/FS/FS/ClientAPI/MyAccount.pm
index
fe47acd
..
563bf9c
100644
(file)
--- a/
FS/FS/ClientAPI/MyAccount.pm
+++ b/
FS/FS/ClientAPI/MyAccount.pm
@@
-585,7
+585,7
@@
sub edit_info {
$p->{'payinfo1'} =~ /^([\dx]+)$/
or return { 'error' => "illegal account number ". $p->{'payinfo1'} };
my $payinfo1 = $1;
$p->{'payinfo1'} =~ /^([\dx]+)$/
or return { 'error' => "illegal account number ". $p->{'payinfo1'} };
my $payinfo1 = $1;
- $p->{'payinfo2'} =~ /^([\dx\.]+)$/ # . turned on by
-require-bank-branch
?
+ $p->{'payinfo2'} =~ /^([\dx\.]+)$/ # . turned on by
echeck-country CA
?
or return { 'error' => "illegal ABA/routing number ". $p->{'payinfo2'} };
my $payinfo2 = $1;
$payinfo = $payinfo1. '@'. $payinfo2;
or return { 'error' => "illegal ABA/routing number ". $p->{'payinfo2'} };
my $payinfo2 = $1;
$payinfo = $payinfo1. '@'. $payinfo2;
@@
-790,7
+790,7
@@
sub validate_payment {
$payinfo = $p->{'payinfo'};
$payinfo = $p->{'payinfo'};
- #more intelligent mathing will be needed here if you change
+ #more intelligent mat
c
hing will be needed here if you change
#card_masking_method and don't remove existing paymasks
$payinfo = $cust_main->payinfo
if $cust_main->paymask eq $payinfo;
#card_masking_method and don't remove existing paymasks
$payinfo = $cust_main->payinfo
if $cust_main->paymask eq $payinfo;
@@
-912,7
+912,7
@@
sub do_process_payment {
if ( $validate->{'save'} ) {
my $new = new FS::cust_main { $cust_main->hash };
if ( $validate->{'save'} ) {
my $new = new FS::cust_main { $cust_main->hash };
- if ($
validate->{'payby'} eq 'CARD' || $validate->{'payby'}
eq 'DCRD') {
+ if ($
payby eq 'CARD' || $payby
eq 'DCRD') {
$new->set( $_ => $validate->{$_} )
foreach qw( payname paystart_month paystart_year payissue payip
address1 address2 city state zip country );
$new->set( $_ => $validate->{$_} )
foreach qw( payname paystart_month paystart_year payissue payip
address1 address2 city state zip country );
diff --git
a/FS/FS/cust_main.pm
b/FS/FS/cust_main.pm
index
da40824
..
5fd0cb6
100644
(file)
--- a/
FS/FS/cust_main.pm
+++ b/
FS/FS/cust_main.pm
@@
-5063,6
+5063,10
@@
sub _upgrade_data { #class method
"UPDATE cust_main SET paydate = SUBSTRING(paydate FROM 1 FOR 5) || '0' || SUBSTRING(paydate FROM 6) WHERE SUBSTRING(paydate FROM 7 FOR 1) = '-'";
}
"UPDATE cust_main SET paydate = SUBSTRING(paydate FROM 1 FOR 5) || '0' || SUBSTRING(paydate FROM 6) WHERE SUBSTRING(paydate FROM 7 FOR 1) = '-'";
}
+ push @statements, #fix the weird BILL with a cc# in payinfo problem
+ #DCRD to be safe, or CARD?
+ "UPDATE cust_main SET payby = 'DCRD' WHERE payby = 'BILL' and length(payinfo) = 16";
+
foreach my $sql ( @statements ) {
my $sth = dbh->prepare($sql) or die dbh->errstr;
$sth->execute or die $sth->errstr;
foreach my $sql ( @statements ) {
my $sth = dbh->prepare($sql) or die dbh->errstr;
$sth->execute or die $sth->errstr;