From 21d8baf583ba5c83c22f24663921f43a9a4daf44 Mon Sep 17 00:00:00 2001 From: Kaleb Murphy Date: Wed, 10 Sep 2008 16:04:06 +0000 Subject: [PATCH] Reoccurring transactions now use the correct user id --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Shop/PayDriver/ITransact.pm | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index dbbb0bd51..43271f33a 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -30,6 +30,7 @@ - fixed: Form/Integer now shows 0 in the results page - added: Email from field now prefixed with username - added: Inbox messages now tell you who the message was from + - fixed: Reoccurring transactions now update the correct user id 7.5.22 - fixed: Layout template now gets prepared correctly - fixed: When user does not have permissions to search/edit a thing a proper error is shown. diff --git a/lib/WebGUI/Shop/PayDriver/ITransact.pm b/lib/WebGUI/Shop/PayDriver/ITransact.pm index 9b1087787..22ad97907 100644 --- a/lib/WebGUI/Shop/PayDriver/ITransact.pm +++ b/lib/WebGUI/Shop/PayDriver/ITransact.pm @@ -747,6 +747,9 @@ sub www_processRecurringTransactionPostback { # Fetch the original transaction my $baseTransaction = eval{WebGUI::Shop::Transaction->newByGatewayId( $session, $originatingXid, $self->getId )}; + #make sure the same user is used in this transaction as the last {mostly needed for reoccurring transactions + $self->session->user({userId=>$baseTransaction->get('userId')}) + #---- Check the validity of the request ------- # First check whether the original transaction actualy exists if (WebGUI::Error->caught || !(defined $baseTransaction) ) {