From: Bill Erickson Date: Tue, 16 Aug 2016 14:58:27 +0000 (-0400) Subject: JBAS-1503 PP fetch in-db user for last_xact_id X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b05f4ed55630e45995f62cbe7c796a40904fe98f;p=working%2FEvergreen.git JBAS-1503 PP fetch in-db user for last_xact_id During Silent POST handling, fetch the user from the db to pick up the most recent last_xact_id value for fines payment. Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index 2ac8f23f07..52f50973f3 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -1897,9 +1897,14 @@ sub create_tmp_auth { $e->authtoken($authtoken); if ($e->checkauth) { # test token and set $e->requestor + $logger->info( "PayflowHosted existing authtoken still valid for $user_id"); - return undef; + + # Need to fetch the in-database user in addition to the cached + # auth session to pick up the current user->last_xact_id + $self->ctx->{user} = $e->requestor; + return $self->prepare_extended_user_info; } $logger->info("PayflowHosted generating temp auth token for $user_id"); @@ -1916,7 +1921,11 @@ sub create_tmp_auth { ($authtoken = $evt->{payload}->{authtoken})) { $e->authtoken($authtoken); $e->checkauth; # sets $e->requestor - return undef; + + # Need to fetch the in-database user in addition to the cached + # auth session to pick up the current user->last_xact_id + $self->ctx->{user} = $e->requestor; + return $self->prepare_extended_user_info; } $logger->error("PayflowHosted unable to generate temp auth ". @@ -2024,7 +2033,7 @@ sub payflow_create_payment { "open-ils.circ", "open-ils.circ.money.payment", $self->editor->authtoken, $args, - $self->editor->requestor->last_xact_id + $self->ctx->{user}->last_xact_id ); if ($resp->{textcode}) {