[freeside-commits] freeside/FS/FS/ClientAPI MyAccount.pm, 1.95.2.9, 1.95.2.10

Ivan,,, ivan at wavetail.420.am
Fri Feb 12 15:44:19 PST 2010


Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory wavetail.420.am:/tmp/cvs-serv5227

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	MyAccount.pm 
Log Message:
don't return an error about changing the cust_main record to the user as a payment processing error, log a bunch of verbose stuff in this case so we can track down wtf is going on, RT#6955

Index: MyAccount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/MyAccount.pm,v
retrieving revision 1.95.2.9
retrieving revision 1.95.2.10
diff -u -d -r1.95.2.9 -r1.95.2.10
--- MyAccount.pm	12 Feb 2010 19:28:18 -0000	1.95.2.9
+++ MyAccount.pm	12 Feb 2010 23:44:17 -0000	1.95.2.10
@@ -684,8 +684,21 @@
     $new->set( 'payinfo' => $payinfo );
     $new->set( 'paydate' => $p->{'year'}. '-'. $p->{'month'}. '-01' );
     my $error = $new->replace($cust_main);
-    return { 'error' => $error } if $error;
-    $cust_main = $new;
+    if ( $error ) {
+      #no, this causes customers to process their payments again
+      #return { 'error' => $error };
+      #XXX just warn verosely for now so i can figure out how these happen in
+      # the first place, eventually should redirect them to the "change
+      #address" page but indicate the payment did process??
+      delete($p->{'payinfo'}); #don't want to log this!
+      warn "WARNING: error changing customer info when processing payment (not returning to customer as a processing error): $error\n".
+           "NEW: ". Dumper($new)."\n".
+           "OLD: ". Dumper($cust_main)."\n".
+           "PACKET: ". Dumper($p)."\n";
+    #} else {
+      #not needed...
+      #$cust_main = $new;
+    }
   }
 
   return { 'error' => '' };



More information about the freeside-commits mailing list