freeside/FS/FS cust_main.pm,1.172,1.173

ivan ivan at pouncequick.420.am
Sun Mar 13 03:34:48 PST 2005


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory pouncequick:/tmp/cvs-serv17153

Modified Files:
	cust_main.pm 
Log Message:
when refunding against a specific card payment, use the card details from the payment instead of the customer record

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -d -r1.172 -r1.173
--- cust_main.pm	13 Mar 2005 11:12:19 -0000	1.172
+++ cust_main.pm	13 Mar 2005 11:34:45 -0000	1.173
@@ -2159,20 +2159,17 @@
     $payname =  "$payfirst $paylast";
   }
 
-  if ( $method eq 'CC' ) { 
-
-    $content{card_number} = $self->payinfo;
-    $self->paydate =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/;
-    $content{expiration} = "$2/$1";
-
-    #$content{cvv2} = $self->paycvv
-    #  if defined $self->dbdef_table->column('paycvv')
-    #     && length($self->paycvv);
+  if ( $method eq 'CC' ) {
 
-    #$content{recurring_billing} = 'YES'
-    #  if qsearch('cust_pay', { 'custnum' => $self->custnum,
-    #                           'payby'   => 'CARD',
-    #                           'payinfo' => $self->payinfo, } );
+    if ( $cust_pay ) {
+      $content{card_number} = $cust_pay->payinfo;
+      #$self->paydate =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/;
+      #$content{expiration} = "$2/$1";
+    } else {
+      $content{card_number} = $self->payinfo;
+      $self->paydate =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/;
+      $content{expiration} = "$2/$1";
+    }
 
   } elsif ( $method eq 'ECHECK' ) {
     ( $content{account_number}, $content{routing_code} ) =




More information about the freeside-commits mailing list