[freeside-commits] branch FREESIDE_2_3_BRANCH updated. afaf9a63ac0e47bfc2d46be745ea84af9a7ca681

Ivan ivan at 420.am
Thu Apr 12 16:13:09 PDT 2012


The branch, FREESIDE_2_3_BRANCH has been updated
       via  afaf9a63ac0e47bfc2d46be745ea84af9a7ca681 (commit)
      from  2726c70522a16a22f96abe5b1382b7741263641f (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 afaf9a63ac0e47bfc2d46be745ea84af9a7ca681
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Apr 12 16:13:08 2012 -0700

    fix voiding of APPL and ANRD payments, RT#17344

diff --git a/FS/FS/cust_pay_void.pm b/FS/FS/cust_pay_void.pm
index f1193cd..bebcfd4 100644
--- a/FS/FS/cust_pay_void.pm
+++ b/FS/FS/cust_pay_void.pm
@@ -68,9 +68,7 @@ order taker (see L<FS::access_user>)
 
 =item payby
 
-`CARD' (credit cards), `CHEK' (electronic check/ACH),
-`LECB' (phone bill billing), `BILL' (billing), `CASH' (cash),
-`WEST' (Western Union), `MCRD' (Manual credit card), or `COMP' (free)
+Payment Type (See L<FS::payinfo_Mixin> for valid values)
 
 =item payinfo
 
@@ -186,6 +184,7 @@ sub check {
     || $self->ut_foreign_keyn('pkgnum', 'cust_pkg', 'pkgnum')
     || $self->ut_numbern('void_date')
     || $self->ut_textn('reason')
+    || $self->payinfo_check
   ;
   return $error if $error;
 
@@ -197,31 +196,6 @@ sub check {
 
   $self->void_date(time) unless $self->void_date;
 
-  $self->payby =~ /^(CARD|CHEK|LECB|BILL|COMP|PREP|CASH|WEST|MCRD)$/
-    or return "Illegal payby";
-  $self->payby($1);
-
-  #false laziness with cust_refund::check
-  if ( $self->payby eq 'CARD' ) {
-    my $payinfo = $self->payinfo;
-    $payinfo =~ s/\D//g;
-    $self->payinfo($payinfo);
-    if ( $self->payinfo ) {
-      $self->payinfo =~ /^(\d{13,16}|\d{8,9})$/
-        or return "Illegal (mistyped?) credit card number (payinfo)";
-      $self->payinfo($1);
-      validate($self->payinfo) or return "Illegal credit card number";
-      return "Unknown card type" if $self->payinfo !~ /^99\d{14}$/ #token
-                                 && cardtype($self->payinfo) eq "Unknown";
-    } else {
-      $self->payinfo('N/A');
-    }
-
-  } else {
-    $error = $self->ut_textn('payinfo');
-    return $error if $error;
-  }
-
   $self->void_usernum($FS::CurrentUser::CurrentUser->usernum)
     unless $self->void_usernum;
 

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cust_pay_void.pm |   30 ++----------------------------
 1 files changed, 2 insertions(+), 28 deletions(-)




More information about the freeside-commits mailing list