[open-ils-commits] r19070 - branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Circ (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Dec 28 11:50:14 EST 2010
Author: erickson
Date: 2010-12-28 11:50:12 -0500 (Tue, 28 Dec 2010)
New Revision: 19070
Modified:
branches/rel_2_0/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.
Signed-off-by: Bill Erickson <erickson at esilibrary.com>
Modified: branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm
===================================================================
--- branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm 2010-12-28 16:50:11 UTC (rev 19069)
+++ branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm 2010-12-28 16:50:12 UTC (rev 19070)
@@ -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