diff --git a/README.md b/README.md
index 28e4048..117d48e 100644
--- a/README.md
+++ b/README.md
@@ -61,7 +61,7 @@ tail -f var/log/postfinancecheckout_payment*.log
## Documentation
-[Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/shopware-6/4.0.24/docs/en/documentation.html)
+[Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/shopware-6/4.0.25/docs/en/documentation.html)
## License
diff --git a/composer.json b/composer.json
index 1ba9a08..3f9bc59 100644
--- a/composer.json
+++ b/composer.json
@@ -58,5 +58,5 @@
"postfinancecheckout/sdk": "3.0.1"
},
"type": "shopware-platform-plugin",
- "version": "4.0.24"
+ "version": "4.0.25"
}
\ No newline at end of file
diff --git a/docs/en/documentation.html b/docs/en/documentation.html
index 4443440..9d5db51 100644
--- a/docs/en/documentation.html
+++ b/docs/en/documentation.html
@@ -22,7 +22,7 @@
Documentation
-
+
Source
diff --git a/src/Core/Api/WebHooks/Controller/WebHookController.php b/src/Core/Api/WebHooks/Controller/WebHookController.php
index 1bc2cd2..3f7ecfb 100644
--- a/src/Core/Api/WebHooks/Controller/WebHookController.php
+++ b/src/Core/Api/WebHooks/Controller/WebHookController.php
@@ -20,6 +20,7 @@
Framework\Routing\Annotation\RouteScope,
System\StateMachine\Aggregation\StateMachineTransition\StateMachineTransitionActions,
System\StateMachine\Exception\IllegalTransitionException};
+use Shopware\Core\Checkout\Order\OrderStates;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\{HttpFoundation\JsonResponse,
HttpFoundation\ParameterBag,
@@ -430,12 +431,13 @@ private function updateTransaction(WebHookRequest $callBackData, Context $contex
->getTransactionService()
->read($callBackData->getSpaceId(), $callBackData->getEntityId());
$orderId = $transaction->getMetaData()[TransactionPayload::POSTFINANCECHECKOUT_METADATA_ORDER_ID];
- if(!empty($orderId)) {
- $this->executeLocked($orderId, $context, function () use ($orderId, $transaction, $context) {
+ if(!empty($orderId) && !$transaction->getParent()) {
+ $this->executeLocked($orderId, $context, function () use ($orderId, $transaction, $context, $callBackData) {
$this->transactionService->upsert($transaction, $context);
$orderTransactionId = $transaction->getMetaData()[TransactionPayload::POSTFINANCECHECKOUT_METADATA_ORDER_TRANSACTION_ID];
$orderTransaction = $this->getOrderTransaction($orderId, $context);
$this->logger->info("OrderId: {$orderId} Current state: {$orderTransaction->getStateMachineState()->getTechnicalName()}");
+
if (!in_array(
$orderTransaction->getStateMachineState()->getTechnicalName(),
$this->transactionFinalStates