From 8fcb2d31625b5696a4f70230164c6f763a2cc243 Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Fri, 9 Feb 2024 10:01:31 +0100 Subject: [PATCH 1/5] NTR: PIHPS-205 - add new payment method blik --- ...olliePaymentMethodAvailabilityRemover.php} | 17 ++++- src/Handler/Method/BlikPayment.php | 32 +++++++++ src/Resources/config/config.xml | 10 +-- src/Resources/config/services/handlers.xml | 8 +++ src/Resources/config/services/payment.xml | 3 +- .../Provider/ActivePaymentMethodsProvider.php | 9 ++- .../ActivePaymentMethodsProviderInterface.php | 7 +- src/Service/PaymentMethodService.php | 2 + .../e2e/storefront/payment-methods/blik.cy.js | 43 ++++++++++++ .../Builder/Payments/BlikOrderBuilderTest.php | 68 +++++++++++++++++++ .../Payments/TwintOrderBuilderTest.php | 7 +- .../Service/PaymentMethodServiceTest.php | 2 + 12 files changed, 191 insertions(+), 17 deletions(-) rename src/Components/{MollieLimits/Service/MollieLimitsRemover.php => MollieAvailability/Service/MolliePaymentMethodAvailabilityRemover.php} (89%) create mode 100644 src/Handler/Method/BlikPayment.php create mode 100644 tests/Cypress/cypress/e2e/storefront/payment-methods/blik.cy.js create mode 100644 tests/PHPUnit/Service/MollieApi/Builder/Payments/BlikOrderBuilderTest.php diff --git a/src/Components/MollieLimits/Service/MollieLimitsRemover.php b/src/Components/MollieAvailability/Service/MolliePaymentMethodAvailabilityRemover.php similarity index 89% rename from src/Components/MollieLimits/Service/MollieLimitsRemover.php rename to src/Components/MollieAvailability/Service/MolliePaymentMethodAvailabilityRemover.php index 622dcc4e2..cfd700df2 100644 --- a/src/Components/MollieLimits/Service/MollieLimitsRemover.php +++ b/src/Components/MollieAvailability/Service/MolliePaymentMethodAvailabilityRemover.php @@ -1,6 +1,6 @@ getPrice()->getTotalPrice(); } + $countryIsoCode = null; if ($this->isOrderRoute()) { try { @@ -90,15 +91,27 @@ public function removePaymentMethods(PaymentMethodRouteResponse $originalData, S } $price = $order->getAmountTotal(); + + $billingAddress = $order->getBillingAddress(); + if ($billingAddress === null) { + return $originalData; + } + $billingCountry = $billingAddress->getCountry(); + if ($billingCountry === null) { + return $originalData; + } + $countryIsoCode = $billingCountry->getIso(); } if (!isset($price)) { return $originalData; } + $availableMolliePayments = $this->paymentMethodsProvider->getActivePaymentMethodsForAmount( $price, $context->getCurrency()->getIsoCode(), + (string) $countryIsoCode, [ $context->getSalesChannel()->getId(), ] diff --git a/src/Handler/Method/BlikPayment.php b/src/Handler/Method/BlikPayment.php new file mode 100644 index 000000000..f4914474d --- /dev/null +++ b/src/Handler/Method/BlikPayment.php @@ -0,0 +1,32 @@ + $orderData + * @param OrderEntity $orderEntity + * @param SalesChannelContext $salesChannelContext + * @param CustomerEntity $customer + * @return array + */ + public function processPaymentMethodSpecificParameters(array $orderData, OrderEntity $orderEntity, SalesChannelContext $salesChannelContext, CustomerEntity $customer): array + { + return $orderData; + } +} diff --git a/src/Resources/config/config.xml b/src/Resources/config/config.xml index d06a1063e..aafd5466a 100644 --- a/src/Resources/config/config.xml +++ b/src/Resources/config/config.xml @@ -165,11 +165,11 @@ useMolliePaymentMethodLimits false - - - - Automatically hides payment methods in the checkout based on the limits of Mollie. For instance, if you can only accept credit card payments up to 500 euros, the checkout for a cart of 600 euros will not display credit card as a payment method. - Blendet automatisch Zahlungsart im Checkout basierend auf den Limits von Mollie aus. Wenn Sie beispielsweise nur Kreditkartenzahlungen bis zu 500 Euro akzeptieren können, wird an der Kasse für einen Warenkorb von 600 Euro keine Kreditkarte als Zahlungsarte angezeigt. + + + + Automatically hides payment methods in the checkout based on the availability rules for payment methods. Only active payment methods from your mollie dashboard will be shown. If the payment method has a cart limit, currency restriction or billing address restriction, it will be hidden during checkout. + Blendet automatisch Zahlungsart im Checkout basierend auf Verfügbarkeitsregeln von Mollie. Es werden nur die aktiven Zahlungsarten aus dem Mollie Dashboard angezeigt. Wenn die Zahlungsart eine Einschränkung auf den Warenkorbwert, Währung oder Rechnungsadresse hat, wird diese auch ausgeblendet. Verbergt automatisch betaalmethoden in de checkout op basis van Mollie's limieten. Als je bijvoorbeeld alleen creditcardbetalingen tot 500 euro kan accepteren, wordt bij een winkelwagen van 600 euro geen creditcard weergegeven als betaalmethode bij het afrekenen. diff --git a/src/Resources/config/services/handlers.xml b/src/Resources/config/services/handlers.xml index 0cb06f79d..5ffa6d2d6 100644 --- a/src/Resources/config/services/handlers.xml +++ b/src/Resources/config/services/handlers.xml @@ -183,5 +183,13 @@ + + + + + + + + diff --git a/src/Resources/config/services/payment.xml b/src/Resources/config/services/payment.xml index bbdd973fe..7233d5e38 100644 --- a/src/Resources/config/services/payment.xml +++ b/src/Resources/config/services/payment.xml @@ -17,7 +17,8 @@ - + + diff --git a/src/Service/Payment/Provider/ActivePaymentMethodsProvider.php b/src/Service/Payment/Provider/ActivePaymentMethodsProvider.php index aacbf2358..86ed66877 100644 --- a/src/Service/Payment/Provider/ActivePaymentMethodsProvider.php +++ b/src/Service/Payment/Provider/ActivePaymentMethodsProvider.php @@ -48,10 +48,11 @@ public function __construct(MollieApiFactory $mollieApiFactory, MollieOrderPrice * * @param float $price * @param string $currency + * @param string $billingCountryCode * @param array $salesChannelIDs * @return Method[] */ - public function getActivePaymentMethodsForAmount(float $price, string $currency, array $salesChannelIDs): array + public function getActivePaymentMethodsForAmount(float $price, string $currency,string $billingCountryCode, array $salesChannelIDs): array { if ($price < 0.01) { return []; @@ -61,9 +62,13 @@ public function getActivePaymentMethodsForAmount(float $price, string $currency, 'amount' => [ 'value' => $this->priceFormatter->formatValue($price), 'currency' => strtoupper($currency), - ] + ], ]; + if (mb_strlen($billingCountryCode) > 0) { + $params['billingCountry'] = $billingCountryCode; + } + return $this->getActivePaymentMethods($params, $salesChannelIDs); } diff --git a/src/Service/Payment/Provider/ActivePaymentMethodsProviderInterface.php b/src/Service/Payment/Provider/ActivePaymentMethodsProviderInterface.php index b22230074..e688cab26 100644 --- a/src/Service/Payment/Provider/ActivePaymentMethodsProviderInterface.php +++ b/src/Service/Payment/Provider/ActivePaymentMethodsProviderInterface.php @@ -9,10 +9,11 @@ interface ActivePaymentMethodsProviderInterface { /** - * @param float $price - * @param string $currency + * @param float $price + * @param string $currency + * @param string $billingCountryCode * @param array $salesChannelIDs * @return array */ - public function getActivePaymentMethodsForAmount(float $price, string $currency, array $salesChannelIDs): array; + public function getActivePaymentMethodsForAmount(float $price, string $currency,string $billingCountryCode, array $salesChannelIDs): array; } diff --git a/src/Service/PaymentMethodService.php b/src/Service/PaymentMethodService.php index 8a746a0f0..5d9c1e85d 100644 --- a/src/Service/PaymentMethodService.php +++ b/src/Service/PaymentMethodService.php @@ -8,6 +8,7 @@ use Kiener\MolliePayments\Handler\Method\BankTransferPayment; use Kiener\MolliePayments\Handler\Method\BelfiusPayment; use Kiener\MolliePayments\Handler\Method\BilliePayment; +use Kiener\MolliePayments\Handler\Method\BlikPayment; use Kiener\MolliePayments\Handler\Method\CreditCardPayment; use Kiener\MolliePayments\Handler\Method\EpsPayment; use Kiener\MolliePayments\Handler\Method\GiftCardPayment; @@ -417,6 +418,7 @@ public function getPaymentHandlers(): array In3Payment::class, PosPayment::class, TwintPayment::class, + BlikPayment::class, // IngHomePayPayment::class, // not allowed anymore // DirectDebitPayment::class, // only allowed when updating subsriptions, aka => not allowed anymore ]; diff --git a/tests/Cypress/cypress/e2e/storefront/payment-methods/blik.cy.js b/tests/Cypress/cypress/e2e/storefront/payment-methods/blik.cy.js new file mode 100644 index 000000000..1d28a1a0b --- /dev/null +++ b/tests/Cypress/cypress/e2e/storefront/payment-methods/blik.cy.js @@ -0,0 +1,43 @@ +import Devices from "Services/utils/Devices"; +import Session from "Services/utils/Session" +// ------------------------------------------------------ +import PaymentAction from "Actions/storefront/checkout/PaymentAction"; +import DummyBasketScenario from "Scenarios/DummyBasketScenario"; +// ------------------------------------------------------ + + +const devices = new Devices(); +const session = new Session(); + +const paymentAction = new PaymentAction(); +const scenarioDummyBasket = new DummyBasketScenario(1); + +const device = devices.getFirstDevice(); + + +describe('Blik payment method', () => { + + context(devices.getDescription(device), () => { + + before(function () { + devices.setDevice(device); + }) + + beforeEach(() => { + session.resetBrowserSession(); + devices.setDevice(device); + }); + + it('Blik is existing in checkout', () => { + + scenarioDummyBasket.execute(); + + paymentAction.switchPaymentMethod('Blik'); + + // payment would only work using currency CHF which cannot be done at the moment + }) + + }) + +}) + diff --git a/tests/PHPUnit/Service/MollieApi/Builder/Payments/BlikOrderBuilderTest.php b/tests/PHPUnit/Service/MollieApi/Builder/Payments/BlikOrderBuilderTest.php new file mode 100644 index 000000000..6b03838bd --- /dev/null +++ b/tests/PHPUnit/Service/MollieApi/Builder/Payments/BlikOrderBuilderTest.php @@ -0,0 +1,68 @@ +router->method('generate')->willReturn($redirectWebhookUrl); + + + $this->paymentHandler = new BlikPayment( + $this->loggerService, + new FakeContainer() + ); + + $transactionId = Uuid::randomHex(); + $amountTotal = 27.0; + $taxStatus = CartPrice::TAX_STATE_GROSS; + $currencyISO = 'EUR'; + + $currency = new CurrencyEntity(); + $currency->setId(Uuid::randomHex()); + $currency->setIsoCode($currencyISO); + + $orderNumber = 'foo number'; + $lineItems = $this->getDummyLineItems(); + + $order = $this->getOrderEntity($amountTotal, $taxStatus, $currencyISO, $lineItems, $orderNumber); + + $actual = $this->builder->buildOrderPayload($order, $transactionId, $this->paymentHandler::PAYMENT_METHOD_NAME, $this->salesChannelContext, $this->paymentHandler, []); + + $expectedOrderLifeTime = (new DateTime())->setTimezone(new DateTimeZone('UTC')) + ->modify(sprintf('+%d day', $this->expiresAt)) + ->format('Y-m-d'); + + $expected = [ + 'amount' => (new MollieOrderPriceBuilder())->build($amountTotal, $currencyISO), + 'locale' => $this->localeCode, + 'method' => $this->paymentHandler::PAYMENT_METHOD_NAME, + 'orderNumber' => $orderNumber, + 'payment' => ['webhookUrl' => $redirectWebhookUrl], + 'redirectUrl' => $redirectWebhookUrl, + 'webhookUrl' => $redirectWebhookUrl, + 'lines' => $this->getExpectedLineItems($taxStatus, $lineItems, $currency), + 'billingAddress' => $this->getExpectedTestAddress($this->address, $this->email), + 'shippingAddress' => $this->getExpectedTestAddress($this->address, $this->email), + 'expiresAt' => $expectedOrderLifeTime + ]; + + self::assertSame($expected, $actual); + } +} diff --git a/tests/PHPUnit/Service/MollieApi/Builder/Payments/TwintOrderBuilderTest.php b/tests/PHPUnit/Service/MollieApi/Builder/Payments/TwintOrderBuilderTest.php index ed85d1c6a..96d713682 100644 --- a/tests/PHPUnit/Service/MollieApi/Builder/Payments/TwintOrderBuilderTest.php +++ b/tests/PHPUnit/Service/MollieApi/Builder/Payments/TwintOrderBuilderTest.php @@ -21,9 +21,8 @@ public function testOrderBuild(): void { $redirectWebhookUrl = 'https://foo'; $this->router->method('generate')->willReturn($redirectWebhookUrl); - $paymentMethod = TwintPayment::PAYMENT_METHOD_NAME; - $this->paymentHandler = new KlarnaPayLaterPayment( + $this->paymentHandler = new TwintPayment( $this->loggerService, new FakeContainer() ); @@ -42,7 +41,7 @@ public function testOrderBuild(): void $order = $this->getOrderEntity($amountTotal, $taxStatus, $currencyISO, $lineItems, $orderNumber); - $actual = $this->builder->buildOrderPayload($order, $transactionId, $paymentMethod, $this->salesChannelContext, $this->paymentHandler, []); + $actual = $this->builder->buildOrderPayload($order, $transactionId, $this->paymentHandler::PAYMENT_METHOD_NAME, $this->salesChannelContext, $this->paymentHandler, []); $expectedOrderLifeTime = (new DateTime())->setTimezone(new DateTimeZone('UTC')) ->modify(sprintf('+%d day', $this->expiresAt)) @@ -51,7 +50,7 @@ public function testOrderBuild(): void $expected = [ 'amount' => (new MollieOrderPriceBuilder())->build($amountTotal, $currencyISO), 'locale' => $this->localeCode, - 'method' => $paymentMethod, + 'method' => $this->paymentHandler::PAYMENT_METHOD_NAME, 'orderNumber' => $orderNumber, 'payment' => ['webhookUrl' => $redirectWebhookUrl], 'redirectUrl' => $redirectWebhookUrl, diff --git a/tests/PHPUnit/Service/PaymentMethodServiceTest.php b/tests/PHPUnit/Service/PaymentMethodServiceTest.php index 4dbd0061c..8c01d69a5 100644 --- a/tests/PHPUnit/Service/PaymentMethodServiceTest.php +++ b/tests/PHPUnit/Service/PaymentMethodServiceTest.php @@ -7,6 +7,7 @@ use Kiener\MolliePayments\Handler\Method\BankTransferPayment; use Kiener\MolliePayments\Handler\Method\BelfiusPayment; use Kiener\MolliePayments\Handler\Method\BilliePayment; +use Kiener\MolliePayments\Handler\Method\BlikPayment; use Kiener\MolliePayments\Handler\Method\CreditCardPayment; use Kiener\MolliePayments\Handler\Method\EpsPayment; use Kiener\MolliePayments\Handler\Method\GiftCardPayment; @@ -127,6 +128,7 @@ public function testSupportedMethods(): void In3Payment::class, PosPayment::class, TwintPayment::class, + BlikPayment::class, ]; $handlers = $this->paymentMethodService->getPaymentHandlers(); From 5ff9d2149561ef4160ddcd81a49b091176faa8d6 Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Fri, 9 Feb 2024 14:05:35 +0100 Subject: [PATCH 2/5] NTR: merge master commit 3a0f05dc025ae4733363b2548726b7290b159ed6 Author: Vitalij Mik Date: Fri Feb 9 12:28:17 2024 +0100 NTR: test SW 6.5.8.4 (#703) Co-authored-by: Vitalij Mik commit f8390b387f3ce8fb6a894d32470bb2a24414b3e4 Author: Vitalij Mik Date: Fri Feb 9 11:29:47 2024 +0100 NTR: new shopware version (#702) Co-authored-by: Vitalij Mik --- .github/actions/build-plugin/action.yml | 2 +- .github/workflows/ci_pipe.yml | 2 +- .github/workflows/nightly_pipe.yml | 2 +- .github/workflows/pr_pipe.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/build-plugin/action.yml b/.github/actions/build-plugin/action.yml index 516e4c0c2..8fa2f08be 100644 --- a/.github/actions/build-plugin/action.yml +++ b/.github/actions/build-plugin/action.yml @@ -8,7 +8,7 @@ runs: - name: Start Docker shell: bash run: | - docker run --rm --name shop --env NODE_VERSION=18 --env PHP_VERSION=8.1 -d dockware/dev:6.5.8.2 + docker run --rm --name shop --env NODE_VERSION=18 --env PHP_VERSION=8.1 -d dockware/dev:6.5.8.4 sleep 20 docker logs shop diff --git a/.github/workflows/ci_pipe.yml b/.github/workflows/ci_pipe.yml index 0e2f925d3..4e2a4f7a7 100644 --- a/.github/workflows/ci_pipe.yml +++ b/.github/workflows/ci_pipe.yml @@ -340,7 +340,7 @@ jobs: fail-fast: false matrix: include: - - shopware: '6.5.8.2' + - shopware: '6.5.8.4' php: '8.2' - shopware: '6.5.6.1' php: '8.2' diff --git a/.github/workflows/nightly_pipe.yml b/.github/workflows/nightly_pipe.yml index 819eab8c6..94052ec11 100644 --- a/.github/workflows/nightly_pipe.yml +++ b/.github/workflows/nightly_pipe.yml @@ -334,7 +334,7 @@ jobs: fail-fast: false matrix: include: - - shopware: '6.5.8.2' + - shopware: '6.5.8.4' php: '8.2' - shopware: '6.5.6.1' php: '8.2' diff --git a/.github/workflows/pr_pipe.yml b/.github/workflows/pr_pipe.yml index f2ac8b31f..c4910505e 100644 --- a/.github/workflows/pr_pipe.yml +++ b/.github/workflows/pr_pipe.yml @@ -333,7 +333,7 @@ jobs: fail-fast: false matrix: include: - - shopware: '6.5.8.2' + - shopware: '6.5.8.4' php: '8.2' - shopware: '6.5.5.2' php: '8.2' From 0fae6e1802280c0d99fcfd9a96d6ef0ac9e2180e Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Fri, 9 Feb 2024 14:10:34 +0100 Subject: [PATCH 3/5] NTR: set billing address from cart --- ...MolliePaymentMethodAvailabilityRemover.php | 24 ++++++++++++------- .../app/administration/src/snippet/de-DE.json | 2 +- .../app/administration/src/snippet/en-GB.json | 2 +- .../app/administration/src/snippet/nl-NL.json | 2 +- src/Resources/config/config.xml | 2 +- .../Provider/ActivePaymentMethodsProvider.php | 2 +- .../ActivePaymentMethodsProviderInterface.php | 2 +- 7 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/Components/MollieAvailability/Service/MolliePaymentMethodAvailabilityRemover.php b/src/Components/MollieAvailability/Service/MolliePaymentMethodAvailabilityRemover.php index cfd700df2..d7b92de59 100644 --- a/src/Components/MollieAvailability/Service/MolliePaymentMethodAvailabilityRemover.php +++ b/src/Components/MollieAvailability/Service/MolliePaymentMethodAvailabilityRemover.php @@ -65,6 +65,8 @@ public function removePaymentMethods(PaymentMethodRouteResponse $originalData, S if (!$this->isAllowedRoute()) { return $originalData; } + $billingAddress = null; + $countryIsoCode = null; if ($this->isCartRoute()) { try { @@ -77,8 +79,12 @@ public function removePaymentMethods(PaymentMethodRouteResponse $originalData, S } $price = $cart->getPrice()->getTotalPrice(); + $customer = $context->getCustomer(); + if ($customer !== null) { + $billingAddress = $customer->getDefaultBillingAddress(); + } } - $countryIsoCode = null; + if ($this->isOrderRoute()) { try { @@ -93,20 +99,20 @@ public function removePaymentMethods(PaymentMethodRouteResponse $originalData, S $price = $order->getAmountTotal(); $billingAddress = $order->getBillingAddress(); - if ($billingAddress === null) { - return $originalData; - } - $billingCountry = $billingAddress->getCountry(); - if ($billingCountry === null) { - return $originalData; - } - $countryIsoCode = $billingCountry->getIso(); } if (!isset($price)) { return $originalData; } + if ($billingAddress !== null) { + $billingCountry = $billingAddress->getCountry(); + if ($billingCountry !== null) { + $countryIsoCode = $billingCountry->getIso(); + } + } + + $availableMolliePayments = $this->paymentMethodsProvider->getActivePaymentMethodsForAmount( $price, diff --git a/src/Resources/app/administration/src/snippet/de-DE.json b/src/Resources/app/administration/src/snippet/de-DE.json index 76b59f784..e40cbc976 100644 --- a/src/Resources/app/administration/src/snippet/de-DE.json +++ b/src/Resources/app/administration/src/snippet/de-DE.json @@ -76,7 +76,7 @@ "failed": "Die Zahlungsarten konnten nicht aktualisiert werden." }, "mollieLimits": { - "link": "Öffne Mollie Zahlungs Limits" + "link": "Zeige Mollie Verfügbarkeitsregeln für Zahlungsarten" } }, "rounding": { diff --git a/src/Resources/app/administration/src/snippet/en-GB.json b/src/Resources/app/administration/src/snippet/en-GB.json index c8901c310..934b714d6 100644 --- a/src/Resources/app/administration/src/snippet/en-GB.json +++ b/src/Resources/app/administration/src/snippet/en-GB.json @@ -76,7 +76,7 @@ "failed": "The payment methods couldn't be updated." }, "mollieLimits": { - "link": "Open Mollie Payment Limits" + "link": "Show Mollie availability rules for payment methods" } }, "rounding": { diff --git a/src/Resources/app/administration/src/snippet/nl-NL.json b/src/Resources/app/administration/src/snippet/nl-NL.json index b3f8b10c0..a37ce42c5 100644 --- a/src/Resources/app/administration/src/snippet/nl-NL.json +++ b/src/Resources/app/administration/src/snippet/nl-NL.json @@ -76,7 +76,7 @@ "failed": "De betaalmethoden konden niet worden geupdated." }, "mollieLimits": { - "link": "Open betalingslimieten van Mollie" + "link": "Toon Mollie-beschikbaarheidsregels voor betaalmethoden" } }, "rounding": { diff --git a/src/Resources/config/config.xml b/src/Resources/config/config.xml index aafd5466a..ffd749ce0 100644 --- a/src/Resources/config/config.xml +++ b/src/Resources/config/config.xml @@ -170,7 +170,7 @@ Automatically hides payment methods in the checkout based on the availability rules for payment methods. Only active payment methods from your mollie dashboard will be shown. If the payment method has a cart limit, currency restriction or billing address restriction, it will be hidden during checkout. Blendet automatisch Zahlungsart im Checkout basierend auf Verfügbarkeitsregeln von Mollie. Es werden nur die aktiven Zahlungsarten aus dem Mollie Dashboard angezeigt. Wenn die Zahlungsart eine Einschränkung auf den Warenkorbwert, Währung oder Rechnungsadresse hat, wird diese auch ausgeblendet. - Verbergt automatisch betaalmethoden in de checkout op basis van Mollie's limieten. Als je bijvoorbeeld alleen creditcardbetalingen tot 500 euro kan accepteren, wordt bij een winkelwagen van 600 euro geen creditcard weergegeven als betaalmethode bij het afrekenen. + Automatische betalingsmethode wordt verborgen tijdens het afrekenen op basis van beschikbaarheidsregels van Mollie. Alleen actieve betalingsmethoden uit het Mollie-dashboard worden weergegeven. Als de betalingsmethode beperkingen heeft op de winkelwagenwaarde, valuta of factuuradres, wordt deze ook verborgen. formatOrderNumber diff --git a/src/Service/Payment/Provider/ActivePaymentMethodsProvider.php b/src/Service/Payment/Provider/ActivePaymentMethodsProvider.php index 86ed66877..bb49496b8 100644 --- a/src/Service/Payment/Provider/ActivePaymentMethodsProvider.php +++ b/src/Service/Payment/Provider/ActivePaymentMethodsProvider.php @@ -52,7 +52,7 @@ public function __construct(MollieApiFactory $mollieApiFactory, MollieOrderPrice * @param array $salesChannelIDs * @return Method[] */ - public function getActivePaymentMethodsForAmount(float $price, string $currency,string $billingCountryCode, array $salesChannelIDs): array + public function getActivePaymentMethodsForAmount(float $price, string $currency, string $billingCountryCode, array $salesChannelIDs): array { if ($price < 0.01) { return []; diff --git a/src/Service/Payment/Provider/ActivePaymentMethodsProviderInterface.php b/src/Service/Payment/Provider/ActivePaymentMethodsProviderInterface.php index e688cab26..90d6f831c 100644 --- a/src/Service/Payment/Provider/ActivePaymentMethodsProviderInterface.php +++ b/src/Service/Payment/Provider/ActivePaymentMethodsProviderInterface.php @@ -15,5 +15,5 @@ interface ActivePaymentMethodsProviderInterface * @param array $salesChannelIDs * @return array */ - public function getActivePaymentMethodsForAmount(float $price, string $currency,string $billingCountryCode, array $salesChannelIDs): array; + public function getActivePaymentMethodsForAmount(float $price, string $currency, string $billingCountryCode, array $salesChannelIDs): array; } From 8b32f81b5bba3b891ce5cec1518adf70c607573f Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Fri, 9 Feb 2024 14:18:03 +0100 Subject: [PATCH 4/5] NTR: change text --- src/Resources/app/administration/src/snippet/de-DE.json | 2 +- src/Resources/app/administration/src/snippet/en-GB.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Resources/app/administration/src/snippet/de-DE.json b/src/Resources/app/administration/src/snippet/de-DE.json index e40cbc976..b3674920d 100644 --- a/src/Resources/app/administration/src/snippet/de-DE.json +++ b/src/Resources/app/administration/src/snippet/de-DE.json @@ -76,7 +76,7 @@ "failed": "Die Zahlungsarten konnten nicht aktualisiert werden." }, "mollieLimits": { - "link": "Zeige Mollie Verfügbarkeitsregeln für Zahlungsarten" + "link": "Zeige Mollie-Verfügbarkeitregeln für Zahlungsmethoden" } }, "rounding": { diff --git a/src/Resources/app/administration/src/snippet/en-GB.json b/src/Resources/app/administration/src/snippet/en-GB.json index 934b714d6..6652b6198 100644 --- a/src/Resources/app/administration/src/snippet/en-GB.json +++ b/src/Resources/app/administration/src/snippet/en-GB.json @@ -76,7 +76,7 @@ "failed": "The payment methods couldn't be updated." }, "mollieLimits": { - "link": "Show Mollie availability rules for payment methods" + "link": "Show mollie availability rules for payment methods" } }, "rounding": { From 00d57ad03a98a2a4a98ad09921865dc69e7ef3eb Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Fri, 9 Feb 2024 14:58:50 +0100 Subject: [PATCH 5/5] NTR: change name --- src/Resources/config/config.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Resources/config/config.xml b/src/Resources/config/config.xml index ffd749ce0..2184638f7 100644 --- a/src/Resources/config/config.xml +++ b/src/Resources/config/config.xml @@ -165,7 +165,7 @@ useMolliePaymentMethodLimits false - + Automatically hides payment methods in the checkout based on the availability rules for payment methods. Only active payment methods from your mollie dashboard will be shown. If the payment method has a cart limit, currency restriction or billing address restriction, it will be hidden during checkout.