Skip to content

Commit

Permalink
Delete error log after successful import (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
mstrzyzewski authored Sep 29, 2020
1 parent c2d9883 commit a5859f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Model/OrderImporter/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ public function processOrder(CheckoutFormInterface $checkoutForm): void
if (!$this->tryToGetOrder($checkoutForm->getId())) {
$this->allegroReservation->compensateReservation($checkoutForm);
$this->tryCreateOrder($checkoutForm);
$this->removeErrorLogIfExist($checkoutForm);
}
} elseif ($checkoutForm->getStatus() === Status::ALLEGRO_CANCELLED) {
$this->allegroReservation->compensateReservation($checkoutForm);
} else {
$this->allegroReservation->placeReservation($checkoutForm);
}

$this->removeErrorLogIfExist($checkoutForm);
$connection->commit();
} catch (\Exception $e) {
$connection->rollBack();
Expand Down

0 comments on commit a5859f6

Please sign in to comment.