From f5993fc6dc04966c88beaa643e75fe3e298460b4 Mon Sep 17 00:00:00 2001 From: Michiel Gerritsen Date: Mon, 25 Mar 2024 16:21:49 +0100 Subject: [PATCH 1/9] Bugfix: Prevent the store credit to be restored twice after cancelation #761 --- .../Observer/PreventDoubleCreditRevert.php | 37 +++++++++++++++++++ etc/di.xml | 4 ++ 2 files changed, 41 insertions(+) create mode 100644 Plugin/CustomerBalance/Observer/PreventDoubleCreditRevert.php diff --git a/Plugin/CustomerBalance/Observer/PreventDoubleCreditRevert.php b/Plugin/CustomerBalance/Observer/PreventDoubleCreditRevert.php new file mode 100644 index 00000000000..cf0bb87cc58 --- /dev/null +++ b/Plugin/CustomerBalance/Observer/PreventDoubleCreditRevert.php @@ -0,0 +1,37 @@ +getData('order'); + if (!$order || + !$order instanceof OrderInterface || + !$order->getPayment() + ) { + return $proceed($observer); + } + + if ($observer->getEvent()->getName() == 'restore_quote' && + $this->isMollieOrder($order) + ) { + return $subject; + } + + return $proceed($observer); + } + + private function isMollieOrder(OrderInterface $order): bool + { + $payment = $order->getPayment(); + + return strstr($payment->getMethod(), 'mollie_methods_') !== false; + } +} diff --git a/etc/di.xml b/etc/di.xml index 312a24c85ca..28fa8556545 100644 --- a/etc/di.xml +++ b/etc/di.xml @@ -365,6 +365,10 @@ + + + + From a3312bfd0d7f632d7dab3191ff0bbf250428f1d2 Mon Sep 17 00:00:00 2001 From: Michiel Gerritsen Date: Tue, 2 Apr 2024 12:13:25 +0200 Subject: [PATCH 2/9] Bugfix: Mark subscription items as onetime purchase #764 --- .../SetPurchaseTypeOnCreateOrderItem.php | 64 +++++++++++++++++++ etc/events.xml | 3 + 2 files changed, 67 insertions(+) create mode 100644 Observer/AdminhtmlSalesOrderCreateProcessItemBefore/SetPurchaseTypeOnCreateOrderItem.php diff --git a/Observer/AdminhtmlSalesOrderCreateProcessItemBefore/SetPurchaseTypeOnCreateOrderItem.php b/Observer/AdminhtmlSalesOrderCreateProcessItemBefore/SetPurchaseTypeOnCreateOrderItem.php new file mode 100644 index 00000000000..be98719053b --- /dev/null +++ b/Observer/AdminhtmlSalesOrderCreateProcessItemBefore/SetPurchaseTypeOnCreateOrderItem.php @@ -0,0 +1,64 @@ +productRepository = $productRepository; + } + + public function execute(Observer $observer) + { + /** @var RequestInterface $request */ + $request = $observer->getData('request_model'); + + if ($request->has('item') && !$request->getPost('update_items') + ) { + $itemsChanged = false; + $items = $request->getPost('item'); + foreach ($items as $item => $requestData) { + if (!$this->productAllowsOneTimePurchase($item)) { + continue; + } + + $itemsChanged = true; + $items[$item]['purchase'] = 'onetime'; + } + + if ($itemsChanged) { + $request->setPostValue('item', $items); + } + } + } + + private function productAllowsOneTimePurchase(int $productId): bool + { + try { + $product = $this->productRepository->getById($productId); + } catch (NoSuchEntityException $e) { + return false; + } + + return !!$product->getData('mollie_subscription_product'); + } +} diff --git a/etc/events.xml b/etc/events.xml index 1b45d8f4f24..6c9df6b8668 100644 --- a/etc/events.xml +++ b/etc/events.xml @@ -66,4 +66,7 @@ + + + From 87209cf5fe7613b4c143d7a5098e90c92df6fdbb Mon Sep 17 00:00:00 2001 From: Michiel Gerritsen Date: Mon, 8 Apr 2024 10:11:43 +0200 Subject: [PATCH 3/9] Bugfix: Add support for Reward Points --- .../Lines/Generator/MagentoRewardPoints.php | 55 +++++++++++++++++++ Service/Order/Lines/OrderLinesProcessor.php | 10 +--- etc/di.xml | 1 + 3 files changed, 58 insertions(+), 8 deletions(-) create mode 100644 Service/Order/Lines/Generator/MagentoRewardPoints.php diff --git a/Service/Order/Lines/Generator/MagentoRewardPoints.php b/Service/Order/Lines/Generator/MagentoRewardPoints.php new file mode 100644 index 00000000000..66513849a96 --- /dev/null +++ b/Service/Order/Lines/Generator/MagentoRewardPoints.php @@ -0,0 +1,55 @@ +mollieHelper = $mollieHelper; + } + + public function process(OrderInterface $order, array $orderLines): array + { + $extensionAttributes = $order->getExtensionAttributes(); + + if (!method_exists($extensionAttributes, 'getRewardCurrencyAmount')) { + return $orderLines; + } + + $amount = $extensionAttributes->getRewardCurrencyAmount(); + if ($amount === null) { + return $orderLines; + } + + $forceBaseCurrency = (bool)$this->mollieHelper->useBaseCurrency($order->getStoreId()); + if ($forceBaseCurrency) { + $amount = $extensionAttributes->getBaseRewardCurrencyAmount(); + } + + $currency = $forceBaseCurrency ? $order->getBaseCurrencyCode() : $order->getOrderCurrencyCode(); + + $orderLines[] = [ + 'type' => 'surcharge', + 'name' => 'Reward Points', + 'quantity' => 1, + 'unitPrice' => $this->mollieHelper->getAmountArray($currency, -$amount), + 'totalAmount' => $this->mollieHelper->getAmountArray($currency, -$amount), + 'vatRate' => 0, + 'vatAmount' => $this->mollieHelper->getAmountArray($currency, 0.0), + ]; + + return $orderLines; + } +} diff --git a/Service/Order/Lines/OrderLinesProcessor.php b/Service/Order/Lines/OrderLinesProcessor.php index 5f760c3dacd..746585e108c 100644 --- a/Service/Order/Lines/OrderLinesProcessor.php +++ b/Service/Order/Lines/OrderLinesProcessor.php @@ -23,13 +23,7 @@ public function __construct( $this->processors = $processors; } - /** - * @param array $orderLine - * @param OrderInterface $order - * @param OrderItemInterface|null $orderItem - * @return array - */ - public function process(array $orderLine, OrderInterface $order, OrderItemInterface $orderItem = null) + public function process(array $orderLine, OrderInterface $order, OrderItemInterface $orderItem = null): array { foreach ($this->processors as $processor) { $orderLine = $processor->process($orderLine, $order, $orderItem); @@ -37,4 +31,4 @@ public function process(array $orderLine, OrderInterface $order, OrderItemInterf return $orderLine; } -} \ No newline at end of file +} diff --git a/etc/di.xml b/etc/di.xml index 312a24c85ca..41a65097f3f 100644 --- a/etc/di.xml +++ b/etc/di.xml @@ -161,6 +161,7 @@ Mollie\Payment\Service\Order\Lines\Generator\MagentoGiftWrapping Mollie\Payment\Service\Order\Lines\Generator\GeisswebEuvat Mollie\Payment\Service\Order\Lines\Generator\ShippingDiscount + Mollie\Payment\Service\Order\Lines\Generator\MagentoRewardPoints From a7984dd81edac133fcb69fff120d4fda74eff6c9 Mon Sep 17 00:00:00 2001 From: Michiel Gerritsen Date: Mon, 8 Apr 2024 12:19:05 +0200 Subject: [PATCH 4/9] Improvement: Better Apple Pay comment --- etc/adminhtml/methods/applepay.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/adminhtml/methods/applepay.xml b/etc/adminhtml/methods/applepay.xml index e9589d4e6b5..0fefe3579f8 100644 --- a/etc/adminhtml/methods/applepay.xml +++ b/etc/adminhtml/methods/applepay.xml @@ -48,7 +48,7 @@ payment/mollie_methods_applepay/integration_type
External: The user is redirected to a Mollie page. No extra configuration required.
- Direct: The user can use Apple Pay in your checkout. You need to upload a certificate to your server for this to work. View instructions. + Direct: The user can use Apple Pay directly from your checkout, product page, minicart and shopping cart page. ]]>
Mollie\Payment\Model\Adminhtml\Source\ApplePayIntegrationType From 1ce45974f520eaa6ae789268cec2c75989326837 Mon Sep 17 00:00:00 2001 From: Michiel Gerritsen Date: Mon, 8 Apr 2024 13:46:56 +0200 Subject: [PATCH 5/9] Bugfix: Allow method to be null --- Service/Mollie/GetMollieStatus.php | 11 +++++++++-- Service/Mollie/GetMollieStatusResult.php | 6 +++--- Service/Mollie/ProcessTransaction.php | 2 +- Test/Fakes/Service/Mollie/GetMollieStatusFake.php | 4 ++-- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Service/Mollie/GetMollieStatus.php b/Service/Mollie/GetMollieStatus.php index 0692d7a6d46..39371618e31 100644 --- a/Service/Mollie/GetMollieStatus.php +++ b/Service/Mollie/GetMollieStatus.php @@ -35,10 +35,17 @@ public function __construct( $this->getMollieStatusResultFactory = $getMollieStatusResultFactory; } - public function execute(int $orderId): GetMollieStatusResult + public function execute(int $orderId, string $transactionId = null): GetMollieStatusResult { $order = $this->orderRepository->get($orderId); - $transactionId = $order->getMollieTransactionId(); + if ($transactionId === null) { + $transactionId = $order->getMollieTransactionId(); + } + + if ($transactionId === null) { + throw new \Exception('No transaction ID found for order ' . $orderId); + } + $mollieApi = $this->mollieApiClient->loadByStore((int)$order->getStoreId()); if (substr($transactionId, 0, 4) == 'ord_') { diff --git a/Service/Mollie/GetMollieStatusResult.php b/Service/Mollie/GetMollieStatusResult.php index 333cb87fb67..c2031505b47 100644 --- a/Service/Mollie/GetMollieStatusResult.php +++ b/Service/Mollie/GetMollieStatusResult.php @@ -15,13 +15,13 @@ class GetMollieStatusResult */ private $status; /** - * @var string + * @var string|null */ private $method; public function __construct( string $status, - string $method + string $method = null ) { $method = str_replace('mollie_methods_', '', $method); @@ -34,7 +34,7 @@ public function getStatus(): string return $this->status; } - public function getMethod(): string + public function getMethod(): ?string { return $this->method; } diff --git a/Service/Mollie/ProcessTransaction.php b/Service/Mollie/ProcessTransaction.php index 8f0f570f395..af33f5aefd6 100644 --- a/Service/Mollie/ProcessTransaction.php +++ b/Service/Mollie/ProcessTransaction.php @@ -68,7 +68,7 @@ public function execute(int $orderId, string $transactionId, string $type = 'web { if ($this->config->processTransactionsInTheQueue()) { $this->queueOrder($orderId, $transactionId, $type); - return $this->getMollieStatus->execute($orderId); + return $this->getMollieStatus->execute($orderId, $transactionId); } $order = $this->orderRepository->get($orderId); diff --git a/Test/Fakes/Service/Mollie/GetMollieStatusFake.php b/Test/Fakes/Service/Mollie/GetMollieStatusFake.php index f891aeba2f8..cb19a153891 100644 --- a/Test/Fakes/Service/Mollie/GetMollieStatusFake.php +++ b/Test/Fakes/Service/Mollie/GetMollieStatusFake.php @@ -23,12 +23,12 @@ public function setResponse(GetMollieStatusResult $response): void $this->response = $response; } - public function execute(int $orderId): GetMollieStatusResult + public function execute(int $orderId, string $transactionId = null): GetMollieStatusResult { if ($this->response) { return $this->response; } - return parent::execute($orderId); + return parent::execute($orderId, $transactionId); } } From d903667f45fb3e633bb76badf39c782050a65098 Mon Sep 17 00:00:00 2001 From: Michiel Gerritsen Date: Thu, 11 Apr 2024 09:55:15 +0200 Subject: [PATCH 6/9] Feature: New payment method Alma --- .../templates/magento/configure-mollie.sh | 1 + Helper/General.php | 5 +- Model/Methods/Alma.php | 24 +++ Model/MollieConfigProvider.php | 5 +- README.md | 1 + Service/Mollie/PaymentMethods.php | 3 +- .../cypress/e2e/magento/checkout.cy.js | 6 + .../cypress/e2e/magento/methods/alma.cy.js | 60 ++++++++ .../methods/creditcard-with-components.cy.js | 7 +- .../Etc/Config/MethodsConfigurationTest.php | 1 + Test/Integration/Helper/GeneralTest.php | 5 + Test/Integration/Model/Methods/AlmaTest.php | 16 ++ .../Model/MollieConfigProviderTest.php | 5 + .../Service/Config/PaymentFeeTest.php | 3 +- composer.json | 1 + etc/adminhtml/methods.xml | 9 +- etc/adminhtml/methods/alma.xml | 144 ++++++++++++++++++ etc/config.xml | 19 +++ etc/di.xml | 135 ++++++++++++++++ etc/graphql/di.xml | 6 + etc/payment.xml | 8 + i18n/de_DE.csv | 1 + i18n/en_US.csv | 1 + i18n/es_ES.csv | 1 + i18n/fr_FR.csv | 1 + i18n/nl_NL.csv | 1 + .../templates/form/mollie_paymentlink.phtml | 5 +- view/adminhtml/web/images/alma.svg | 11 ++ view/frontend/layout/checkout_index_index.xml | 8 + view/frontend/web/images/methods/alma.svg | 11 ++ .../web/js/view/payment/method-renderer.js | 6 + 31 files changed, 496 insertions(+), 14 deletions(-) create mode 100644 Model/Methods/Alma.php create mode 100644 Test/End-2-end/cypress/e2e/magento/methods/alma.cy.js create mode 100644 Test/Integration/Model/Methods/AlmaTest.php create mode 100644 etc/adminhtml/methods/alma.xml create mode 100644 view/adminhtml/web/images/alma.svg create mode 100644 view/frontend/web/images/methods/alma.svg diff --git a/.github/workflows/templates/magento/configure-mollie.sh b/.github/workflows/templates/magento/configure-mollie.sh index 074ee7979cf..3cab4876433 100644 --- a/.github/workflows/templates/magento/configure-mollie.sh +++ b/.github/workflows/templates/magento/configure-mollie.sh @@ -21,6 +21,7 @@ bin/magento config:set payment/mollie_methods_kbc/active 1 & bin/magento config:set payment/mollie_methods_klarnasliceit/active 1 & bin/magento config:set payment/mollie_methods_paypal/active 1 & bin/magento config:set payment/mollie_methods_przelewy24/active 1 & +bin/magento config:set payment/mollie_methods_alma/active 1 & bin/magento config:set payment/mollie_methods_bancontact/active 1 & bin/magento config:set payment/mollie_methods_belfius/active 1 & bin/magento config:set payment/mollie_methods_eps/active 1 & diff --git a/Helper/General.php b/Helper/General.php index 8be96d965d7..242f055885d 100755 --- a/Helper/General.php +++ b/Helper/General.php @@ -1,6 +1,6 @@ { const availableMethods = Cypress.env('mollie_available_methods'); [ + 'alma', 'bancontact', 'banktransfer', 'belfius', diff --git a/Test/End-2-end/cypress/e2e/magento/methods/alma.cy.js b/Test/End-2-end/cypress/e2e/magento/methods/alma.cy.js new file mode 100644 index 00000000000..799aafada83 --- /dev/null +++ b/Test/End-2-end/cypress/e2e/magento/methods/alma.cy.js @@ -0,0 +1,60 @@ +/* + * Copyright Magmodules.eu. All rights reserved. + * See COPYING.txt for license details. + */ + +import CheckoutPaymentPage from "Pages/frontend/CheckoutPaymentPage"; +import VisitCheckoutPaymentCompositeAction from "CompositeActions/VisitCheckoutPaymentCompositeAction"; +import MollieHostedPaymentPage from "Pages/mollie/MollieHostedPaymentPage"; +import CheckoutSuccessPage from "Pages/frontend/CheckoutSuccessPage"; +import OrdersPage from "Pages/backend/OrdersPage"; +import CartPage from "Pages/frontend/CartPage"; + +const checkoutPaymentPage = new CheckoutPaymentPage(); +const visitCheckoutPayment = new VisitCheckoutPaymentCompositeAction(); +const mollieHostedPaymentPage = new MollieHostedPaymentPage(); +const checkoutSuccessPage = new CheckoutSuccessPage(); +const ordersPage = new OrdersPage(); +const cartPage = new CartPage(); + +if (Cypress.env('mollie_available_methods').includes('alma')) { + describe('Check that Alma behaves as expected', () => { + [ + {status: 'paid', orderStatus: 'Processing', title: 'C2938625: Validate the submission of an order with Alma as payment method and payment mark as "Paid"'}, + {status: 'failed', orderStatus: 'Canceled', title: 'C2938626: Validate the submission of an order with Alma as payment method and payment mark as "Failed"'}, + {status: 'expired', orderStatus: 'Canceled', title: 'C2938627: Validate the submission of an order with Alma as payment method and payment mark as "Expired"'}, + {status: 'canceled', orderStatus: 'Canceled', title: 'C2938628: Validate the submission of an order with Alma as payment method and payment mark as "Cancelled"'}, + ].forEach((testCase) => { + it(testCase.title, () => { + visitCheckoutPayment.visit(); + + cy.intercept('mollie/checkout/redirect/paymentToken/*').as('mollieRedirect'); + + checkoutPaymentPage.selectPaymentMethod('ALMA'); + checkoutPaymentPage.placeOrder(); + + mollieHostedPaymentPage.selectStatus(testCase.status); + + if (testCase.status === 'paid') { + checkoutSuccessPage.assertThatOrderSuccessPageIsShown(); + } + + if (testCase.status === 'canceled') { + cartPage.assertCartPageIsShown(); + } + + cy.backendLogin(); + + cy.get('@order-id').then((orderId) => { + ordersPage.openOrderById(orderId); + }); + + if (testCase.status === 'expired') { + ordersPage.callFetchStatus(); + } + + ordersPage.assertOrderStatusIs(testCase.orderStatus); + }); + }); + }) +} diff --git a/Test/End-2-end/cypress/e2e/magento/methods/creditcard-with-components.cy.js b/Test/End-2-end/cypress/e2e/magento/methods/creditcard-with-components.cy.js index 755fdfa6b34..8b31c9cae00 100644 --- a/Test/End-2-end/cypress/e2e/magento/methods/creditcard-with-components.cy.js +++ b/Test/End-2-end/cypress/e2e/magento/methods/creditcard-with-components.cy.js @@ -1,3 +1,8 @@ +/* + * Copyright Magmodules.eu. All rights reserved. + * See COPYING.txt for license details. + */ + import CheckoutPaymentPage from "Pages/frontend/CheckoutPaymentPage"; import VisitCheckoutPaymentCompositeAction from "CompositeActions/VisitCheckoutPaymentCompositeAction"; import MollieHostedPaymentPage from "Pages/mollie/MollieHostedPaymentPage"; @@ -12,7 +17,7 @@ const mollieHostedPaymentPage = new MollieHostedPaymentPage(); const checkoutSuccessPage = new CheckoutSuccessPage(); const ordersPage = new OrdersPage(); -if (Cypress.env('mollie_available_methods').includes('bancontact')) { +if (Cypress.env('mollie_available_methods').includes('creditcard')) { describe('Check that creditcards with components behaves as expected', () => { it('C3037: Validate the submission of an order with Credit Card as payment method using Mollie Components and payment mark as "Paid"', () => { visitCheckoutPayment.visit(); diff --git a/Test/Integration/Etc/Config/MethodsConfigurationTest.php b/Test/Integration/Etc/Config/MethodsConfigurationTest.php index 48417145f59..b5dd4a45797 100644 --- a/Test/Integration/Etc/Config/MethodsConfigurationTest.php +++ b/Test/Integration/Etc/Config/MethodsConfigurationTest.php @@ -15,6 +15,7 @@ public function methods(): array { return [ ['mollie_methods_applepay'], + ['mollie_methods_alma'], ['mollie_methods_bancontact'], ['mollie_methods_banktransfer'], ['mollie_methods_belfius'], diff --git a/Test/Integration/Helper/GeneralTest.php b/Test/Integration/Helper/GeneralTest.php index 3b2b99d9e5d..2361be46d23 100644 --- a/Test/Integration/Helper/GeneralTest.php +++ b/Test/Integration/Helper/GeneralTest.php @@ -1,4 +1,8 @@ ['free', ''], 'applepay' => ['mollie_methods_applepay', 'applepay'], + 'alma' => ['mollie_methods_alma', 'alma'], 'bancontact' => ['mollie_methods_bancontact', 'bancontact'], 'banktransfer' => ['mollie_methods_banktransfer', 'banktransfer'], 'belfius' => ['mollie_methods_belfius', 'belfius'], diff --git a/Test/Integration/Model/Methods/AlmaTest.php b/Test/Integration/Model/Methods/AlmaTest.php new file mode 100644 index 00000000000..c1a8cfa12fc --- /dev/null +++ b/Test/Integration/Model/Methods/AlmaTest.php @@ -0,0 +1,16 @@ +assertArrayHasKey('mollie_methods_giftcard', $result['payment']['issuersListType']); $this->assertArrayHasKey('mollie_methods_applepay', $result['payment']['image']); + $this->assertArrayHasKey('mollie_methods_alma', $result['payment']['image']); $this->assertArrayHasKey('mollie_methods_bancontact', $result['payment']['image']); $this->assertArrayHasKey('mollie_methods_banktransfer', $result['payment']['image']); $this->assertArrayHasKey('mollie_methods_belfius', $result['payment']['image']); diff --git a/Test/Integration/Service/Config/PaymentFeeTest.php b/Test/Integration/Service/Config/PaymentFeeTest.php index e6407b4ef7b..13388b2c0e3 100644 --- a/Test/Integration/Service/Config/PaymentFeeTest.php +++ b/Test/Integration/Service/Config/PaymentFeeTest.php @@ -1,5 +1,5 @@ + ~ Copyright Magmodules.eu. All rights reserved. + ~ See COPYING.txt for license details. + --> + diff --git a/etc/adminhtml/methods/alma.xml b/etc/adminhtml/methods/alma.xml new file mode 100644 index 00000000000..b16c5b77143 --- /dev/null +++ b/etc/adminhtml/methods/alma.xml @@ -0,0 +1,144 @@ + + + + + + + + + Magento\Config\Model\Config\Source\Yesno + payment/mollie_methods_alma/active + + + + payment/mollie_methods_alma/title + + 1 + + + + + payment/mollie_methods_alma/payment_description + + + payment + 1 + + + + + validate-digits-range digits-range-1-365 + payment/mollie_methods_alma/days_before_expire + + 1 + order + + How many days before orders for this method becomes expired? Leave empty to use default expiration (28 days) + + + + Magento\Payment\Model\Config\Source\Allspecificcountries + payment/mollie_methods_alma/allowspecific + + 1 + + + + + Magento\Directory\Model\Config\Source\Country + 1 + payment/mollie_methods_alma/specificcountry + + 1 + + + + + payment/mollie_methods_alma/min_order_total + + 1 + + + + + payment/mollie_methods_alma/max_order_total + + 1 + + + + + payment/mollie_methods_alma/payment_surcharge_type + Mollie\Payment\Model\Adminhtml\Source\PaymentFeeType + + 1 + + + + + payment/mollie_methods_alma/payment_surcharge_fixed_amount + Mollie\Payment\Model\Adminhtml\Backend\VerifiyPaymentFee + validate-not-negative-number + + 1 + fixed_fee,fixed_fee_and_percentage + + + + + payment/mollie_methods_alma/payment_surcharge_percentage + Mollie\Payment\Model\Adminhtml\Backend\VerifiyPaymentFee + validate-number-range number-range-0-10 + + 1 + percentage,fixed_fee_and_percentage + + + + + payment/mollie_methods_alma/payment_surcharge_limit + + Mollie\Payment\Model\Adminhtml\Backend\VerifiyPaymentFee + validate-not-negative-number + + 1 + percentage,fixed_fee_and_percentage + + + + + payment/mollie_methods_alma/payment_surcharge_tax_class + \Magento\Tax\Model\TaxClass\Source\Product + + 1 + fixed_fee,percentage,fixed_fee_and_percentage + + + + + validate-number + payment/mollie_methods_alma/sort_order + + 1 + + + + diff --git a/etc/config.xml b/etc/config.xml index 9473b6fa3fc..61b67a51602 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -71,6 +71,25 @@ 0 1 + + 1 + Mollie\Payment\Model\Methods\Alma + ALMA + {ordernumber} + payment + order + 0 + + 1 + 1 + 1 + 1 + 0 + 1 + 0 + 0 + 1 + 1 Mollie\Payment\Model\Methods\Bancontact diff --git a/etc/di.xml b/etc/di.xml index 4d3d9700cfa..e6bff4d3b5f 100644 --- a/etc/di.xml +++ b/etc/di.xml @@ -412,6 +412,141 @@ + + + + Magento\Payment\Block\Form + Mollie\Payment\Block\Info\Base + MollieAlmaValueHandlerPool + MollieCommandPool + MollieAlmaValidatorPool + + + + + + + MollieAlmaConfigValueHandler + + + + + + + MollieAlmaConfig + + + + + + Mollie\Payment\Model\Methods\Alma::CODE + + + + + + + MollieAlmaCountryValidator + + + + + + + MollieAlmaConfig + + + + + + + Magento\Payment\Block\Form + Mollie\Payment\Block\Info\Base + MollieBancontactValueHandlerPool + MollieCommandPool + MollieBancontactValidatorPool + + + + + + + MollieBancontactConfigValueHandler + + + + + + + MollieBancontactConfig + + + + + + Mollie\Payment\Model\Methods\Bancontact::CODE + + + + + + + MollieBancontactCountryValidator + + + + + + + MollieBancontactConfig + + + + + + + Magento\Payment\Block\Form + Mollie\Payment\Block\Info\Base + MollieBanktransferValueHandlerPool + MollieCommandPool + MollieBanktransferValidatorPool + + + + + + + MollieBanktransferConfigValueHandler + + + + + + + MollieBanktransferConfig + + + + + + Mollie\Payment\Model\Methods\Banktransfer::CODE + + + + + + + MollieBanktransferCountryValidator + + + + + + + MollieBanktransferConfig + + + diff --git a/etc/graphql/di.xml b/etc/graphql/di.xml index 59ef874468c..5017366df3e 100644 --- a/etc/graphql/di.xml +++ b/etc/graphql/di.xml @@ -1,9 +1,15 @@ + + Mollie\Payment\GraphQL\DataProvider + Mollie\Payment\GraphQL\DataProvider Mollie\Payment\GraphQL\DataProvider Mollie\Payment\GraphQL\DataProvider Mollie\Payment\GraphQL\DataProvider diff --git a/etc/payment.xml b/etc/payment.xml index f8dc5d320f8..16c2a8ede56 100644 --- a/etc/payment.xml +++ b/etc/payment.xml @@ -1,9 +1,17 @@ + + 0 + + 0 + 0 diff --git a/i18n/de_DE.csv b/i18n/de_DE.csv index 4659350dcea..55074350eb4 100644 --- a/i18n/de_DE.csv +++ b/i18n/de_DE.csv @@ -192,6 +192,7 @@ "Payment Surcharge limit","Maximaler Zahlungszuschlag" "Payment Surcharge Tax Class","Steuerklassifikation für Zahlungszuschlag" "Sorting Order","Sortierreihenfolge" +"Alma","Alma" "Bancontact","Bancontact" "Banktransfer","Banküberweisung" "Status Pending","Status ausstehend" diff --git a/i18n/en_US.csv b/i18n/en_US.csv index 3da26903d4d..b09a1b55a5c 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -192,6 +192,7 @@ "Payment Surcharge limit","Payment Surcharge limit" "Payment Surcharge Tax Class","Payment Surcharge Tax Class" "Sorting Order","Sorting Order" +"Alma","Alma" "Bancontact","Bancontact" "Banktransfer","Banktransfer" "Status Pending","Status Pending" diff --git a/i18n/es_ES.csv b/i18n/es_ES.csv index f6e00ae3a0a..b8a8db57c49 100644 --- a/i18n/es_ES.csv +++ b/i18n/es_ES.csv @@ -192,6 +192,7 @@ "Payment Surcharge limit","Recargo de pago límite" "Payment Surcharge Tax Class","Recargo de pago clase impositiva" "Sorting Order","Orden de clasificación" +"Alma","Alma" "Bancontact","Contacto bancario" "Banktransfer","Transferencia bancaria" "Status Pending","Estado pendiente" diff --git a/i18n/fr_FR.csv b/i18n/fr_FR.csv index 494000d05f3..4128f6df607 100644 --- a/i18n/fr_FR.csv +++ b/i18n/fr_FR.csv @@ -192,6 +192,7 @@ "Payment Surcharge limit","Limite de majoration de paiement" "Payment Surcharge Tax Class","Classe fiscale pour majoration de paiement" "Sorting Order","Tri des commandes" +"Alma","Alma" "Bancontact","Bancontact" "Banktransfer","Virement bancaire" "Status Pending","Statut en attente" diff --git a/i18n/nl_NL.csv b/i18n/nl_NL.csv index 55b1f8368c4..ce54e3eba97 100644 --- a/i18n/nl_NL.csv +++ b/i18n/nl_NL.csv @@ -192,6 +192,7 @@ "Payment Surcharge limit","Betalingstoeslag limiet" "Payment Surcharge Tax Class","Betalingstoeslag belastingklasse" "Sorting Order","Sorteervolgorde" +"Alma","Alma" "Bancontact","Bancontact" "Banktransfer","Bankoverschrijving" "Status Pending","Status openstaand" diff --git a/view/adminhtml/templates/form/mollie_paymentlink.phtml b/view/adminhtml/templates/form/mollie_paymentlink.phtml index ffe61817f6b..ba4307efcd2 100644 --- a/view/adminhtml/templates/form/mollie_paymentlink.phtml +++ b/view/adminhtml/templates/form/mollie_paymentlink.phtml @@ -1,6 +1,6 @@ " style="display:none">