From 6aa9185c1c6ec9ac45d04766cebc0c63c528c600 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 10 Feb 2009 22:46:50 +0000 Subject: [PATCH] Fix a sequencing issue in the ITransact postback routine, where it uses an object before it is validated. --- docs/changelog/7.x.x.txt | 3 +++ lib/WebGUI/Shop/PayDriver/ITransact.pm | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 3a1740179..aef2df004 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,3 +1,6 @@ +7.6.12 + - fixed: During postback on a recurring transaction, the routine could error out instead of catching an error. + 7.6.11 - fixed: Asset Manager can generate URLs that are too long - fixed #9629: override stringify date format to use java default format. diff --git a/lib/WebGUI/Shop/PayDriver/ITransact.pm b/lib/WebGUI/Shop/PayDriver/ITransact.pm index 14e607883..881e1bf0a 100644 --- a/lib/WebGUI/Shop/PayDriver/ITransact.pm +++ b/lib/WebGUI/Shop/PayDriver/ITransact.pm @@ -791,9 +791,6 @@ 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) ) { @@ -818,6 +815,9 @@ sub www_processRecurringTransactionPostback { # return 'Check recurring postback: transaction check failed.'; # } #---- Passed all test, continue --------------- + + #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')}); # Create a new transaction for this term my $transaction = $baseTransaction->duplicate( {