diff --git a/public/images/mbway.svg b/public/images/mbway.svg new file mode 100644 index 00000000..76ebdc70 --- /dev/null +++ b/public/images/mbway.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/readme.txt b/readme.txt index 3f48fabf..761199ef 100644 --- a/readme.txt +++ b/readme.txt @@ -1,10 +1,10 @@ === Mollie Payments for WooCommerce === Contributors: daanvm, danielhuesken, davdebcom, dinamiko, syde, l.vangunst, ndijkstra, robin-mollie, wido, carmen222, inpsyde-maticluznar -Tags: mollie, payments, payment gateway, woocommerce, credit card, apple pay, ideal, bancontact, klarna, sofort, giropay, woocommerce subscriptions +Tags: mollie, payments, payment gateway, woocommerce, credit card, apple pay, ideal, bancontact, klarna, sofort, woocommerce subscriptions Requires at least: 3.8 Tested up to: 6.6 -Stable tag: 7.8.0 -Requires PHP: 7.4 +Stable tag: 7.9.0 +Requires PHP: 7.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -14,6 +14,10 @@ Accept all major payment methods in WooCommerce today. Credit cards, iDEAL and m https://www.youtube.com/watch?v=33sQNKelKW4 +> **Special limited time offer:** Pay ZERO processing fees for your first month.* [Sign-up to Mollie today](https://my.mollie.com/campaigns/signup/molliewoocommerce2024?utm_campaign=GLO_Q4_2024_Woo-Campaign&utm_medium=company_profile&utm_source=partner&utm_content=pagebannerwordpress&utm_partner=woocommerce&campaign_name=GLO_Q4_2024_Woo-Campaign) + +\***To qualify for this offer, you must sign up through the specific link above. Offer subject to terms and conditions** + Quickly integrate all major payment methods in WooCommerce, wherever you need them. Mollie Payments for WooCommerce adds the critical success factor: an easy-to-install, easy-to-use, customizable payments gateway that is as flexible as WooCommerce itself. > **Effortless payments for your customers, designed for growth** @@ -69,7 +73,7 @@ Pay after delivery payment methods: = Get started with Mollie = -1. [Create a Mollie account](https://my.mollie.com/dashboard/signup) +1. [Create a Mollie account](https://my.mollie.com/campaigns/signup/molliewoocommerce2024?utm_campaign=GLO_Q4_2024_Woo-Campaign&utm_medium=company_profile&utm_source=partner&utm_content=pagebannerwordpress&utm_partner=woocommerce&campaign_name=GLO_Q4_2024_Woo-Campaign) 2. Install **Mollie Payments for WooCommerce** on your WordPress website 3. Activate Mollie in your WooCommerce webshop and enter your Mollie API key 4. In your Mollie Dashboard, go to Settings > Website profiles and select the payment methods you want to offer @@ -100,7 +104,7 @@ Become part of Mollie's growing community and gain access to our comprehensive s > **Your success is our mission. With Mollie, simplify your payments and focus on growing your business.** -[Sign up today](https://my.mollie.com/dashboard/signup) and start enhancing your WooCommerce store with Mollie's advanced payment solutions. +[Sign up today](https://my.mollie.com/campaigns/signup/molliewoocommerce2024?utm_campaign=GLO_Q4_2024_Woo-Campaign&utm_medium=company_profile&utm_source=partner&utm_content=pagebannerwordpress&utm_partner=woocommerce&campaign_name=GLO_Q4_2024_Woo-Campaign) and start enhancing your WooCommerce store with Mollie's advanced payment solutions. Feel free to contact info@mollie.com if you have any questions or comments about this plugin. @@ -222,6 +226,24 @@ Automatic updates should work like a charm; as always though, ensure you backup == Changelog == += 7.9.1 - 21-01-2025 = + +* Feature: Style Apple Pay express button via Checkout block +* Fixed: Notice `_load_textdomain_just_in_time` due to early translation loading +* Fixed: Company Name input field not saved in Order when Billie was enabled +* Fixed: Mollie Payment methods may not load on Checkout block +* Fixed: Mollie Payment methods may disappear from Checkout block when changing billing country +* Fixed: Mollie Components are not enabled by default on new installations + += 7.9.0 - 18-11-2024 = + +* Feature - Revamp Mollie settings dashboard +* Feature - Implement dedicated Block Express Cart/Checkout location for Apple Pay button +* Feature - Trustly for first Payments +* Fixed - Display notice in iDEAL settings about iDEAL 2.0 and removal of bank issuer dropdown +* Fixed - Translation Update Loop in Mollie Payments for WooCommerce +* Fixed - Bank Transfer payment details displayed in one line on order-received page + = 7.8.2 - 08-09-2024 = * Fixed - Subscription renewal status on-hold instead of active @@ -260,6 +282,7 @@ Automatic updates should work like a charm; as always though, ensure you backup * Fixed - Mollie hooks into unrelated orders * Fixed - Notices and type errors after 7.5.5 update * Fixed - Rounding issues with products including tax + = 7.5.5 - 18-06-2024 = * Feature Flag - Enable Bancomat Pay & Alma feature flag by default (official launch 2024-07-01) @@ -275,7 +298,7 @@ Automatic updates should work like a charm; as always though, ensure you backup * Feature Flag - Initiative - Alma for WooCommerce Integration - under flag add_filter('inpsyde.feature-flags.mollie-woocommerce.alma_enabled', false); * Feature - Add WooCommerce as required plugin in header -* Fix - Display error for Apple Pay Validation Error in WooCommerce +* Fix - Display error for Apple Pay Validation Error in Woocommerce * Fix - TypeError when WooCommerce Analytics is disabled * Fix - In3 - payment successful with date in the future * Fix - Ensure Smooth Order Processing Despite Rounding Differences @@ -1033,7 +1056,7 @@ Starting with version 4.0, this plugin will require PHP 5.6. If you are using an * Fix - A new customerID was created for every new order where a payment method that supported recurring payments was selected * Fix - When plugin 2.8.0 was used with WooCommerce 2.6 or older, a fatal error would be shown on the return page (because of use of new WooCommerce 3.0 method) -* Fix - Some cancelled payments for cancelled orders where redirected to "Retry payment" instead of "Order received" page, see GitHub issue #166 +* Fix - Some cancelled payments for cancelled orders where redirected to "Retry payment" instead of "Order received" page, see Github issue #166 = 2.8.0 - 09/01/2018 = diff --git a/resources/js/blocks/molliePaymentMethod.js b/resources/js/blocks/molliePaymentMethod.js index 3c09149f..fbea3788 100644 --- a/resources/js/blocks/molliePaymentMethod.js +++ b/resources/js/blocks/molliePaymentMethod.js @@ -25,10 +25,12 @@ function setAvailableGateways(country, currencyCode, data) { saveCachedAvailableGateways(); } function useMollieAvailableGateways(billing, currencyCode, cartTotal, filters, ajaxUrl, jQuery, item) { - const country = billing.country; + let country = billing.country; const code = currencyCode; const value = cartTotal; - + if (!country) { + country = wcSettings?.baseLocation.country; + } wp.element.useEffect(() => { if (!country || !item) return; @@ -416,7 +418,10 @@ const molliePaymentMethod = (useEffect, ajaxUrl, filters, gatewayData, available } loadCachedAvailableGateways(); const currencyCode = cartTotals?.currency_code; - const country = billingData?.country; + let country = billingData?.country; + if (!country) { + country = wcSettings?.baseLocation.country; + } const currentFilterKey = currencyCode + "-" + country; creditcardSelectedEvent(); diff --git a/src/PaymentMethods/Creditcard.php b/src/PaymentMethods/Creditcard.php index ea7c4872..9c6313ae 100644 --- a/src/PaymentMethods/Creditcard.php +++ b/src/PaymentMethods/Creditcard.php @@ -77,7 +77,7 @@ protected function includeMollieComponentsFields($generalFormFields) protected function defaultComponentsEnabled() { - $isNewInstall = get_option(SharedDataDictionary::NEW_INSTALL_PARAM_NAME, false); + $isNewInstall = get_option(SharedDataDictionary::NEW_INSTALL_PARAM_NAME, 'yes'); if ($isNewInstall === 'yes') { return 'yes'; } diff --git a/src/PaymentMethods/Directdebit.php b/src/PaymentMethods/Directdebit.php index 50171cd1..64dc893a 100644 --- a/src/PaymentMethods/Directdebit.php +++ b/src/PaymentMethods/Directdebit.php @@ -10,7 +10,7 @@ protected function getConfig(): array { return [ 'id' => 'directdebit', - 'defaultTitle' => 'SEPA Direct Debit', 'mollie-payments-for-woocommerce', + 'defaultTitle' => 'SEPA Direct Debit', 'settingsDescription' => "SEPA Direct Debit is used for recurring payments with WooCommerce Subscriptions, and will not be shown in the WooCommerce checkout for regular payments! You also need to enable iDEAL and/or other 'first' payment methods if you want to use SEPA Direct Debit.", 'defaultDescription' => '', 'paymentFields' => false, diff --git a/src/PaymentMethods/Giftcard.php b/src/PaymentMethods/Giftcard.php index 6bb5d80e..29ca7dc0 100644 --- a/src/PaymentMethods/Giftcard.php +++ b/src/PaymentMethods/Giftcard.php @@ -59,7 +59,7 @@ protected function getConfig(): array { return [ 'id' => 'giftcard', - 'defaultTitle' => 'Gift cards', 'mollie-payments-for-woocommerce', + 'defaultTitle' => 'Gift cards', 'settingsDescription' => '', 'defaultDescription' => 'Select your gift card', 'paymentFields' => true, diff --git a/src/PaymentMethods/Klarnasliceit.php b/src/PaymentMethods/Klarnasliceit.php index b827eb90..046d6562 100644 --- a/src/PaymentMethods/Klarnasliceit.php +++ b/src/PaymentMethods/Klarnasliceit.php @@ -10,7 +10,7 @@ protected function getConfig(): array { return [ 'id' => 'klarnasliceit', - 'defaultTitle' => 'Klarna Slice it', 'mollie-payments-for-woocommerce', + 'defaultTitle' => 'Klarna Slice it', 'settingsDescription' => 'To accept payments via Klarna, all default WooCommerce checkout fields should be enabled and required.', 'defaultDescription' => '', 'paymentFields' => false, diff --git a/src/PaymentMethods/Mbway.php b/src/PaymentMethods/Mbway.php new file mode 100644 index 00000000..338f0ab2 --- /dev/null +++ b/src/PaymentMethods/Mbway.php @@ -0,0 +1,42 @@ + 'mbway', + 'defaultTitle' => 'MB Way', + 'settingsDescription' => '', + 'defaultDescription' => '', + 'paymentFields' => false, + 'instructions' => false, + 'supports' => [ + 'products', + 'refunds', + ], + 'filtersOnBuild' => false, + 'confirmationDelayed' => false, + 'SEPA' => false, + 'docs' => 'https://www.mollie.com/gb/payments/mbway', + ]; + } + + public function initializeTranslations(): void + { + if ($this->translationsInitialized) { + return; + } + $this->config['defaultTitle'] = __('MB Way', 'mollie-payments-for-woocommerce'); + $this->translationsInitialized = true; + } + + public function getFormFields($generalFormFields): array + { + return $generalFormFields; + } +} diff --git a/src/Settings/Page/Section/PaymentMethods.php b/src/Settings/Page/Section/PaymentMethods.php index 11fc8f67..16cfaded 100644 --- a/src/Settings/Page/Section/PaymentMethods.php +++ b/src/Settings/Page/Section/PaymentMethods.php @@ -41,13 +41,13 @@ public function renderGateways(): string 'mollie-payments-for-woocommerce' ); $descriptionActivePaymentMethods = __( - 'These payment methods are active in your Mollie profile. + 'These payment methods are active in your Mollie profile. You can enable these payment methods in their settings to make them available for your customers.', 'mollie-payments-for-woocommerce' ); $titleInactivePaymentMethods = __('Inactive Payment Methods', 'mollie-payments-for-woocommerce'); $descriptionInactivePaymentMethods = __( - 'These payment methods are available in your Mollie profile but are + 'These payment methods are available in your Mollie profile but are not currently active. Activate them to offer more payment options to your customers.', 'mollie-payments-for-woocommerce' ); @@ -61,6 +61,13 @@ public function renderGateways(): string $gatewayKey = 'mollie_wc_gateway_' . $paymentMethodId; $enabledInMollie = array_key_exists($gatewayKey, $this->mollieGateways); + //don't display old klarna GWs + if (isset($this->paymentMethods['klarna']) && in_array($paymentMethodId, ['klarnasliceit', 'klarnapaylater', 'klarnapaynow'], true)) { + if (!$enabledInMollie) { + continue; + } + } + $paymentGatewayButton = $this->paymentGatewayButton($paymentMethod, $enabledInMollie); if ($enabledInMollie) { $activatedGateways .= $paymentGatewayButton; @@ -88,7 +95,7 @@ protected function paymentGatewaysBlock(string $title, string $description, stri

- +
- getIconUrl(); // WPCS: XSS ok.?> + getIconUrl(); // phpcs:ignore XSS ok.?> title());?> - - + +
isTestModeEnabled(); }, 'settings.IsDebugEnabled' => static function (): bool { - $debugEnabled = get_option('mollie-payments-for-woocommerce_debug', true); + $debugEnabled = get_option('mollie-payments-for-woocommerce_debug', 'yes'); return $debugEnabled === 'yes'; }, 'settings.advanced_default_options' => static function (ContainerInterface $container) { diff --git a/src/Shared/SharedDataDictionary.php b/src/Shared/SharedDataDictionary.php index 86ac97ca..87c9ee97 100644 --- a/src/Shared/SharedDataDictionary.php +++ b/src/Shared/SharedDataDictionary.php @@ -41,6 +41,7 @@ class SharedDataDictionary 'Mollie_WC_Gateway_Satispay', 'Mollie_WC_Gateway_Swish', 'Mollie_WC_Gateway_Paybybank', + 'Mollie_WC_Gateway_Mbway', ]; public const MOLLIE_OPTIONS_NAMES = [