Skip to content

Commit

Permalink
Merge branch 'develop' into PIWOO-607-add-new-payment-method-multibanco
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuesken authored Jan 31, 2025
2 parents cfa5c99 + e7bc099 commit c8b5ee1
Show file tree
Hide file tree
Showing 13 changed files with 162 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.
14 changes: 14 additions & 0 deletions public/images/paybybank.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

Expand All @@ -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**
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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 =

Expand Down
11 changes: 8 additions & 3 deletions resources/js/blocks/molliePaymentMethod.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/PaymentMethods/Creditcard.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down
2 changes: 1 addition & 1 deletion src/PaymentMethods/Directdebit.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/PaymentMethods/Giftcard.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/PaymentMethods/Klarnasliceit.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
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;
}
}
42 changes: 42 additions & 0 deletions src/PaymentMethods/Paybybank.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 Paybybank extends AbstractPaymentMethod implements PaymentMethodI
{
protected function getConfig(): array
{
return [
'id' => 'paybybank',
'defaultTitle' => 'Pay by Bank',
'settingsDescription' => '',
'defaultDescription' => '',
'paymentFields' => false,
'instructions' => false,
'supports' => [
'products',
'refunds',
],
'filtersOnBuild' => false,
'confirmationDelayed' => true,
'SEPA' => true,
'docs' => 'https://www.mollie.com/gb/payments/pay-by-bank',
];
}

public function initializeTranslations(): void
{
if ($this->translationsInitialized) {
return;
}
$this->config['defaultTitle'] = __('Pay by Bank', 'mollie-payments-for-woocommerce');
$this->translationsInitialized = true;
}

public function getFormFields($generalFormFields): array
{
return $generalFormFields;
}
}
Loading

0 comments on commit c8b5ee1

Please sign in to comment.