From 8eba70fd9d7efcb214009f0b013dc789f105a71c Mon Sep 17 00:00:00 2001 From: Mark Beazley Date: Thu, 26 Oct 2023 16:13:51 +0100 Subject: [PATCH 1/3] Add Klarna one support. --- src/Payments/Methods/KlarnaOne.php | 18 ++++++++++++++++++ src/Payments/MethodsInterface.php | 2 ++ src/Payments/PaymentTerms/Options.php | 1 + .../PaymentMethod/_mollieMethodsForm.html.twig | 2 ++ 4 files changed, 23 insertions(+) create mode 100644 src/Payments/Methods/KlarnaOne.php diff --git a/src/Payments/Methods/KlarnaOne.php b/src/Payments/Methods/KlarnaOne.php new file mode 100644 index 0000000..6d07a9f --- /dev/null +++ b/src/Payments/Methods/KlarnaOne.php @@ -0,0 +1,18 @@ + {% if methodForm.vars.value.methodId == mealvouchersId or + methodForm.vars.value.methodId == klarnaOne or methodForm.vars.value.methodId == klarnaPayLater or methodForm.vars.value.methodId == klarnaSliceIt or methodForm.vars.value.methodId == billie or From 885c658cdbdb3d36bd7dfef8b0bd2563a898c74a Mon Sep 17 00:00:00 2001 From: Micha de Boks Date: Mon, 20 Nov 2023 15:47:42 +0100 Subject: [PATCH 2/3] Fix for no selection payment method --- src/Action/ConvertMolliePaymentAction.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Action/ConvertMolliePaymentAction.php b/src/Action/ConvertMolliePaymentAction.php index 05740a2..c56983e 100644 --- a/src/Action/ConvertMolliePaymentAction.php +++ b/src/Action/ConvertMolliePaymentAction.php @@ -108,7 +108,10 @@ public function execute($request): void } else { $paymentMethod = $paymentOptions['molliePaymentMethods'] ?? null; $cartToken = $paymentOptions['cartToken']; - $selectedIssuer = PaymentMethod::IDEAL === $paymentMethod ? $paymentOptions['issuers']['id'] : null; + $selectedIssuer = null; + if (PaymentMethod::IDEAL === $paymentMethod && null !== $paymentOptions['issuers']) { + $selectedIssuer = $paymentOptions['issuers']['id']; + } } /** @var MollieGatewayConfigInterface $method */ From 6dbd9e8dabb4c222a01a3da6eaa7b381e2809067 Mon Sep 17 00:00:00 2001 From: Robert-Jan Bijl Date: Tue, 28 Nov 2023 13:24:04 +0100 Subject: [PATCH 3/3] Don't put the migrations path on the top of the config, so it won't overwrite the applications default path --- src/DependencyInjection/SyliusMollieExtension.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/DependencyInjection/SyliusMollieExtension.php b/src/DependencyInjection/SyliusMollieExtension.php index cbbcb34..1938b7c 100644 --- a/src/DependencyInjection/SyliusMollieExtension.php +++ b/src/DependencyInjection/SyliusMollieExtension.php @@ -29,10 +29,11 @@ public function prepend(ContainerBuilder $container): void return; } + $doctrineConfig = $container->getExtensionConfig('doctrine_migrations'); $container->prependExtensionConfig('doctrine_migrations', [ - 'migrations_paths' => [ + 'migrations_paths' => \array_merge(\array_pop($doctrineConfig)['migrations_paths'] ?? [], [ 'SyliusMolliePlugin\Migrations' => __DIR__ . '/../Migrations', - ], + ]), ]); $container->prependExtensionConfig('sylius_labs_doctrine_migrations_extra', [