Fix a sequencing issue in the ITransact postback routine, where it uses

an object before it is validated.
This commit is contained in:
Colin Kuskie 2009-02-10 22:46:50 +00:00
parent 9924eead58
commit 6aa9185c1c
2 changed files with 6 additions and 3 deletions

View file

@ -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.

View file

@ -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( {