diff --git a/CHANGELOG.md b/CHANGELOG.md index d91867a..0a5c92c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,28 +1,18 @@ -# 6.1.5 -- Support for Shopware 6.6.3.1 and Vue 3 +# 5.0.11 +- Fixed plugin upgrade dependency error -# 6.1.4 -- Improved plugin's settings form -- Support for Shopware 6.6.2.0 - -# 6.1.3 +# 5.0.10 - Solvency check support for Powerpay and MF Group Invoice payment methods - Improved handling of abandoned transactions -# 6.1.2 +# 5.0.9 - Fixed redirect to confirmation page after reload -# 6.1.1 -- Fixed deprecated OrderNotFoundException - -# 6.1.0 +# 5.0.8 - Fixed checkout issues after deactivating/activating plugin - Fixed plugin uninstall action - Fixed invoice payment method email function when order is shipped -# 6.0.0 -- Support for Shopware 6.6 - # 5.0.7 - Fix for refunds when a discount code is used diff --git a/CHANGELOG_de-DE.md b/CHANGELOG_de-DE.md index fedd378..ad716a4 100644 --- a/CHANGELOG_de-DE.md +++ b/CHANGELOG_de-DE.md @@ -1,28 +1,18 @@ -# 6.1.5 -- Unterstützung von Shopware 6.6.3.1 und Vue 3 +# 5.0.11 +- Plugin-Upgrade-Abhängigkeitsfehler behoben -# 6.1.4 -- Das Einstellungsformular des Plugins wurde verbessert -- Unterstützung von Shopware 6.6.2.0 - -# 6.1.3 +# 5.0.10 - Unterstützung der Bonitätsprüfung für die Zahlungsmethoden Powerpay und MF Group Invoice - Verbesserte Handhabung abgebrochener Transaktionen -# 6.1.2 +# 5.0.9 - Die Weiterleitung zur Bestätigungsseite nach dem Neuladen wurde behoben -# 6.1.1 -- Fixed deprecated OrderNotFoundException - -# 6.1.0 +# 5.0.8 - Checkout-Probleme nach dem Deaktivieren/Aktivieren des Plugins behoben - Plugin-Deinstallationsaktion behoben - Die E-Mail-Funktion für die Rechnungszahlungsmethode beim Versand der Bestellung wurde korrigiert -# 6.0.0 -- Unterstützung von Shopware 6.6 - # 5.0.7 - Fix für Rückerstattungen, wenn ein Rabattcode verwendet wird diff --git a/README.md b/README.md index b0fdebd..d8ac0e9 100644 --- a/README.md +++ b/README.md @@ -3,22 +3,13 @@ PostFinanceCheckout Payment for Shopware 6 ============================= -The PostFinanceCheckout Payment plugin wraps around the PostFinanceCheckout API. This library facilitates your interaction with various services such as transactions. -Please note that this plugin is for versions 6.5 and 6.6. For the 6.4 plugin please visit [our Shopware 6.4 plugin](https://github.com/pfpayments/shopware-6-4). +The PostFinanceCheckout Payment plugin wraps around the PostFinanceCheckout API. This library facilitates your interaction with various services such as transactions. Please not this plugin is for version 6.5. +For the 6.4 plugin please visit https://github.com/pfpayments/shopware-6-4 ## Requirements -- Shopware 6.5.x or Shopware 6.6.x. See table below. -- PHP minimum version supported by the each shop version. - -## Supported versions - -___________________________________________________________________________________ -| Shopware 6 version | Plugin major version | Supported until | -|-------------------------------|------------------------|------------------------| -| Shopware 6.6.x | 6.x | Further notice | -| Shopware 6.5.x | 5.x | October 2024 | ------------------------------------------------------------------------------------ +- PHP 7.4 - 8.2 +- Shopware 6.5.x ## Installation @@ -53,7 +44,7 @@ Uncompress the zip file you download, and include the autoloader in your project ```bash # unzip to ShopwareInstallDir/custom/plugins/PostFinanceCheckoutPayment -composer require postfinancecheckout/sdk 4.2.0 +composer require postfinancecheckout/sdk 4.2.2 php bin/console plugin:refresh php bin/console plugin:install --activate --clearCache PostFinanceCheckoutPayment ``` @@ -71,8 +62,8 @@ tail -f var/log/postfinancecheckout_payment*.log ## Documentation -[Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/shopware-6/6.1.5/docs/en/documentation.html) +[Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/shopware-6/5.0.11/docs/en/documentation.html) ## License -Please see the [license file](https://github.com/pfpayments/shopware-6/blob/master/LICENSE.txt) for more information. +Please see the [license file](https://github.com/pfpayments/shopware-6/blob/master/LICENSE.txt) for more information. \ No newline at end of file diff --git a/composer.json b/composer.json index 37ada3c..3a5a142 100644 --- a/composer.json +++ b/composer.json @@ -11,8 +11,8 @@ } }, "conflict": { - "shopware/administration": "<6.6.0.0,>=7", - "shopware/storefront": "<6.6.0.0,>=7" + "shopware/administration": "<6.5.0.0,>=7", + "shopware/storefront": "<6.5.0.0,>=7" }, "description": "PostFinanceCheckout integration for Shopware 6", "extra": { @@ -56,11 +56,11 @@ "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "php": ">=8.2", - "shopware/core": "6.6.*", - "shopware/storefront": "6.6.*", - "postfinancecheckout/sdk": "4.2.0" + "php": ">=7.4", + "shopware/core": "6.5.*", + "shopware/storefront": "6.5.*", + "postfinancecheckout/sdk": "4.2.2" }, "type": "shopware-platform-plugin", - "version": "6.1.5" + "version": "5.0.11" } \ No newline at end of file diff --git a/docs/en/documentation.html b/docs/en/documentation.html index 1c6c0f2..69ceee6 100644 --- a/docs/en/documentation.html +++ b/docs/en/documentation.html @@ -23,7 +23,7 @@

Documentation

  • - + Source
  • diff --git a/src/Core/Api/Configuration/Controller/ConfigurationController.php b/src/Core/Api/Configuration/Controller/ConfigurationController.php index 10e7e43..af4fe5c 100644 --- a/src/Core/Api/Configuration/Controller/ConfigurationController.php +++ b/src/Core/Api/Configuration/Controller/ConfigurationController.php @@ -5,13 +5,13 @@ use Psr\Log\LoggerInterface; use Shopware\Core\{ Framework\Context, - Framework\Log\Package}; + Framework\Routing\Annotation\RouteScope,}; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\{ HttpFoundation\JsonResponse, HttpFoundation\Request, HttpFoundation\Response, - Routing\Attribute\Route}; + Routing\Annotation\Route}; use PostFinanceCheckoutPayment\Core\{ Api\OrderDeliveryState\Service\OrderDeliveryStateService, Api\PaymentMethodConfiguration\Service\PaymentMethodConfigurationService, @@ -26,9 +26,8 @@ * This class handles web calls that are made via the PostFinanceCheckoutPayment settings page. * * @package PostFinanceCheckoutPayment\Core\Api\Config\Controller + * @Route(defaults={"_routeScope"={"api"}}) */ -#[Package('system-settings')] -#[Route(defaults: ['_routeScope' => ['api']])] class ConfigurationController extends AbstractController { /** @@ -101,10 +100,12 @@ public function setLogger(LoggerInterface $logger): void * @param \Shopware\Core\Framework\Context $context * @return \Symfony\Component\HttpFoundation\JsonResponse * + * @Route( + * "/api/_action/postfinancecheckout/configuration/set-postfinancecheckout-as-sales-channel-payment-default", + * name="api.action.postfinancecheckout.configuration.set-postfinancecheckout-as-sales-channel-payment-default", + * methods={"POST"} + * ) */ - #[Route("/api/_action/postfinancecheckout/configuration/set-postfinancecheckout-as-sales-channel-payment-default", - name: "api.action.postfinancecheckout.configuration.set-postfinancecheckout-as-sales-channel-payment-default", - methods: ['POST'])] public function setPostFinanceCheckoutAsSalesChannelPaymentDefault(Request $request, Context $context): JsonResponse { $salesChannelId = $request->request->get('salesChannelId'); @@ -123,10 +124,12 @@ public function setPostFinanceCheckoutAsSalesChannelPaymentDefault(Request $requ * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException * @throws \PostFinanceCheckout\Sdk\VersioningException * + * @Route( + * "/api/_action/postfinancecheckout/configuration/register-web-hooks", + * name="api.action.postfinancecheckout.configuration.register-web-hooks", + * methods={"POST"} + * ) */ - #[Route("/api/_action/postfinancecheckout/configuration/register-web-hooks", - name: "api.action.postfinancecheckout.configuration.register-web-hooks", - methods: ['POST'])] public function registerWebHooks(Request $request): JsonResponse { $settings = $this->settingsService->getSettings(); @@ -154,10 +157,12 @@ public function registerWebHooks(Request $request): JsonResponse * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException * @throws \PostFinanceCheckout\Sdk\VersioningException * + * @Route( + * "/api/_action/postfinancecheckout/configuration/check-api-connection", + * name="api.action.postfinancecheckout.configuration.check-api-connection", + * methods={"POST"} + * ) */ - #[Route("/api/_action/postfinancecheckout/configuration/check-api-connection", - name: "api.action.postfinancecheckout.configuration.check-api-connection", - methods: ['POST'])] public function checkApiConnection(Request $request): JsonResponse { $spaceId = (int)$request->request->getInt('spaceId'); @@ -186,10 +191,12 @@ public function checkApiConnection(Request $request): JsonResponse * @param \Shopware\Core\Framework\Context $context * @return \Symfony\Component\HttpFoundation\JsonResponse * + * @Route( + * "/api/_action/postfinancecheckout/configuration/synchronize-payment-method-configuration", + * name="api.action.postfinancecheckout.configuration.synchronize-payment-method-configuration", + * methods={"POST"} + * ) */ - #[Route("/api/_action/postfinancecheckout/configuration/synchronize-payment-method-configuration", - name: "api.action.postfinancecheckout.configuration.synchronize-payment-method-configuration", - methods: ['POST'])] public function synchronizePaymentMethodConfiguration(Request $request, Context $context): JsonResponse { $settings = $this->settingsService->getSettings(); @@ -221,10 +228,12 @@ public function synchronizePaymentMethodConfiguration(Request $request, Context * @param \Shopware\Core\Framework\Context $context * @return \Symfony\Component\HttpFoundation\JsonResponse * + * @Route( + * "/api/_action/postfinancecheckout/configuration/install-order-delivery-states", + * name="api.action.postfinancecheckout.configuration.install-order-delivery-states", + * methods={"POST"} + * ) */ - #[Route("/api/_action/postfinancecheckout/configuration/install-order-delivery-states", - name: "api.action.postfinancecheckout.configuration.install-order-delivery-states", - methods: ['POST'])] public function installOrderDeliveryStates(Context $context): JsonResponse { /** diff --git a/src/Core/Api/OrderDeliveryState/Command/OrderDeliveryStateCommand.php b/src/Core/Api/OrderDeliveryState/Command/OrderDeliveryStateCommand.php index 321585a..62dc82e 100644 --- a/src/Core/Api/OrderDeliveryState/Command/OrderDeliveryStateCommand.php +++ b/src/Core/Api/OrderDeliveryState/Command/OrderDeliveryStateCommand.php @@ -6,7 +6,6 @@ use Shopware\Core\Framework\Context; use Symfony\Component\{ Console\Command\Command, - Console\Attribute\AsCommand, Console\Input\InputInterface, Console\Output\OutputInterface}; use PostFinanceCheckoutPayment\Core\Api\OrderDeliveryState\Service\OrderDeliveryStateService; @@ -16,9 +15,13 @@ * * @package PostFinanceCheckoutPayment\Core\Api\OrderDeliveryState\Command */ -#[AsCommand(name: 'postfinancecheckout:order-delivery-states:install')] class OrderDeliveryStateCommand extends Command { + /** + * @var string + */ + protected static $defaultName = 'postfinancecheckout:order-delivery-states:install'; + /** * @var \PostFinanceCheckoutPayment\Core\Api\OrderDeliveryState\Service\OrderDeliveryStateService */ @@ -31,7 +34,7 @@ class OrderDeliveryStateCommand extends Command { */ public function __construct(OrderDeliveryStateService $orderDeliveryStateService) { - parent::__construct(); + parent::__construct(self::$defaultName); $this->orderDeliveryStateService = $orderDeliveryStateService; } @@ -56,4 +59,4 @@ protected function configure() ->setHelp('This command installs PostFinanceCheckoutPayment extra delivery states.'); } -} +} \ No newline at end of file diff --git a/src/Core/Api/PaymentMethodConfiguration/Command/PaymentMethodConfigurationCommand.php b/src/Core/Api/PaymentMethodConfiguration/Command/PaymentMethodConfigurationCommand.php index 7d1e342..8ba825c 100644 --- a/src/Core/Api/PaymentMethodConfiguration/Command/PaymentMethodConfigurationCommand.php +++ b/src/Core/Api/PaymentMethodConfiguration/Command/PaymentMethodConfigurationCommand.php @@ -6,7 +6,6 @@ use Shopware\Core\Framework\Context; use Symfony\Component\{ Console\Command\Command, - Console\Attribute\AsCommand, Console\Input\InputInterface, Console\Output\OutputInterface}; use PostFinanceCheckoutPayment\Core\Api\PaymentMethodConfiguration\Service\PaymentMethodConfigurationService; @@ -16,9 +15,13 @@ * * @package PostFinanceCheckoutPayment\Core\Api\PaymentMethodConfiguration\Command */ -#[AsCommand(name: 'postfinancecheckout:payment-method:configuration')] class PaymentMethodConfigurationCommand extends Command { + /** + * @var string + */ + protected static $defaultName = 'postfinancecheckout:payment-method:configuration'; + /** * @var \PostFinanceCheckoutPayment\Core\Api\PaymentMethodConfiguration\Service\PaymentMethodConfigurationService */ @@ -31,7 +34,7 @@ class PaymentMethodConfigurationCommand extends Command { */ public function __construct(PaymentMethodConfigurationService $paymentMethodConfigurationService) { - parent::__construct(); + parent::__construct(self::$defaultName); $this->paymentMethodConfigurationService = $paymentMethodConfigurationService; } @@ -59,4 +62,4 @@ protected function configure() ->setHelp('This command fetches PostFinanceCheckoutPayment space available payment methods.'); } -} +} \ No newline at end of file diff --git a/src/Core/Api/PaymentMethodConfiguration/Command/PaymentMethodDefaultCommand.php b/src/Core/Api/PaymentMethodConfiguration/Command/PaymentMethodDefaultCommand.php index bf2e0a3..ef8b3bc 100644 --- a/src/Core/Api/PaymentMethodConfiguration/Command/PaymentMethodDefaultCommand.php +++ b/src/Core/Api/PaymentMethodConfiguration/Command/PaymentMethodDefaultCommand.php @@ -6,7 +6,6 @@ use Shopware\Core\Framework\Context; use Symfony\Component\{ Console\Command\Command, - Console\Attribute\AsCommand, Console\Input\InputInterface, Console\Output\OutputInterface}; use PostFinanceCheckoutPayment\Core\Util\PaymentMethodUtil; @@ -16,9 +15,13 @@ * * @package PostFinanceCheckoutPayment\Core\Api\PaymentMethodConfiguration\Command */ -#[AsCommand(name: 'postfinancecheckout:payment-method:default')] class PaymentMethodDefaultCommand extends Command { + /** + * @var string + */ + protected static $defaultName = 'postfinancecheckout:payment-method:default'; + /** * @var \PostFinanceCheckoutPayment\Core\Util\PaymentMethodUtil */ @@ -31,7 +34,7 @@ class PaymentMethodDefaultCommand extends Command { */ public function __construct(PaymentMethodUtil $paymentMethodUtil) { - parent::__construct(); + parent::__construct(self::$defaultName); $this->paymentMethodUtil = $paymentMethodUtil; } @@ -58,4 +61,4 @@ protected function configure() ->setHelp('This command updates PostFinanceCheckoutPayment as default payment method for all SalesChannels.'); } -} +} \ No newline at end of file diff --git a/src/Core/Api/Refund/Controller/RefundController.php b/src/Core/Api/Refund/Controller/RefundController.php index 8d2cf1d..c276004 100644 --- a/src/Core/Api/Refund/Controller/RefundController.php +++ b/src/Core/Api/Refund/Controller/RefundController.php @@ -4,12 +4,12 @@ use Psr\Log\LoggerInterface; use Shopware\Core\Framework\Context; -use Shopware\Core\Framework\Log\Package; +use Shopware\Core\Framework\Routing\Annotation\RouteScope; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\{ HttpFoundation\Request, HttpFoundation\Response, - Routing\Attribute\Route,}; + Routing\Annotation\Route,}; use PostFinanceCheckoutPayment\Core\{ Api\Refund\Service\RefundService, Settings\Service\SettingsService}; @@ -20,9 +20,8 @@ * * @package PostFinanceCheckoutPayment\Core\Api\Refund\Controller * + * @Route(defaults={"_routeScope"={"api"}}) */ -#[Package('sales-channel')] -#[Route(defaults: ['_routeScope' => ['api']])] class RefundController extends AbstractController { /** @@ -70,10 +69,12 @@ public function setLogger(LoggerInterface $logger): void * @throws \PostFinanceCheckout\Sdk\ApiException * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException * @throws \PostFinanceCheckout\Sdk\VersioningException + * @Route( + * "/api/_action/postfinancecheckout/refund/create-refund/", + * name="api.action.postfinancecheckout.refund.create-refund", + * methods={"POST"} + * ) */ - #[Route("/api/_action/postfinancecheckout/refund/create-refund/", - name: "api.action.postfinancecheckout.refund.create-refund", - methods: ['POST'])] public function createRefund(Request $request, Context $context): Response { $salesChannelId = $request->request->get('salesChannelId'); @@ -97,10 +98,12 @@ public function createRefund(Request $request, Context $context): Response * @throws \PostFinanceCheckout\Sdk\ApiException * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException * @throws \PostFinanceCheckout\Sdk\VersioningException + * @Route( + * "/api/_action/postfinancecheckout/refund/create-refund-by-amount/", + * name="api.action.postfinancecheckout.refund.create.refund.by.amount", + * methods={"POST"} + * ) */ - #[Route("/api/_action/postfinancecheckout/refund/create-refund-by-amount/", - name: "api.action.postfinancecheckout.refund.create.refund.by.amount", - methods: ['POST'])] public function createRefundByAmount(Request $request, Context $context): Response { $salesChannelId = $request->request->get('salesChannelId'); @@ -115,4 +118,4 @@ public function createRefundByAmount(Request $request, Context $context): Respon return new Response(null, Response::HTTP_NO_CONTENT); } -} +} \ No newline at end of file diff --git a/src/Core/Api/Transaction/Controller/TransactionCompletionController.php b/src/Core/Api/Transaction/Controller/TransactionCompletionController.php index 2996c7e..f052012 100644 --- a/src/Core/Api/Transaction/Controller/TransactionCompletionController.php +++ b/src/Core/Api/Transaction/Controller/TransactionCompletionController.php @@ -3,13 +3,13 @@ namespace PostFinanceCheckoutPayment\Core\Api\Transaction\Controller; use Psr\Log\LoggerInterface; -use Shopware\Core\Framework\Log\Package; +use Shopware\Core\Framework\Routing\Annotation\RouteScope; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\{ HttpFoundation\JsonResponse, HttpFoundation\Request, HttpFoundation\Response, - Routing\Attribute\Route}; + Routing\Annotation\Route}; use PostFinanceCheckout\Sdk\{ Model\TransactionState}; use PostFinanceCheckoutPayment\Core\Settings\Service\SettingsService; @@ -20,9 +20,8 @@ * * @package PostFinanceCheckoutPayment\Core\Api\Transaction\Controller * + * @Route(defaults={"_routeScope"={"api"}}) */ -#[Package('sales-channel')] -#[Route(defaults: ['_routeScope' => ['api']])] class TransactionCompletionController extends AbstractController { /** @@ -63,10 +62,12 @@ public function setLogger(LoggerInterface $logger): void * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException * @throws \PostFinanceCheckout\Sdk\VersioningException * + * @Route( + * "/api/_action/postfinancecheckout/transaction-completion/create-transaction-completion/", + * name="api.action.postfinancecheckout.transaction-completion.create-transaction-completion", + * methods={"POST"} + * ) */ - #[Route("/api/_action/postfinancecheckout/transaction-completion/create-transaction-completion/", - name: "api.action.postfinancecheckout.transaction-completion.create-transaction-completion", - methods: ['POST'])] public function createTransactionCompletion(Request $request): JsonResponse { $salesChannelId = $request->request->get('salesChannelId'); @@ -89,4 +90,4 @@ public function createTransactionCompletion(Request $request): JsonResponse Response::HTTP_NOT_ACCEPTABLE ); } -} +} \ No newline at end of file diff --git a/src/Core/Api/Transaction/Controller/TransactionController.php b/src/Core/Api/Transaction/Controller/TransactionController.php index 1449256..896d5ad 100644 --- a/src/Core/Api/Transaction/Controller/TransactionController.php +++ b/src/Core/Api/Transaction/Controller/TransactionController.php @@ -5,14 +5,14 @@ use Psr\Log\LoggerInterface; use Shopware\Core\{ Framework\Context, - Framework\Log\Package}; + Framework\Routing\Annotation\RouteScope}; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\{ HttpFoundation\HeaderUtils, HttpFoundation\JsonResponse, HttpFoundation\Request, HttpFoundation\Response, - Routing\Attribute\Route}; + Routing\Annotation\Route}; use PostFinanceCheckoutPayment\{ Core\Api\Transaction\Service\TransactionService, Core\Settings\Service\SettingsService}; @@ -22,9 +22,8 @@ * * @package PostFinanceCheckoutPayment\Core\Api\Transaction\Controller * + * @Route(defaults={"_routeScope"={"api"}}) */ -#[Package('sales-channel')] -#[Route(defaults: ['_routeScope' => ['api']])] class TransactionController extends AbstractController { /** @@ -71,10 +70,12 @@ public function setLogger(LoggerInterface $logger): void * @param \Shopware\Core\Framework\Context $context * * @return \Symfony\Component\HttpFoundation\JsonResponse + * @Route( + * "/api/_action/postfinancecheckout/transaction/get-transaction-data/", + * name="api.action.postfinancecheckout.transaction.get-transaction-data", + * methods={"POST"} + * ) */ - #[Route("/api/_action/postfinancecheckout/transaction/get-transaction-data/", - name: "api.action.postfinancecheckout.transaction.get-transaction-data", - methods: ['POST'])] public function getTransactionData(Request $request, Context $context): JsonResponse { $transactionId = $request->request->get('transactionId'); @@ -102,11 +103,13 @@ public function getTransactionData(Request $request, Context $context): JsonResp * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException * @throws \PostFinanceCheckout\Sdk\VersioningException * + * @Route( + * "/api/_action/postfinancecheckout/transaction/get-invoice-document/{salesChannelId}/{transactionId}", + * name="api.action.postfinancecheckout.transaction.get-invoice-document", + * methods={"GET"}, + * defaults={"csrf_protected"=false, "auth_required"=false} + * ) */ - #[Route("/api/_action/postfinancecheckout/transaction/get-invoice-document/{salesChannelId}/{transactionId}", - name: "api.action.postfinancecheckout.transaction.get-invoice-document", - methods: ['GET'], - defaults: ["csrf_protected" => false, "auth_required" => false])] public function getInvoiceDocument(string $salesChannelId, int $transactionId): Response { $settings = $this->settingsService->getSettings($salesChannelId); @@ -136,11 +139,13 @@ public function getInvoiceDocument(string $salesChannelId, int $transactionId): * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException * @throws \PostFinanceCheckout\Sdk\VersioningException * + * @Route( + * "/api/_action/postfinancecheckout/transaction/get-packing-slip/{salesChannelId}/{transactionId}", + * name="api.action.postfinancecheckout.transaction.get-packing-slip", + * methods={"GET"}, + * defaults={"csrf_protected"=false, "auth_required"=false} + * ) */ - #[Route("/api/_action/postfinancecheckout/transaction/get-packing-slip/{salesChannelId}/{transactionId}", - name: "api.action.postfinancecheckout.transaction.get-packing-slip", - methods: ['GET'], - defaults: ["csrf_protected" => false, "auth_required" => false])] public function getPackingSlip(string $salesChannelId, int $transactionId): Response { $settings = $this->settingsService->getSettings($salesChannelId); @@ -162,4 +167,4 @@ public function getPackingSlip(string $salesChannelId, int $transactionId): Resp return $response; } -} +} \ No newline at end of file diff --git a/src/Core/Api/Transaction/Controller/TransactionVoidController.php b/src/Core/Api/Transaction/Controller/TransactionVoidController.php index dc198c9..80b916d 100644 --- a/src/Core/Api/Transaction/Controller/TransactionVoidController.php +++ b/src/Core/Api/Transaction/Controller/TransactionVoidController.php @@ -3,13 +3,13 @@ namespace PostFinanceCheckoutPayment\Core\Api\Transaction\Controller; use Psr\Log\LoggerInterface; -use Shopware\Core\Framework\Log\Package; +use Shopware\Core\Framework\Routing\Annotation\RouteScope; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\{ HttpFoundation\JsonResponse, HttpFoundation\Request, HttpFoundation\Response, - Routing\Attribute\Route}; + Routing\Annotation\Route}; use PostFinanceCheckout\Sdk\{ Model\TransactionState}; use PostFinanceCheckoutPayment\Core\Settings\Service\SettingsService; @@ -19,9 +19,8 @@ * * @package PostFinanceCheckoutPayment\Core\Api\Transaction\Controller * + * @Route(defaults={"_routeScope"={"api"}}) */ -#[Package('sales-channel')] -#[Route(defaults: ['_routeScope' => ['api']])] class TransactionVoidController extends AbstractController { /** @@ -62,10 +61,12 @@ public function setLogger(LoggerInterface $logger): void * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException * @throws \PostFinanceCheckout\Sdk\VersioningException * + * @Route( + * "/api/_action/postfinancecheckout/transaction-void/create-transaction-void/", + * name="api.action.postfinancecheckout.transaction-void.create-transaction-void", + * methods={"POST"} + * ) */ - #[Route("/api/_action/postfinancecheckout/transaction-void/create-transaction-void/", - name: "api.action.postfinancecheckout.transaction-void.create-transaction-void", - methods: ['POST'])] public function createTransactionVoid(Request $request): JsonResponse { $salesChannelId = $request->request->get('salesChannelId'); @@ -87,4 +88,4 @@ public function createTransactionVoid(Request $request): JsonResponse Response::HTTP_NOT_ACCEPTABLE ); } -} +} \ No newline at end of file diff --git a/src/Core/Api/Transaction/Service/OrderMailService.php b/src/Core/Api/Transaction/Service/OrderMailService.php index 574df28..bdee9a1 100644 --- a/src/Core/Api/Transaction/Service/OrderMailService.php +++ b/src/Core/Api/Transaction/Service/OrderMailService.php @@ -6,7 +6,7 @@ use Psr\Log\LoggerInterface; use Shopware\Core\{ Checkout\Cart\Event\CheckoutOrderPlacedEvent, - Checkout\Cart\CartException, + Checkout\Cart\Exception\OrderNotFoundException, Checkout\Order\OrderEntity, Content\MailTemplate\MailTemplateEntity, Content\Mail\Service\AbstractMailService, @@ -128,8 +128,8 @@ public function send(string $orderId, Context $context): void protected function getTransactionEntityByOrderId(string $orderId, Context $context): TransactionEntity { return $this->container->get(TransactionEntityDefinition::ENTITY_NAME . '.repository') - ->search(new Criteria([$orderId]), $context) - ->get($orderId); + ->search(new Criteria([$orderId]), $context) + ->get($orderId); } /** @@ -165,7 +165,7 @@ protected function getOrder(string $orderId, Context $context): OrderEntity /** @var OrderEntity|null $order */ $order = $this->container->get('order.repository')->search($orderCriteria, $context)->first(); if (is_null($order)) { - throw CartException::orderNotFound($orderId); + throw new OrderNotFoundException($orderId); } return $order; } @@ -258,4 +258,4 @@ protected function markTransactionEntityConfirmationEmailAsSent(string $orderId, { $this->container->get(TransactionEntityDefinition::ENTITY_NAME . '.repository')->upsert([['id' => $orderId, 'confirmationEmailSent' => true]], $context); } -} +} \ No newline at end of file diff --git a/src/Core/Api/Transaction/Service/TransactionService.php b/src/Core/Api/Transaction/Service/TransactionService.php index fb93588..0340b49 100644 --- a/src/Core/Api/Transaction/Service/TransactionService.php +++ b/src/Core/Api/Transaction/Service/TransactionService.php @@ -4,8 +4,7 @@ use Psr\Container\ContainerInterface; use Psr\Log\LoggerInterface; -use Shopware\Core\{ - Checkout\Cart\CartException, +use Shopware\Core\{Checkout\Cart\Exception\OrderNotFoundException, Checkout\Cart\LineItem\LineItem, Checkout\Order\OrderEntity, Checkout\Payment\Cart\AsyncPaymentTransactionStruct, @@ -16,8 +15,7 @@ }; use Shopware\Storefront\Page\Checkout\Confirm\CheckoutConfirmPageLoadedEvent; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use PostFinanceCheckout\Sdk\{ - Model\AddressCreate, +use PostFinanceCheckout\Sdk\{Model\AddressCreate, Model\ChargeAttempt, Model\CreationEntityState, Model\CriteriaOperator, @@ -33,8 +31,7 @@ Model\TransactionPending, Model\TransactionState, }; -use PostFinanceCheckoutPayment\Core\{ - Api\OrderDeliveryState\Handler\OrderDeliveryStateHandler, +use PostFinanceCheckoutPayment\Core\{Api\OrderDeliveryState\Handler\OrderDeliveryStateHandler, Api\Refund\Entity\RefundEntityCollection, Api\Refund\Entity\RefundEntityDefinition, Api\Transaction\Entity\TransactionEntity, @@ -353,11 +350,11 @@ private function getOrderEntity(string $orderId, Context $context): OrderEntity $context )->first(); if (is_null($order)) { - throw CartException::orderNotFound($orderId); + throw new OrderNotFoundException($orderId); } return $order; } catch (\Exception $e) { - throw CartException::orderNotFound($orderId); + throw new OrderNotFoundException($orderId); } } diff --git a/src/Core/Api/WebHooks/Command/WebHooksCommand.php b/src/Core/Api/WebHooks/Command/WebHooksCommand.php index 21e92d4..ab911ef 100644 --- a/src/Core/Api/WebHooks/Command/WebHooksCommand.php +++ b/src/Core/Api/WebHooks/Command/WebHooksCommand.php @@ -5,7 +5,6 @@ use Symfony\Component\{ Console\Command\Command, - Console\Attribute\AsCommand, Console\Input\InputInterface, Console\Output\OutputInterface}; use PostFinanceCheckoutPayment\Core\Api\WebHooks\Service\WebHooksService; @@ -15,9 +14,13 @@ * * @package PostFinanceCheckoutPayment\Core\Api\WebHooks\Command */ -#[AsCommand(name: 'postfinancecheckout:webhooks:install')] class WebHooksCommand extends Command { + /** + * @var string + */ + protected static $defaultName = 'postfinancecheckout:webhooks:install'; + /** * @var \PostFinanceCheckoutPayment\Core\Api\WebHooks\Service\WebHooksService */ @@ -30,7 +33,7 @@ class WebHooksCommand extends Command { */ public function __construct(WebHooksService $webHooksService) { - parent::__construct(); + parent::__construct(self::$defaultName); $this->webHooksService = $webHooksService; } @@ -59,4 +62,4 @@ protected function configure() ->setHelp('This command installs PostFinanceCheckoutPayment webhooks.'); } -} +} \ No newline at end of file diff --git a/src/Core/Api/WebHooks/Controller/WebHookController.php b/src/Core/Api/WebHooks/Controller/WebHookController.php index fa3f9dc..cd46ded 100644 --- a/src/Core/Api/WebHooks/Controller/WebHookController.php +++ b/src/Core/Api/WebHooks/Controller/WebHookController.php @@ -7,7 +7,7 @@ TransactionIsolationLevel}; use Psr\Log\LoggerInterface; use Shopware\Core\{ - Checkout\Cart\CartException, + Checkout\Cart\Exception\OrderNotFoundException, Checkout\Order\Aggregate\OrderDelivery\OrderDeliveryEntity, Checkout\Order\Aggregate\OrderTransaction\OrderTransactionEntity, Checkout\Order\Aggregate\OrderTransaction\OrderTransactionStateHandler, @@ -22,13 +22,11 @@ System\StateMachine\Exception\IllegalTransitionException}; use Shopware\Core\Checkout\Order\OrderStates; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; -use Shopware\Core\Framework\Log\Package; -use Symfony\Component\{ - HttpFoundation\JsonResponse, +use Symfony\Component\{HttpFoundation\JsonResponse, HttpFoundation\ParameterBag, HttpFoundation\Request, HttpFoundation\Response, - Routing\Attribute\Route}; + Routing\Annotation\Route}; use PostFinanceCheckout\Sdk\{ Model\RefundState, Model\Transaction, @@ -50,9 +48,8 @@ * * @package PostFinanceCheckoutPayment\Core\Api\WebHooks\Controller * + * @Route(defaults={"_routeScope"={"api"}}) */ -#[Package('sales-channel')] -#[Route(defaults: ['_routeScope' => ['api']])] class WebHookController extends AbstractController { /** @@ -136,7 +133,7 @@ class WebHookController extends AbstractController { * @var \Shopware\Core\Checkout\Order\SalesChannel\OrderService */ private $orderService; - + const LINE_ITEM_TYPE_FEE = 'FEE'; /** @@ -192,19 +189,14 @@ public function setLogger(LoggerInterface $logger): void * @param string $salesChannelId * * @return \Symfony\Component\HttpFoundation\JsonResponse|\Symfony\Component\HttpFoundation\Response + * @Route( + * "/api/_action/postfinancecheckout/webHook/callback/{salesChannelId}", + * name="api.action.postfinancecheckout.webhook.update", + * options={"seo": "false"}, + * defaults={"csrf_protected"=false, "XmlHttpRequest"=true, "auth_required"=false}, + * methods={"POST"} + * ) */ - #[Route( - path: "/api/_action/postfinancecheckout/webHook/callback/{salesChannelId}", - name: "api.action.postfinancecheckout.webhook.update", - options: ["seo" => false], - defaults: [ - "csrf_protected" => false, - "XmlHttpRequest" => true, - "auth_required" => false, - ], - methods: ["POST"], - )] - public function callback(Request $request, Context $context, string $salesChannelId): Response { $status = Response::HTTP_UNPROCESSABLE_ENTITY; @@ -283,7 +275,7 @@ public function updateRefund(WebHookRequest $callBackData, Context $context): Re $orderTransaction = $this->getOrderTransaction($orderId, $context); if ( in_array( - $orderTransaction->getStateMachineState()?->getTechnicalName(), + $orderTransaction->getStateMachineState()->getTechnicalName(), [ OrderTransactionStates::STATE_PAID, OrderTransactionStates::STATE_PARTIALLY_PAID, @@ -298,7 +290,7 @@ public function updateRefund(WebHookRequest $callBackData, Context $context): Re $this->orderTransactionStateHandler->refundPartially($orderTransactionId, $context); } } - } elseif ($orderTransaction->getStateMachineState()?->getTechnicalName() + } elseif ($orderTransaction->getStateMachineState()->getTechnicalName() === OrderTransactionStates::STATE_PARTIALLY_REFUNDED && ($refund->getState() == RefundState::SUCCESSFUL) ) { @@ -313,7 +305,7 @@ public function updateRefund(WebHookRequest $callBackData, Context $context): Re } $status = Response::HTTP_OK; - } catch (CartException $exception) { + } catch (OrderNotFoundException $exception) { $status = Response::HTTP_OK; $this->logger->info(__CLASS__ . ' : ' . __FUNCTION__ . ' : ' . $exception->getMessage(), $callBackData->jsonSerialize()); } catch (IllegalTransitionException $exception) { @@ -364,7 +356,7 @@ private function executeLocked(string $orderId, Context $context, callable $oper $order = $this->container->get('order.repository')->search(new Criteria([$orderId]), $context)->first(); if(empty($order)){ - throw CartException::orderNotFound($orderId); + throw new OrderNotFoundException($orderId); } $this->container->get('order.repository')->upsert([$data], $context); @@ -412,10 +404,10 @@ private function getOrderEntity(string $orderId, Context $context): OrderEntity $context )->first(); if (is_null($this->orderEntity)) { - throw CartException::orderNotFound($orderId); + throw new OrderNotFoundException($orderId); } } catch (\Exception $e) { - throw CartException::orderNotFound($orderId); + throw new OrderNotFoundException($orderId); } } @@ -448,10 +440,10 @@ private function updateTransaction(WebHookRequest $callBackData, Context $contex $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()}"); + $this->logger->info("OrderId: {$orderId} Current state: {$orderTransaction->getStateMachineState()->getTechnicalName()}"); if (!in_array( - $orderTransaction->getStateMachineState()?->getTechnicalName(), + $orderTransaction->getStateMachineState()->getTechnicalName(), $this->transactionFinalStates )) { switch ($transaction->getState()) { @@ -479,7 +471,7 @@ private function updateTransaction(WebHookRequest $callBackData, Context $contex }); } $status = Response::HTTP_OK; - } catch (CartException $exception) { + } catch (OrderNotFoundException $exception) { $status = Response::HTTP_OK; $this->logger->info(__CLASS__ . ' : ' . __FUNCTION__ . ' : ' . $exception->getMessage(), $callBackData->jsonSerialize()); } catch (IllegalTransitionException $exception) { @@ -538,7 +530,7 @@ public function updateTransactionInvoice(WebHookRequest $callBackData, Context $ $this->updatePriceIfAdditionalItemsExist($transactionInvoice, $orderTransaction, $context); if (!in_array( - $orderTransaction->getStateMachineState()?->getTechnicalName(), + $orderTransaction->getStateMachineState()->getTechnicalName(), $this->transactionFinalStates )) { switch ($transactionInvoice->getState()) { @@ -557,7 +549,7 @@ public function updateTransactionInvoice(WebHookRequest $callBackData, Context $ }); } $status = Response::HTTP_OK; - } catch (CartException $exception) { + } catch (OrderNotFoundException $exception) { $status = Response::HTTP_OK; $this->logger->info(__CLASS__ . ' : ' . __FUNCTION__ . ' : ' . $exception->getMessage(), $callBackData->jsonSerialize()); } catch (IllegalTransitionException $exception) { @@ -569,7 +561,7 @@ public function updateTransactionInvoice(WebHookRequest $callBackData, Context $ return new JsonResponse(['data' => $callBackData->jsonSerialize()], $status); } - + /** * Updates order table field price only if there are additional items added from portal side * @@ -609,7 +601,7 @@ private function unholdDelivery(string $orderId, Context $context): void * @var OrderDeliveryEntity $orderDelivery */ $orderDelivery = $order->getDeliveries()->last(); - if ($orderDelivery->getStateMachineState()?->getTechnicalName() !== OrderDeliveryStateHandler::STATE_HOLD){ + if ($orderDelivery->getStateMachineState()->getTechnicalName() !== OrderDeliveryStateHandler::STATE_HOLD){ return; } $orderDeliveryStateHandler = $this->container->get(OrderDeliveryStateHandler::class); @@ -648,7 +640,7 @@ private function unholdAndCancelDelivery(string $orderId, Context $context): voi * @var OrderDeliveryEntity $orderDelivery */ $orderDelivery = $order->getDeliveries()->last(); - if ($orderDelivery->getStateMachineState()?->getTechnicalName() !== OrderDeliveryStateHandler::STATE_HOLD){ + if ($orderDelivery->getStateMachineState()->getTechnicalName() !== OrderDeliveryStateHandler::STATE_HOLD){ return; } $orderDeliveryId = $orderDelivery->getId(); diff --git a/src/Core/Settings/Command/CreateMerchantCommand.php b/src/Core/Settings/Command/CreateMerchantCommand.php deleted file mode 100644 index d8b9eff..0000000 --- a/src/Core/Settings/Command/CreateMerchantCommand.php +++ /dev/null @@ -1,189 +0,0 @@ -userRepository = $userRepository; - $this->userRoleRepository = $userRoleRepository; - $this->localeRepository = $localeRepository; - } - - /** - * Executes the command to create a new merchant user with a specific role. - * - * @param InputInterface $input - * @param OutputInterface $output - * @return int Command::SUCCESS on success, Command::FAILURE on failure - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $output->writeln('Creating PostFinanceCheckoutPayment merchant with custom role...'); - - $firstName = $input->getOption('firstName'); - $lastName = $input->getOption('lastName'); - $email = $input->getOption('email') ?? 'merchant@merchant.com'; - $password = $input->getOption('password') ?? 'merchant123'; - - $context = Context::createDefaultContext(); - - // Check if user already exists - $criteria = new Criteria(); - $criteria->addFilter(new EqualsFilter('email', $email)); - $existingUser = $this->userRepository->search($criteria, $context)->first(); - - if ($existingUser) { - $output->writeln('User already exists.'); - return Command::SUCCESS; - } - - // Create role if it doesn't exist - $roleId = $this->getOrCreateRoleId('PostFinanceCheckout viewer', $context); - - // Create user if it doesn't exist - $this->userRepository->create([ - [ - 'id' => Uuid::randomHex(), - 'username' => $email, - 'email' => $email, - 'firstName' => $firstName, - 'lastName' => $lastName, - 'password' => $password, - 'admin' => false, - 'localeId' => $this->getLocaleId($context), - 'aclRoles' => [ - [ - 'id' => $roleId - ] - ], - ] - ], $context); - - $output->writeln('Merchant user created successfully.'); - - return Command::SUCCESS; - } - - /** - * Fetches the default locale ID. - * - * @param Context $context - * @return string Locale ID - * @throws \RuntimeException If the default locale is not found - */ - private function getLocaleId(Context $context): string - { - // Fetch the default locale id - $criteria = new Criteria(); - $criteria->addFilter(new EqualsFilter('code', 'en-GB')); - $localeId = $this->localeRepository->searchIds($criteria, $context)->firstId(); - - if (!$localeId) { - throw new \RuntimeException('Default locale not found'); - } - - return $localeId; - } - - /** - * Fetches the role ID for a given role name or creates the role if it does not exist. - * - * @param string $roleName - * @param Context $context - * @return string Role ID - * @throws \RuntimeException If the role cannot be created or found - */ - private function getOrCreateRoleId(string $roleName, Context $context): string - { - $criteria = new Criteria(); - $criteria->addFilter(new EqualsFilter('name', $roleName)); - $roleId = $this->userRoleRepository->searchIds($criteria, $context)->firstId(); - - if (!$roleId) { - $roleId = Uuid::randomHex(); - $this->userRoleRepository->create([ - [ - 'id' => $roleId, - 'name' => $roleName, - 'privileges' => [ - 'postfinancecheckout.viewer', - 'postfinancecheckout_sales_channel:read', - 'postfinancecheckout_sales_channel_run:read', - 'postfinancecheckout_sales_channel_run_log:read', - 'language:read', - 'locale:read', - 'system_config:read' - ] - ] - ], $context); - } - - return $roleId; - } - - /** - * Configures the current command. - */ - protected function configure(): void - { - $this - ->setDescription('Creates a new merchant user with specific roles.') - ->addOption('firstName', null, InputOption::VALUE_OPTIONAL, 'First name of the merchant user', 'Merchant') - ->addOption('lastName', null, InputOption::VALUE_OPTIONAL, 'Last name of the merchant user', 'Merchant') - ->addOption('email', null, InputOption::VALUE_OPTIONAL, 'Email of the merchant user') - ->addOption('password', null, InputOption::VALUE_OPTIONAL, 'Password of the merchant user'); - } -} diff --git a/src/Core/Settings/Command/SettingsCommand.php b/src/Core/Settings/Command/SettingsCommand.php index 8bce9fa..e3a5747 100644 --- a/src/Core/Settings/Command/SettingsCommand.php +++ b/src/Core/Settings/Command/SettingsCommand.php @@ -4,7 +4,6 @@ use Symfony\Component\{ Console\Command\Command, - Console\Attribute\AsCommand, Console\Input\InputInterface, Console\Input\InputOption, Console\Output\OutputInterface}; @@ -17,9 +16,13 @@ * @internal * @package PostFinanceCheckoutPayment\Core\Settings\Command */ -#[AsCommand(name: 'postfinancecheckout:settings:install')] class SettingsCommand extends Command { + /** + * @var string + */ + protected static $defaultName = 'postfinancecheckout:settings:install'; + /** * @var \PostFinanceCheckoutPayment\Core\Settings\Service\SettingsService */ @@ -31,7 +34,7 @@ class SettingsCommand extends Command { */ public function __construct(SettingsService $settingsService) { - parent::__construct(); + parent::__construct(self::$defaultName); $this->settingsService = $settingsService; } @@ -47,6 +50,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int SettingsService::CONFIG_APPLICATION_KEY => $input->getOption(SettingsService::CONFIG_APPLICATION_KEY), SettingsService::CONFIG_EMAIL_ENABLED => $input->getOption(SettingsService::CONFIG_EMAIL_ENABLED), SettingsService::CONFIG_INTEGRATION => $input->getOption(SettingsService::CONFIG_INTEGRATION), + SettingsService::CONFIG_IS_SHOWCASE => $input->getOption(SettingsService::CONFIG_IS_SHOWCASE), SettingsService::CONFIG_LINE_ITEM_CONSISTENCY_ENABLED => $input->getOption(SettingsService::CONFIG_LINE_ITEM_CONSISTENCY_ENABLED), SettingsService::CONFIG_SPACE_ID => $input->getOption(SettingsService::CONFIG_SPACE_ID), SettingsService::CONFIG_SPACE_VIEW_ID => $input->getOption(SettingsService::CONFIG_SPACE_VIEW_ID), @@ -55,7 +59,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int SettingsService::CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED => $input->getOption(SettingsService::CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED), SettingsService::CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED => $input->getOption(SettingsService::CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED), ]); - return Command::SUCCESS; + return 0; } /** @@ -97,6 +101,13 @@ protected function configure() SettingsService::CONFIG_INTEGRATION, Integration::IFRAME ) + ->addOption( + SettingsService::CONFIG_IS_SHOWCASE, + SettingsService::CONFIG_IS_SHOWCASE, + InputOption::VALUE_OPTIONAL, + SettingsService::CONFIG_IS_SHOWCASE, + true + ) ->addOption( SettingsService::CONFIG_LINE_ITEM_CONSISTENCY_ENABLED, SettingsService::CONFIG_LINE_ITEM_CONSISTENCY_ENABLED, @@ -132,4 +143,4 @@ protected function configure() true ); } -} +} \ No newline at end of file diff --git a/src/Core/Settings/Service/SettingsService.php b/src/Core/Settings/Service/SettingsService.php index e85ecfa..87cd615 100644 --- a/src/Core/Settings/Service/SettingsService.php +++ b/src/Core/Settings/Service/SettingsService.php @@ -21,6 +21,7 @@ class SettingsService { public const CONFIG_APPLICATION_KEY = 'applicationKey'; public const CONFIG_EMAIL_ENABLED = 'emailEnabled'; public const CONFIG_INTEGRATION = 'integration'; + public const CONFIG_IS_SHOWCASE = 'isShowcase'; public const CONFIG_LINE_ITEM_CONSISTENCY_ENABLED = 'lineItemConsistencyEnabled'; public const CONFIG_SPACE_ID = 'spaceId'; public const CONFIG_SPACE_VIEW_ID = 'spaceViewId'; diff --git a/src/Core/Storefront/Account/Controller/AccountOrderController.php b/src/Core/Storefront/Account/Controller/AccountOrderController.php index 31ee562..aa76f1e 100644 --- a/src/Core/Storefront/Account/Controller/AccountOrderController.php +++ b/src/Core/Storefront/Account/Controller/AccountOrderController.php @@ -6,22 +6,23 @@ use Shopware\Core\{ Checkout\Cart\Exception\CustomerNotLoggedInException, Checkout\Customer\CustomerEntity, + Framework\Routing\Annotation\RouteScope, PlatformRequest, System\SalesChannel\SalesChannelContext}; use Shopware\Storefront\Controller\StorefrontController; -use Shopware\Core\Framework\Log\Package; use Symfony\Component\{ HttpFoundation\HeaderUtils, HttpFoundation\RequestStack, HttpFoundation\Response, - Routing\Attribute\Route, + Routing\Annotation\Route, Security\Core\Exception\AccessDeniedException}; use PostFinanceCheckoutPayment\Core\{ Api\Transaction\Service\TransactionService, Settings\Service\SettingsService}; -#[Package('storefront')] -#[Route(defaults: ['_routeScope' => ['storefront']])] +/** + * @Route(defaults={"_routeScope"={"storefront"}}) + */ class AccountOrderController extends StorefrontController { /** @@ -72,10 +73,12 @@ public function setLogger(LoggerInterface $logger): void * @throws \PostFinanceCheckout\Sdk\ApiException * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException * @throws \PostFinanceCheckout\Sdk\VersioningException + * @Route( + * "/postfinancecheckout/account/order/download/invoice/document/{orderId}", + * name="frontend.postfinancecheckout.account.order.download.invoice.document", + * methods={"GET"} + * ) */ - #[Route("/postfinancecheckout/account/order/download/invoice/document/{orderId}", - name: "frontend.postfinancecheckout.account.order.download.invoice.document", - methods: ['GET'])] public function downloadInvoiceDocument(string $orderId, SalesChannelContext $salesChannelContext): Response { $customer = $this->getLoggedInCustomer(); diff --git a/src/Core/Storefront/Checkout/Controller/CheckoutController.php b/src/Core/Storefront/Checkout/Controller/CheckoutController.php index 05f2371..25cce7f 100644 --- a/src/Core/Storefront/Checkout/Controller/CheckoutController.php +++ b/src/Core/Storefront/Checkout/Controller/CheckoutController.php @@ -5,7 +5,8 @@ use Psr\Log\LoggerInterface; use Shopware\Core\{ Checkout\Cart\Cart, - Checkout\Cart\CartException, + Checkout\Cart\Exception\CustomerNotLoggedInException, + Checkout\Cart\Exception\OrderNotFoundException, Checkout\Cart\LineItemFactoryRegistry, Checkout\Cart\SalesChannel\CartService, Checkout\Order\Aggregate\OrderLineItem\OrderLineItemCollection, @@ -16,7 +17,7 @@ Framework\DataAbstractionLayer\Search\Criteria, Framework\DataAbstractionLayer\Search\Filter\EqualsFilter, Framework\DataAbstractionLayer\Search\Sorting\FieldSorting, - Framework\Log\Package, + Framework\Routing\Annotation\RouteScope, Framework\Routing\Exception\MissingRequestParameterException, Framework\Uuid\Uuid, Framework\Uuid\Exception\InvalidUuidException, @@ -31,7 +32,7 @@ use Symfony\Component\{ HttpFoundation\Request, HttpFoundation\Response, - Routing\Attribute\Route, + Routing\Annotation\Route, Routing\Generator\UrlGeneratorInterface }; use PostFinanceCheckout\Sdk\{ @@ -52,9 +53,8 @@ * * @package PostFinanceCheckoutPayment\Core\Storefront\Checkout\Controller * + * @Route(defaults={"_routeScope"={"storefront"}}) */ -#[Package('checkout')] -#[Route(defaults: ['_routeScope' => ['storefront']])] class CheckoutController extends StorefrontController { /** @@ -145,13 +145,13 @@ public function setLogger(LoggerInterface $logger): void * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException * @throws \PostFinanceCheckout\Sdk\VersioningException * + * @Route( + * "/postfinancecheckout/checkout/pay", + * name="frontend.postfinancecheckout.checkout.pay", + * options={"seo": "false"}, + * methods={"GET"} + * ) */ - #[Route( - path: "/postfinancecheckout/checkout/pay", - name: "frontend.postfinancecheckout.checkout.pay", - options: ["seo" => false], - methods: ["GET"], - )] public function pay(SalesChannelContext $salesChannelContext, Request $request): Response { $orderId = $request->query->get('orderId'); @@ -318,14 +318,14 @@ private function getOrder(Request $request, SalesChannelContext $salesChannelCon ->load(new Request(), $salesChannelContext, $criteria) ->getOrders(); } catch (InvalidUuidException $e) { - throw CartException::orderNotFound($orderId); + throw new OrderNotFoundException($orderId); } /** @var OrderEntity|null $order */ $order = $searchResult->get($orderId); if (!$order) { - throw CartException::orderNotFound($orderId); + throw new OrderNotFoundException($orderId); } return $order; @@ -339,13 +339,13 @@ private function getOrder(Request $request, SalesChannelContext $salesChannelCon * * @return \Symfony\Component\HttpFoundation\Response * + * @Route( + * "/postfinancecheckout/checkout/recreate-cart", + * name="frontend.postfinancecheckout.checkout.recreate-cart", + * options={"seo": "false"}, + * methods={"GET"} + * ) */ - #[Route( - path: "/postfinancecheckout/checkout/recreate-cart", - name: "frontend.postfinancecheckout.checkout.recreate-cart", - options: ["seo" => false], - methods: ["GET"], - )] public function recreateCart(Request $request, SalesChannelContext $salesChannelContext) { $orderId = $request->query->get('orderId'); diff --git a/src/PostFinanceCheckoutPayment.php b/src/PostFinanceCheckoutPayment.php index ae722d7..9372a4e 100644 --- a/src/PostFinanceCheckoutPayment.php +++ b/src/PostFinanceCheckoutPayment.php @@ -14,13 +14,6 @@ Util\Traits\PostFinanceCheckoutPaymentPluginTrait }; -use Symfony\Component\Config\FileLocator; -use Symfony\Component\Config\Loader\DelegatingLoader; -use Symfony\Component\Config\Loader\LoaderResolver; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Loader\DirectoryLoader; -use Symfony\Component\DependencyInjection\Loader\GlobFileLoader; -use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; // expect the vendor folder on Shopware store releases if (file_exists(dirname(__DIR__) . '/vendor/autoload.php')) { @@ -36,16 +29,6 @@ class PostFinanceCheckoutPayment extends Plugin { use PostFinanceCheckoutPaymentPluginTrait; - private const POSTFINANCECHECKOUT_SALES_CHANNEL_PRIVILEGE_READ = 'postfinancecheckout_sales_channel:read'; - private const POSTFINANCECHECKOUT_SALES_CHANNEL_PRIVILEGE_UPDATE = 'postfinancecheckout_sales_channel:update'; - private const POSTFINANCECHECKOUT_SALES_CHANNEL_PRIVILEGE_CREATE = 'postfinancecheckout_sales_channel:create'; - private const POSTFINANCECHECKOUT_SALES_CHANNEL_PRIVILEGE_DELETE = 'postfinancecheckout_sales_channel:delete'; - private const POSTFINANCECHECKOUT_SALES_CHANNEL_PRIVILEGE_RUN_READ = 'postfinancecheckout_sales_channel_run:read'; - private const POSTFINANCECHECKOUT_SALES_CHANNEL_PRIVILEGE_RUN_UPDATE = 'postfinancecheckout_sales_channel_run:update'; - private const POSTFINANCECHECKOUT_SALES_CHANNEL_PRIVILEGE_RUN_CREATE = 'postfinancecheckout_sales_channel_run:create'; - private const POSTFINANCECHECKOUT_SALES_CHANNEL_PRIVILEGE_RUN_DELETE = 'postfinancecheckout_sales_channel_run:delete'; - private const POSTFINANCECHECKOUT_SALES_CHANNEL_PRIVILEGE_RUN_LOG_READ = 'postfinancecheckout_sales_channel_run_log:read'; - /** * @param \Shopware\Core\Framework\Plugin\Context\UninstallContext $uninstallContext * @return void @@ -78,50 +61,4 @@ public function deactivate(DeactivateContext $deactivateContext): void $this->disablePaymentMethods($deactivateContext->getContext()); } - public function build(ContainerBuilder $container): void - { - parent::build($container); - - $locator = new FileLocator('Resources/config'); - - $resolver = new LoaderResolver([ - new YamlFileLoader($container, $locator), - new GlobFileLoader($container, $locator), - new DirectoryLoader($container, $locator), - ]); - - $configLoader = new DelegatingLoader($resolver); - - $confDir = \rtrim($this->getPath(), '/') . '/Resources/config'; - - $configLoader->load($confDir . '/{packages}/*.yaml', 'glob'); - } - - public function enrichPrivileges(): array - { - return [ - 'sales_channel.viewer' => [ - self::POSTFINANCECHECKOUT_SALES_CHANNEL_PRIVILEGE_READ, - self::POSTFINANCECHECKOUT_SALES_CHANNEL_PRIVILEGE_RUN_READ, - self::POSTFINANCECHECKOUT_SALES_CHANNEL_PRIVILEGE_RUN_UPDATE, - self::POSTFINANCECHECKOUT_SALES_CHANNEL_PRIVILEGE_RUN_CREATE, - self::POSTFINANCECHECKOUT_SALES_CHANNEL_PRIVILEGE_RUN_LOG_READ, - 'sales_channel_payment_method:read', - ], - 'sales_channel.editor' => [ - self::POSTFINANCECHECKOUT_SALES_CHANNEL_PRIVILEGE_UPDATE, - self::POSTFINANCECHECKOUT_SALES_CHANNEL_PRIVILEGE_RUN_DELETE, - 'payment_method:update', - ], - 'sales_channel.creator' => [ - self::POSTFINANCECHECKOUT_SALES_CHANNEL_PRIVILEGE_CREATE, - 'payment_method:create', - 'shipping_method:create', - 'delivery_time:create', - ], - 'sales_channel.deleter' => [ - self::POSTFINANCECHECKOUT_SALES_CHANNEL_PRIVILEGE_DELETE, - ], - ]; - } } diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-completion/index.html.twig b/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-completion/index.html.twig index 513ac5c..93773c2 100644 --- a/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-completion/index.html.twig +++ b/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-completion/index.html.twig @@ -6,8 +6,7 @@ {% block postfinancecheckout_order_action_completion_amount %} - + v-model="isCompletion"> {% endblock %} {% block postfinancecheckout_order_action_completion_confirm_button %} diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-refund-by-amount/index.html.twig b/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-refund-by-amount/index.html.twig index aec6f18..deba78c 100644 --- a/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-refund-by-amount/index.html.twig +++ b/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-refund-by-amount/index.html.twig @@ -4,10 +4,10 @@ @modal-close="$emit('modal-close')"> {% block postfinancecheckout_order_action_refund_amount_by_amount %} - diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-refund/index.html.twig b/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-refund/index.html.twig index f975a8c..20c703c 100644 --- a/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-refund/index.html.twig +++ b/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-refund/index.html.twig @@ -5,15 +5,15 @@ {% block postfinancecheckout_order_action_refund_amount %} -
    {{ $tc('postfinancecheckout-order.refundAction.maxAvailableItemsToRefund') }}: - {{ this.$parent.$parent.refundableQuantity }} + {{ this.$parent.refundableQuantity }}
    {% endblock %} diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-refund/index.js b/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-refund/index.js index 5569628..ddd863e 100644 --- a/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-refund/index.js +++ b/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-refund/index.js @@ -55,7 +55,7 @@ Component.register('postfinancecheckout-order-action-refund', { this.transactionData.transactions[0].metaData.salesChannelId, this.transactionData.transactions[0].id, this.refundQuantity, - this.$parent.$parent.currentLineItem + this.$parent.currentLineItem ).then(() => { this.createNotificationSuccess({ title: this.$tc('postfinancecheckout-order.refundAction.successTitle'), diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-void/index.html.twig b/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-void/index.html.twig index 7e18d72..30d54b9 100644 --- a/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-void/index.html.twig +++ b/src/Resources/app/administration/src/module/postfinancecheckout-order/component/postfinancecheckout-order-action-void/index.html.twig @@ -6,8 +6,7 @@ {% block postfinancecheckout_order_action_void_amount %} - + v-model="isVoid"> {% endblock %} {% block postfinancecheckout_order_action_void_confirm_button %} diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-order/index.js b/src/Resources/app/administration/src/module/postfinancecheckout-order/index.js index 6abc651..1e63b22 100644 --- a/src/Resources/app/administration/src/module/postfinancecheckout-order/index.js +++ b/src/Resources/app/administration/src/module/postfinancecheckout-order/index.js @@ -15,8 +15,8 @@ Module.register('postfinancecheckout-order', { name: 'PostFinanceCheckout', title: 'postfinancecheckout-order.general.title', description: 'postfinancecheckout-order.general.descriptionTextModule', - version: '1.0.1', - targetVersion: '1.0.1', + version: '1.0.0', + targetVersion: '1.0.0', color: '#2b52ff', snippets: { diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-advanced-options/index.html.twig b/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-advanced-options/index.html.twig index c4ea24a..fa24b87 100644 --- a/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-advanced-options/index.html.twig +++ b/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-advanced-options/index.html.twig @@ -3,7 +3,7 @@
    diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-advanced-options/index.js b/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-advanced-options/index.js index df8b3ff..0a0fd14 100644 --- a/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-advanced-options/index.js +++ b/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-advanced-options/index.js @@ -10,10 +10,6 @@ Component.register('sw-postfinancecheckout-advanced-options', { name: 'PostFinanceCheckoutAdvancedOptions', - inject: [ - 'acl' - ], - mixins: [ Mixin.getByName('notification') ], @@ -42,6 +38,9 @@ Component.register('sw-postfinancecheckout-advanced-options', { }; }, + computed: { + }, + methods: { checkTextFieldInheritance(value) { if (typeof value !== 'string') { diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-credentials/index.html.twig b/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-credentials/index.html.twig index f9942fb..57bc04b 100644 --- a/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-credentials/index.html.twig +++ b/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-credentials/index.html.twig @@ -1,8 +1,8 @@ {% block postfinancecheckout_settings_content_card_channel_config_credentials %} {% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container %} @@ -13,7 +13,7 @@ {% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_space_id %} @@ -34,7 +34,7 @@ {% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_user_id %} @@ -55,7 +55,7 @@ {% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_application_key %} diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-credentials/index.js b/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-credentials/index.js index e51fb61..b408cf7 100644 --- a/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-credentials/index.js +++ b/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-credentials/index.js @@ -10,10 +10,6 @@ Component.register('sw-postfinancecheckout-credentials', { name: 'PostFinanceCheckoutCredentials', - inject: [ - 'acl' - ], - mixins: [ Mixin.getByName('notification') ], @@ -59,6 +55,10 @@ Component.register('sw-postfinancecheckout-credentials', { isTesting: { type: Boolean, required: false + }, + isShowcase: { + type: Boolean, + required: true } }, @@ -68,6 +68,8 @@ Component.register('sw-postfinancecheckout-credentials', { }; }, + computed: {}, + methods: { checkTextFieldInheritance(value) { diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-options/index.html.twig b/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-options/index.html.twig index 089f6d9..443911a 100644 --- a/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-options/index.html.twig +++ b/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-options/index.html.twig @@ -10,7 +10,7 @@ {% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_space_view_id %} @@ -29,7 +29,7 @@ {% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_integration %} @@ -51,7 +51,7 @@ {% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_line_item_consistency_enabled %} @@ -71,7 +71,7 @@ {% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_email_enabled %} diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-storefront-options/index.html.twig b/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-storefront-options/index.html.twig index e7f3cbd..da51ab0 100644 --- a/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-storefront-options/index.html.twig +++ b/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-storefront-options/index.html.twig @@ -3,7 +3,7 @@
    diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-storefront-options/index.js b/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-storefront-options/index.js index b5f9321..c12c2bd 100644 --- a/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-storefront-options/index.js +++ b/src/Resources/app/administration/src/module/postfinancecheckout-settings/component/sw-postfinancecheckout-storefront-options/index.js @@ -38,6 +38,9 @@ Component.register('sw-postfinancecheckout-storefront-options', { }; }, + computed: { + }, + methods: { checkTextFieldInheritance(value) { if (typeof value !== 'string') { diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-settings/index.js b/src/Resources/app/administration/src/module/postfinancecheckout-settings/index.js index cf442c1..6636d75 100644 --- a/src/Resources/app/administration/src/module/postfinancecheckout-settings/index.js +++ b/src/Resources/app/administration/src/module/postfinancecheckout-settings/index.js @@ -8,11 +8,6 @@ import './component/sw-postfinancecheckout-settings-icon'; import './component/sw-postfinancecheckout-storefront-options'; import './component/sw-postfinancecheckout-advanced-options'; -import deDE from './snippet/de-DE.json'; -import enGB from './snippet/en-GB.json'; -import frFR from './snippet/fr-FR.json'; -import itIT from './snippet/it-IT.json'; - const {Module} = Shopware; Module.register('postfinancecheckout-settings', { @@ -22,15 +17,8 @@ Module.register('postfinancecheckout-settings', { description: 'postfinancecheckout-settings.general.descriptionTextModule', color: '#28d8ff', icon: 'default-action-settings', - version: '1.0.1', - targetVersion: '1.0.1', - - snippets: { - 'de-DE': deDE, - 'en-GB': enGB, - 'fr-FR': frFR, - 'it-IT': itIT, - }, + version: '1.0.0', + targetVersion: '1.0.0', routes: { index: { @@ -39,14 +27,7 @@ Module.register('postfinancecheckout-settings', { meta: { parentPath: 'sw.settings.index', privilege: 'postfinancecheckout.viewer' - }, - props: { - default: (route) => { - return { - hash: route.params.hash, - }; - }, - }, + } } }, diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-settings/page/postfinancecheckout-settings/configuration-constants.js b/src/Resources/app/administration/src/module/postfinancecheckout-settings/page/postfinancecheckout-settings/configuration-constants.js index de1de57..fa864d8 100644 --- a/src/Resources/app/administration/src/module/postfinancecheckout-settings/page/postfinancecheckout-settings/configuration-constants.js +++ b/src/Resources/app/administration/src/module/postfinancecheckout-settings/page/postfinancecheckout-settings/configuration-constants.js @@ -7,6 +7,7 @@ export const CONFIG_SPACE_ID = CONFIG_DOMAIN + '.' + 'spaceId'; export const CONFIG_SPACE_VIEW_ID = CONFIG_DOMAIN + '.' + 'spaceViewId'; export const CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED = CONFIG_DOMAIN + '.' + 'storefrontInvoiceDownloadEnabled'; export const CONFIG_USER_ID = CONFIG_DOMAIN + '.' + 'userId'; +export const CONFIG_IS_SHOWCASE = CONFIG_DOMAIN + '.' + 'isShowcase'; export const CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED = CONFIG_DOMAIN + '.' + 'storefrontWebhooksUpdateEnabled'; export const CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED = CONFIG_DOMAIN + '.' + 'storefrontPaymentsUpdateEnabled'; @@ -20,6 +21,7 @@ export default { CONFIG_SPACE_VIEW_ID, CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED, CONFIG_USER_ID, + CONFIG_IS_SHOWCASE, CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED, CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED }; \ No newline at end of file diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-settings/page/postfinancecheckout-settings/index.html.twig b/src/Resources/app/administration/src/module/postfinancecheckout-settings/page/postfinancecheckout-settings/index.html.twig index 4c8f4a7..1b74f07 100644 --- a/src/Resources/app/administration/src/module/postfinancecheckout-settings/page/postfinancecheckout-settings/index.html.twig +++ b/src/Resources/app/administration/src/module/postfinancecheckout-settings/page/postfinancecheckout-settings/index.html.twig @@ -15,7 +15,7 @@