Skip to content

Commit

Permalink
Merge branch 'develop' into PIWOO-562-add-payby-bank-payment-method
Browse files Browse the repository at this point in the history
danielhuesken authored Jan 31, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 45cdf15 + 5b5506a commit 8749838
Showing 11 changed files with 105 additions and 21 deletions.
6 changes: 6 additions & 0 deletions public/images/mbway.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 30 additions & 7 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -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 [email protected] 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 =

11 changes: 8 additions & 3 deletions resources/js/blocks/molliePaymentMethod.js
Original file line number Diff line number Diff line change
@@ -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();
2 changes: 1 addition & 1 deletion src/PaymentMethods/Creditcard.php
Original file line number Diff line number Diff line change
@@ -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';
}
2 changes: 1 addition & 1 deletion src/PaymentMethods/Directdebit.php
Original file line number Diff line number Diff line change
@@ -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,
2 changes: 1 addition & 1 deletion src/PaymentMethods/Giftcard.php
Original file line number Diff line number Diff line change
@@ -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,
2 changes: 1 addition & 1 deletion src/PaymentMethods/Klarnasliceit.php
Original file line number Diff line number Diff line change
@@ -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,
42 changes: 42 additions & 0 deletions src/PaymentMethods/Mbway.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

declare(strict_types=1);

namespace Mollie\WooCommerce\PaymentMethods;

class Mbway extends AbstractPaymentMethod implements PaymentMethodI
{
public function getConfig(): array
{
return [
'id' => '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;
}
}
19 changes: 13 additions & 6 deletions src/Settings/Page/Section/PaymentMethods.php
Original file line number Diff line number Diff line change
@@ -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
<h3><?= esc_html($title); ?></h3>
<p><?= esc_html($description); ?></p>
<div class="mollie-settings-pm__list">
<?= $html; // WPCS: XSS ok. ?>
<?= $html; // phpcs:ignore XSS ok. ?>
</div>
</div>
<?php
@@ -232,10 +239,10 @@ protected function paymentGatewayButton(AbstractPaymentMethod $paymentMethod, $e
ob_start();
?>
<div class="mollie-settings-pm__single">
<?= $paymentMethod->getIconUrl(); // WPCS: XSS ok.?>
<?= $paymentMethod->getIconUrl(); // phpcs:ignore XSS ok.?>
<?= esc_html($paymentMethod->title());?>
<?= $messageOrLink; // WPCS: XSS ok.?>
<?= $button; // WPCS: XSS ok.?>
<?= $messageOrLink; // phpcs:ignore XSS ok.?>
<?= $button; // phpcs:ignore XSS ok.?>
</div>
<?php
return ob_get_clean();
2 changes: 1 addition & 1 deletion src/Settings/SettingsModule.php
Original file line number Diff line number Diff line change
@@ -78,7 +78,7 @@ public function services(): array
return $settingsHelper->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) {
1 change: 1 addition & 0 deletions src/Shared/SharedDataDictionary.php
Original file line number Diff line number Diff line change
@@ -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 = [

0 comments on commit 8749838

Please sign in to comment.