[open-ils-commits] r19068 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Dec 28 11:47:43 EST 2010


Author: erickson
Date: 2010-12-28 11:47:40 -0500 (Tue, 28 Dec 2010)
New Revision: 19068

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm
Log:
Update auth-cached user after payment

After payment toward one's own account, reset the cached user object so
that it will contain the latest last_xact_id value.  This is necessary
for supporting patron credit card payments in the catalog.

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm	2010-12-28 06:16:56 UTC (rev 19067)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm	2010-12-28 16:47:40 UTC (rev 19068)
@@ -381,8 +381,13 @@
     # update the user to create a new last_xact_id
     $e->update_actor_user($patron) or return $e->die_event;
     $patron = $e->retrieve_actor_user($patron) or return $e->die_event;
+    $e->commit;
 
-    $e->commit;
+    # update the cached user object if a user is making a payment toward 
+    # his/her own account
+    $U->simplereq('open-ils.auth', 'open-ils.auth.session.reset_timeout', $auth, 1)
+        if $user_id == $e->requestor->id;
+
     return {last_xact_id => $patron->last_xact_id, payments => \@payment_ids};
 }
 



More information about the open-ils-commits mailing list