diff --git a/CHANGELOG.md b/CHANGELOG.md
index 75a486c..83ab875 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,11 @@
# Changelog
All notable changes to this project will be documented in this file.
+
+## [2.0.7]
+### Fixed
+- Fixed a Twig rendering issue in the storefront controller to restore compatibility with Shopware 6.6.9.0 and newer.
+
## [2.0.6]
### Added
- Provide a new configuration option to enable or disable changing the order status to `In Progress` after successful payment.
diff --git a/README.md b/README.md
index fcde8ce..aded8f5 100644
--- a/README.md
+++ b/README.md
@@ -35,8 +35,8 @@ Integrates your Shopware web shop to the AltaPay payments gateway.
## Compatibility
-- Shopware 6.6.x (Tested version 6.6.10.5)
-- Shopware 6.7.x (Tested version 6.7.2.2)
+- Shopware 6.6.x (Tested version 6.6.9.0)
+- Shopware 6.7.x (Tested version 6.7.5.1)
## Changelog
See [Changelog](CHANGELOG.md) for all the release notes.
diff --git a/composer.json b/composer.json
index f67991a..bf83c4e 100644
--- a/composer.json
+++ b/composer.json
@@ -3,7 +3,7 @@
"description": "AltaPay plugin for Shopware 6",
"type": "shopware-platform-plugin",
"license": "MIT",
- "version": "2.0.6",
+ "version": "2.0.7",
"authors": [
{
"name": "AltaPay A/S",
diff --git a/src/Controller/CallbackController.php b/src/Controller/CallbackController.php
index c0b63f9..d9efca8 100644
--- a/src/Controller/CallbackController.php
+++ b/src/Controller/CallbackController.php
@@ -24,9 +24,10 @@
use Symfony\Component\Routing\RouterInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use Wexo\AltaPay\Service\PaymentService;
+use Twig\Environment;
#[Route(defaults: ['_routeScope' => ['storefront']])]
-class CallbackController extends StorefrontController
+class CallbackController
{
public function __construct(
protected readonly PaymentService $paymentService,
@@ -35,10 +36,18 @@ public function __construct(
protected readonly RouterInterface $router,
protected readonly TranslatorInterface $translator,
protected readonly SystemConfigService $systemConfigService,
- protected readonly EntityRepository $mediaRepository
+ protected readonly EntityRepository $mediaRepository,
+ protected Environment $twig
) {
}
+ protected function renderTemplate(string $template, array $data = []): Response
+ {
+ return new Response(
+ $this->twig->render($template, $data)
+ );
+ }
+
#[Route(
path: '/altapay/getStyling',
name: 'altapay.gateway.styling',
@@ -98,7 +107,10 @@ public function getTerminalStyling(Request $request, SalesChannelContext $salesC
'formTemplateClass' => $formTemplateClass
];
- return $this->render('@WexoAltaPay/gateway/index.html.twig', ['gatewayData' => $data]);
+ return $this->renderTemplate(
+ '@WexoAltaPay/gateway/index.html.twig',
+ ['gatewayData' => $data]
+ );
}
#[Route(
@@ -107,14 +119,17 @@ public function getTerminalStyling(Request $request, SalesChannelContext $salesC
defaults: ['auth_required' => false],
methods: ['POST']
)]
- public function gatewayRedirect(Request $request, SalesChannelContext $salesChannelContext): Response
+ public function gatewayRedirect(Request $request): Response
{
$data = [
'languageCode' => $request->get('language'),
'title' => $this->translator->trans('altapay.gateway.title'),
];
- return $this->render('@WexoAltaPay/gateway/redirect.html.twig', ['gatewayData' => $data]);
+ return $this->renderTemplate(
+ '@WexoAltaPay/gateway/redirect.html.twig',
+ ['gatewayData' => $data]
+ );
}
#[Route(
diff --git a/src/Resources/config/services.xml b/src/Resources/config/services.xml
index f7c083e..ca5f425 100644
--- a/src/Resources/config/services.xml
+++ b/src/Resources/config/services.xml
@@ -35,14 +35,11 @@
-
+
-
-
-
-
+
diff --git a/src/WexoAltaPay.php b/src/WexoAltaPay.php
index 6c71961..c90e13d 100644
--- a/src/WexoAltaPay.php
+++ b/src/WexoAltaPay.php
@@ -21,7 +21,7 @@ class WexoAltaPay extends Plugin
public const ALTAPAY_FIELD_SET_NAME = "wexoAltaPay";
public const ALTAPAY_PAYMENT_METHOD_FIELD_SET_NAME = "wexoAltaPayPaymentMethod";
public const ALTAPAY_CART_TOKEN = "wexoAltaPayCartToken";
- public const ALTAPAY_PLUGIN_VERSION = '2.0.6';
+ public const ALTAPAY_PLUGIN_VERSION = '2.0.7';
public const ALTAPAY_PLUGIN_NAME = 'WexoAltaPay';
public function update(UpdateContext $updateContext): void
diff --git a/wiki.md b/wiki.md
index c612f39..c30e7d0 100644
--- a/wiki.md
+++ b/wiki.md
@@ -146,7 +146,7 @@ The new credentials can now be used as the API Username and API Password in the
- Shopware 6.6.x
- Shopware 6.7.x
-The latest tested versions are `6.6.10.5` and `6.7.2.2`
+The latest tested versions are `6.6.9.0` and `6.7.5.1`
## Troubleshooting