diff --git a/composer.json b/composer.json index 2797798..e87107f 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "mondu/shopware6-payment", "description": "Mondu payment for Shopware 6", - "version": "1.4.1", + "version": "1.4.2", "type": "shopware-platform-plugin", "license": "proprietary", "authors": [ diff --git a/src/Components/Webhooks/Service/WebhookService.php b/src/Components/Webhooks/Service/WebhookService.php index 102c102..52266d9 100644 --- a/src/Components/Webhooks/Service/WebhookService.php +++ b/src/Components/Webhooks/Service/WebhookService.php @@ -168,7 +168,7 @@ public function handleDeclinedOrCanceled($params, $context): array } } - protected function transitionOrderState($externalReferenceId, $state, $context, $monduId = null): StateMachineStateCollection + protected function transitionOrderState($externalReferenceId, $state, $context, $monduId = null): ?StateMachineStateCollection { try { return $this->stateMachineRegistry->transition(new Transition( @@ -177,15 +177,13 @@ protected function transitionOrderState($externalReferenceId, $state, $context, $state, 'stateId' ), $context); - } catch (MonduException $e) { - throw $e; } catch (\Exception $e) { $this->log('transitionOrderState Failed', [$externalReferenceId, $state], $e); - throw new MonduException($e->getMessage()); + return null; } } - protected function transitionDeliveryState($externalReferenceId, $state, $context, $monduId = null): StateMachineStateCollection + protected function transitionDeliveryState($externalReferenceId, $state, $context, $monduId = null): ?StateMachineStateCollection { try { $criteria = new Criteria([$this->getOrderUuid($externalReferenceId, $context, $monduId)]); @@ -201,11 +199,9 @@ protected function transitionDeliveryState($externalReferenceId, $state, $contex $state, 'stateId' ), $context); - } catch (MonduException $e) { - throw $e; } catch (\Exception $e) { $this->log('transitionDeliveryState Failed', [$externalReferenceId, $state], $e); - throw new MonduException($e->getMessage()); + return null; } }