diff --git a/Gateway/Command/CommandManager.php b/Gateway/Command/CommandManager.php index 3369c32..db74e91 100644 --- a/Gateway/Command/CommandManager.php +++ b/Gateway/Command/CommandManager.php @@ -58,19 +58,10 @@ public function __construct( */ public function initiatePayment(InfoInterface $payment, $arguments) { - try { - return $this->executeByCode('initiate', $payment, $arguments); - } catch (\Exception $e) { - if ($payment instanceof QuotePayment) { - // process error "orderId is already in used and must be unique" - if ((int)$e->getCode() === 34) { - $quote = $payment->getQuote(); - $quote->setReservedOrderId(null); - - return $this->executeByCode('initiate', $payment, $arguments); - } - } - } + $quote = $payment->getQuote(); + $quote->setReservedOrderId(null); + + return $this->executeByCode('initiate', $payment, $arguments); } /** diff --git a/etc/module.xml b/etc/module.xml index 927133c..c0b1123 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -14,7 +14,7 @@ ~ IN THE SOFTWARE. --> - +