diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4d4d1c6d..33a67474 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @Adyen/plugin-developers +* @brankologeecom @MarijaIv @tamaralogeecom @AleksandarBoljanovic @goran-stamenkovski-logeecom @teodoratimoti @DamjanLogeecom diff --git a/composer.json b/composer.json index b0a45663..64df2db8 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ } ], "description": "Official Shopware 6 Plugin to connect to Payment Service Provider Adyen", - "version": "4.1.1", + "version": "4.1.2", "type": "shopware-platform-plugin", "license": "MIT", "require": { diff --git a/src/Handlers/AbstractPaymentMethodHandler.php b/src/Handlers/AbstractPaymentMethodHandler.php index d5f78b5c..ce295919 100644 --- a/src/Handlers/AbstractPaymentMethodHandler.php +++ b/src/Handlers/AbstractPaymentMethodHandler.php @@ -613,12 +613,13 @@ protected function preparePaymentsRequest( !is_null($orderLine->getProductId()) ? $this->getProduct($orderLine->getProductId(), $salesChannelContext->getContext()) : null; + $domainUrl = $salesChannelContext->getSalesChannel()->getDomains()?->first()?->getUrl(); // Add url for only real product and not for the custom cart items. - if (!is_null($product->getId())) { + if (!is_null($product->getId()) && !is_null($domainUrl)) { $productUrl = sprintf( "%s/detail/%s", - $salesChannelContext->getSalesChannel()->getDomains()->first()->getUrl(), + $domainUrl, $product->getId() ); } else { @@ -640,7 +641,7 @@ protected function preparePaymentsRequest( $currency = $salesChannelContext->getCurrency(); //Building open invoice line - + $lineItem = new LineItem(); $lineItem->setDescription($productName); diff --git a/src/Migration/Migration1626331358AdyenRefund.php b/src/Migration/Migration1626331358AdyenRefund.php index df7337bc..211a6954 100644 --- a/src/Migration/Migration1626331358AdyenRefund.php +++ b/src/Migration/Migration1626331358AdyenRefund.php @@ -24,9 +24,7 @@ public function update(Connection $connection): void `created_at` DATETIME(3) NOT NULL, `updated_at` DATETIME(3) NULL, `amount` INT(11) NOT NULL, - PRIMARY KEY (`id`), - CONSTRAINT `fk.adyen_refund.order_transaction_id` - FOREIGN KEY (order_transaction_id) references `order_transaction` (id) + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; SQL ); diff --git a/src/Migration/Migration1646742586AdyenPaymentCapture.php b/src/Migration/Migration1646742586AdyenPaymentCapture.php index 89a1cf0a..4e90bf0a 100644 --- a/src/Migration/Migration1646742586AdyenPaymentCapture.php +++ b/src/Migration/Migration1646742586AdyenPaymentCapture.php @@ -24,9 +24,7 @@ public function update(Connection $connection): void `created_at` DATETIME(3) NOT NULL, `updated_at` DATETIME(3) NULL, `amount` INT(11) NOT NULL, - PRIMARY KEY (`id`), - CONSTRAINT `fk.adyen_payment_capture.order_transaction_id` - FOREIGN KEY (order_transaction_id) references `order_transaction` (id) + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; SQL ); diff --git a/src/Migration/Migration1669129247AdyenPayment.php b/src/Migration/Migration1669129247AdyenPayment.php index 785d48f3..0bf026d5 100644 --- a/src/Migration/Migration1669129247AdyenPayment.php +++ b/src/Migration/Migration1669129247AdyenPayment.php @@ -31,9 +31,7 @@ public function update(Connection $connection): void `updated_at` DATETIME(3) DEFAULT NULL COMMENT 'Updated at', PRIMARY KEY (`id`), KEY `ADYEN_PAYMENT_MERCHANT_REFERENCE` (`merchant_reference`), - KEY `ADYEN_PAYMENT_MERCHANT_ORDER_REFERENCE` (`merchant_order_reference`), - CONSTRAINT `fk.adyen_payment.order_transaction_id` - FOREIGN KEY (order_transaction_id) references `order_transaction` (id) + KEY `ADYEN_PAYMENT_MERCHANT_ORDER_REFERENCE` (`merchant_order_reference`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; SQL; diff --git a/src/Migration/Migration1727273181AlterAdyenRefund.php b/src/Migration/Migration1727273181AlterAdyenRefund.php new file mode 100755 index 00000000..c7a4d6c2 --- /dev/null +++ b/src/Migration/Migration1727273181AlterAdyenRefund.php @@ -0,0 +1,27 @@ +executeStatement(<<executeStatement(<<executeStatement(<<orderRepository->getOrderByOrderNumber( $orderNumber, $context, - ['transactions', 'currency', 'lineItems', 'deliveries', 'deliveries.shippingMethod'] + [ + 'transactions', 'currency', 'lineItems', 'deliveries', + 'deliveries.shippingMethod', 'deliveries.stateMachineState' + ] ); if (is_null($order)) {