diff --git a/Plugin/ProcessShipmentSave.php b/Plugin/ProcessShipmentSave.php deleted file mode 100644 index b8635d1..0000000 --- a/Plugin/ProcessShipmentSave.php +++ /dev/null @@ -1,86 +0,0 @@ -monduFileLogger = $monduFileLogger; - $this->monduLogger = $logger; - $this->invoiceOrderHelper = $invoiceOrderHelper; - } - - /** - * After Save Processing - * - * @param \Magento\Sales\Model\Order\ShipmentRepository\Interceptor $subject - * @param $shipment - * - * @return mixed - * @throws LocalizedException - */ - public function afterSave( - \Magento\Sales\Model\Order\ShipmentRepository\Interceptor $subject, - $shipment - ) { - $order = $shipment->getOrder(); - - $monduId = $order->getData('mondu_reference_id'); - - if(!$monduId) { - return $shipment; - } - - $monduLog = $this->monduLogger->getLogCollection($monduId); - - if ($monduLog->getSkipShipObserver()) { - $this->monduFileLogger - ->info( - 'Already invoiced using invoice orders action, skipping', - ['orderNumber' => $order->getIncrementId()] - ); - - return $shipment; - } - - $this->monduLogger->syncOrder($monduId); - - if (!$this->monduLogger->canShipOrder($monduId)) { - throw new LocalizedException( - __('Can\'t ship order: Mondu order state must be confirmed or partially_shipped') - ); - } - - $this->invoiceOrderHelper->handleInvoiceOrder($order, $shipment, $monduLog); - - return $shipment; - } -} diff --git a/composer.json b/composer.json index 618bfa7..6ba528b 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "mondu_gmbh/magento2-payment", "description": "Mondu payment method for magento 2", "type": "magento2-module", - "version": "2.3.4-RC2", + "version": "2.3.3", "license": [ "MIT" ], diff --git a/etc/di.xml b/etc/di.xml index ab6d284..b51ed3f 100644 --- a/etc/di.xml +++ b/etc/di.xml @@ -36,7 +36,4 @@ - - - diff --git a/etc/module.xml b/etc/module.xml index d85e248..e4e101b 100755 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,6 +1,6 @@ - +