From: erickson Date: Tue, 28 Dec 2010 16:47:40 +0000 (+0000) Subject: Update auth-cached user after payment X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=360d0dab73158800997798af809b0bfac6dfba62;p=contrib%2FConifer.git 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. git-svn-id: svn://svn.open-ils.org/ILS/trunk@19068 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm index 4ae466ba5c..66de1abc0d 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm @@ -381,8 +381,13 @@ sub make_payments { # 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; + + # 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}; }