diff --git a/composer.json b/composer.json index dc0533b..61d5aa7 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "mondu/shopware6-payment", "description": "Mondu payment for Shopware 6", - "version": "1.2.2", + "version": "1.2.3", "type": "shopware-platform-plugin", "license": "proprietary", "authors": [ diff --git a/src/Components/Order/Subscriber/AdjustOrderSubscriber.php b/src/Components/Order/Subscriber/AdjustOrderSubscriber.php index 85a68a2..9643df1 100644 --- a/src/Components/Order/Subscriber/AdjustOrderSubscriber.php +++ b/src/Components/Order/Subscriber/AdjustOrderSubscriber.php @@ -133,7 +133,7 @@ public function onOrderWritten(EntityWrittenEvent $event): void $lineItems[] = [ 'external_reference_id' => $lineItem->getReferencedId(), - 'product_id' => $product->getProductNumber(), + 'product_id' => $lineItem->getPayload()['productNumber'], 'quantity' => $lineItem->getQuantity(), 'title' => $lineItem->getLabel(), 'net_price_cents' => round($unitNetPrice * $lineItem->getQuantity()), diff --git a/src/Components/PaymentMethod/PaymentHandler/MonduHandler.php b/src/Components/PaymentMethod/PaymentHandler/MonduHandler.php index 6eaf692..2db59f2 100644 --- a/src/Components/PaymentMethod/PaymentHandler/MonduHandler.php +++ b/src/Components/PaymentMethod/PaymentHandler/MonduHandler.php @@ -206,7 +206,7 @@ function ($lineItem) { $lineItems[] = [ 'external_reference_id' => $lineItem->getReferencedId(), - 'product_id' => $product->getProductNumber(), + 'product_id' => $lineItem->getPayload()['productNumber'], 'quantity' => $lineItem->getQuantity(), 'title' => $lineItem->getLabel(), 'net_price_cents' => round($unitNetPrice * $lineItem->getQuantity()),