From 280851858952f9b263b8324b31010169f6dbeb30 Mon Sep 17 00:00:00 2001 From: Matthew Wilson Date: Sat, 13 May 2006 14:31:00 +0000 Subject: [PATCH] hrm. --- .../Asset/Wobject/EventManagementSystem.pm | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm index 89fa22574..b5d1b248b 100644 --- a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm +++ b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm @@ -2412,6 +2412,18 @@ sub saveRegistration { },0,0); $shoppingCart->add($eventId, 'Event'); } + + #Our item plug-in needs to be able to associate these records with the result of the payment attempt + if ($self->session->scratch->get('purchaseId'.$self->session->scratch->get('currentPurchaseCounter')) ne $purchaseId) { + my $counter = 0; + while (1) { + unless ($self->session->scratch->get("purchaseId".$counter)) { + $self->session->scratch->set("purchaseId".$counter, $purchaseId); + last; + } + $counter++; + } + } $self->emptyScratchCart; $self->session->scratch->delete('EMS_add_purchase_badgeId'); $self->session->scratch->delete('EMS_add_purchase_events'); @@ -2419,15 +2431,6 @@ sub saveRegistration { $self->session->scratch->delete('currentMainEvent'); $self->session->scratch->delete('currentPurchaseCounter'); - #Our item plug-in needs to be able to associate these records with the result of the payment attempt - my $counter = 0; - while (1) { - unless ($self->session->scratch->get("purchaseId".$counter)) { - $self->session->scratch->set("purchaseId".$counter, $purchaseId); - last; - } - $counter++; - } # if ($self->session->form->get('checkoutNow')) { # srand; # $self->session->http->setRedirect($self->getUrl("op=viewCart;something=".rand(44345552)));