[freeside-commits] freeside/FS/FS/ClientAPI MyAccount.pm, 1.53.2.12, 1.53.2.13
Ivan,,,
ivan at wavetail.420.am
Tue Jul 1 19:55:54 PDT 2008
Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory wavetail.420.am:/tmp/cvs-serv13431
Modified Files:
Tag: FREESIDE_1_7_BRANCH
MyAccount.pm
Log Message:
fix errors paying with an on-file card through self-service
Index: MyAccount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/MyAccount.pm,v
retrieving revision 1.53.2.12
retrieving revision 1.53.2.13
diff -u -d -r1.53.2.12 -r1.53.2.13
--- MyAccount.pm 2 Jun 2008 17:06:10 -0000 1.53.2.12
+++ MyAccount.pm 2 Jul 2008 02:55:51 -0000 1.53.2.13
@@ -371,6 +371,7 @@
or return { 'error' => "illegal_payby " . $p->{'payby'} };
my $payby = $1;
+ #false laziness w/process/payment.cgi
my $payinfo;
my $paycvv = '';
if ( $payby eq 'CHEK' || $payby eq 'DCHK' ) {
@@ -389,14 +390,15 @@
} elsif ( $payby eq 'CARD' || $payby eq 'DCRD' ) {
$payinfo = $p->{'payinfo'};
- $payinfo =~ s/[^\dx]//g;
- $payinfo =~ /^(\d{13,16})$/
- or return { 'error' => gettext('invalid_card') }; # . ": ". $self->payinfo
- $payinfo = $1;
$payinfo = $cust_main->payinfo
if $cust_main->paymask eq $payinfo;
+ $payinfo =~ s/\D//g;
+ $payinfo =~ /^(\d{13,16})$/
+ or return { 'error' => gettext('invalid_card') }; # . ": ". $self->payinfo
+ $payinfo = $1;
+
validate($payinfo)
or return { 'error' => gettext('invalid_card') }; # . ": ". $self->payinfo
return { 'error' => gettext('unknown_card_type') }
More information about the freeside-commits
mailing list