Mollie Payments for WooCommerce - Version 7.0.4

Version Description

  • 23-03-2022 =

  • Fix - Conflict with Paytium plugin

  • Fix - Fallback from orders API to payments API not working

  • Fix - Container access for third-party developers

Download this release

Release Info

Developer carmen222
Plugin Icon wp plugin Mollie Payments for WooCommerce
Version 7.0.4
Comparing to
See all releases

Code changes from version 7.0.3 to 7.0.4

mollie-payments-for-woocommerce.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Mollie Payments for WooCommerce
4
  * Plugin URI: https://www.mollie.com
5
  * Description: Accept payments in WooCommerce with the official Mollie plugin
6
- * Version: 7.0.3
7
  * Author: Mollie
8
  * Author URI: https://www.mollie.com
9
  * Requires at least: 5.0
@@ -32,6 +32,7 @@ use Mollie\WooCommerce\Notice\NoticeModule;
32
  use Mollie\WooCommerce\Payment\PaymentModule;
33
  use Mollie\WooCommerce\SDK\SDKModule;
34
  use Mollie\WooCommerce\Settings\SettingsModule;
 
35
  use Throwable;
36
 
37
  require_once(ABSPATH . 'wp-admin/includes/plugin.php');
@@ -174,7 +175,7 @@ function initialize()
174
  // Initialize plugin.
175
  $properties = PluginProperties::new(__FILE__);
176
  $bootstrap = Package::new($properties);
177
- $bootstrap->boot(
178
  new ActivationModule(__FILE__),
179
  new LogModule('mollie-payments-for-woocommerce-'),
180
  new NoticeModule(),
@@ -185,7 +186,9 @@ function initialize()
185
  new GatewayModule(),
186
  new VoucherModule(),
187
  new PaymentModule()
188
- );
 
 
189
  } catch (Throwable $throwable) {
190
  handleException($throwable);
191
  }
3
  * Plugin Name: Mollie Payments for WooCommerce
4
  * Plugin URI: https://www.mollie.com
5
  * Description: Accept payments in WooCommerce with the official Mollie plugin
6
+ * Version: 7.0.4
7
  * Author: Mollie
8
  * Author URI: https://www.mollie.com
9
  * Requires at least: 5.0
32
  use Mollie\WooCommerce\Payment\PaymentModule;
33
  use Mollie\WooCommerce\SDK\SDKModule;
34
  use Mollie\WooCommerce\Settings\SettingsModule;
35
+ use Mollie\WooCommerce\Uninstall\UninstallModule;
36
  use Throwable;
37
 
38
  require_once(ABSPATH . 'wp-admin/includes/plugin.php');
175
  // Initialize plugin.
176
  $properties = PluginProperties::new(__FILE__);
177
  $bootstrap = Package::new($properties);
178
+ $modules = [
179
  new ActivationModule(__FILE__),
180
  new LogModule('mollie-payments-for-woocommerce-'),
181
  new NoticeModule(),
186
  new GatewayModule(),
187
  new VoucherModule(),
188
  new PaymentModule()
189
+ ];
190
+ $modules = apply_filters('mollie_wc_plugin_modules', $modules);
191
+ $bootstrap->boot(...$modules);
192
  } catch (Throwable $throwable) {
193
  handleException($throwable);
194
  }
public/js/advancedSettings.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/public/js/",n(n.s="ZlrM")}({ZlrM:function(e,t){!function(e){e._;function t(e,t,n){e.setRangeText?n?e.setRangeText(t,e.selectionStart,e.selectionEnd,"end"):e.setRangeText(t,e.value.length,e.value.length,"end"):(e.focus(),document.execCommand("insertText",!1,t)),e.focus()}(0,e.jQuery)(document).ready((function(e){e(".mollie-settings-advanced-payment-desc-label").data("ignore-click","false").on("mousedown",(function(n){var o=document.getElementById("mollie-payments-for-woocommerce_api_payment_description");document.activeElement&&o===document.activeElement&&e(this).on("mouseup.molliesettings",(function(n){e(this).data("ignore-click","true"),e(this).off(".molliesettings");var o=e(this).data("tag");t(document.getElementById("mollie-payments-for-woocommerce_api_payment_description"),o,!0)}));var i=e(this);e(window).on("mouseup.molliesettings drag.molliesettings blur.molliesettings",(function(t){i.off(".molliesettings"),e(window).off(".molliesettings")}))})).on("click",(function(n){if(n.preventDefault(),n.stopImmediatePropagation(),"false"===e(this).data("ignore-click")){var o=e(this).data("tag");t(document.getElementById("mollie-payments-for-woocommerce_api_payment_description"),o,!1)}else e(this).data("ignore-click","false")}))}))}(window)}});
public/js/entrypoints.json CHANGED
@@ -40,6 +40,11 @@
40
  "/public/js/gatewaySettings.min.js"
41
  ]
42
  },
 
 
 
 
 
43
  "gatewaySurcharge.min": {
44
  "js": [
45
  "/public/js/gatewaySurcharge.min.js"
40
  "/public/js/gatewaySettings.min.js"
41
  ]
42
  },
43
+ "advancedSettings.min": {
44
+ "js": [
45
+ "/public/js/advancedSettings.min.js"
46
+ ]
47
+ },
48
  "gatewaySurcharge.min": {
49
  "js": [
50
  "/public/js/gatewaySurcharge.min.js"
public/js/manifest.json CHANGED
@@ -1,4 +1,5 @@
1
  {
 
2
  "public/js/applepay.min.js": "/public/js/applepay.min.js",
3
  "public/js/applepayButtonBlockComponent.min.js": "/public/js/applepayButtonBlockComponent.min.js",
4
  "public/js/applepayDirect.min.js": "/public/js/applepayDirect.min.js",
1
  {
2
+ "public/js/advancedSettings.min.js": "/public/js/advancedSettings.min.js",
3
  "public/js/applepay.min.js": "/public/js/applepay.min.js",
4
  "public/js/applepayButtonBlockComponent.min.js": "/public/js/applepayButtonBlockComponent.min.js",
5
  "public/js/applepayDirect.min.js": "/public/js/applepayDirect.min.js",
public/js/mollieBlockIndex.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/public/js/",n(n.s="AGGC")}({AGGC:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],c=!0,l=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var i,u,s;n.r(t);var m=new Event("mollie_creditcard_component_selected",{bubbles:!0}),f=function(e){var t=e.onSubmit,n=e.activePaymentMethod,r=e.billing,o=e.item,l=e.useEffect,s=e.ajaxUrl,f=e.jQuery,p=e.emitResponse,d=e.eventRegistration,y=p.responseTypes,b=d.onPaymentProcessing,w=c(wp.element.useState(""),2),_=w[0],v=w[1],g="mollie-payments-for-woocommerce_issuer_"+n;function h(e,t){var n="<span class='wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-item__value'>"+(e+" "+t)+"</span>";f(".wc-block-components-totals-footer-item .wc-block-formatted-money-amount:first").replaceWith(n)}function O(e){var t=f(".wc-block-components-totals-fees");if(e.data.amount){var n=function(e){return"<div class='wc-block-components-totals-item wc-block-components-totals-fees'><span class='wc-block-components-totals-item__label'>"+e.data.name+"</span><span class='wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-item__value'>"+e.data.amount.toFixed(2).replace(".",",")+" "+e.data.currency+"</span><div class='wc-block-components-totals-item__description'></div></div>"}(e);t.length?function(e,t,n){e.replaceWith(t),h(n.data.newTotal.toFixed(2).replace(".",","),n.data.currency)}(t,n,e):function(e,t){f(".wc-block-components-totals-item:first").after(e),h(t.data.newTotal.toFixed(2).replace(".",","),t.data.currency)}(n,e)}else!function(e,t){null==e||e.hide(),h(t.data.newTotal,"")}(t,e)}l((function(){u!==n&&"mollie_wc_gateway_creditcard"===n&&document.documentElement.dispatchEvent(m),u=n,f.ajax({url:s,method:"POST",data:{action:"mollie_checkout_blocks_surchage",method:n},complete:function(e,t){},success:function(e,t,n){O(e)},error:function(e,t,n){console.warn(t,n)}})}),[n,r.cartTotal]),l((function(){var e=b((function(){return{type:y.SUCCESS,meta:{paymentMethodData:a({payment_method:n,payment_method_title:o.title},g,_)}}}));return function(){e()}}),[_,b]),i=t;return o.issuers&&"mollie_wc_gateway_creditcard"!==o.name?React.createElement("div",null,React.createElement("p",null,o.content),React.createElement("select",{name:g,dangerouslySetInnerHTML:{__html:o.issuers},value:_,onChange:function(e){v(e.target.value)}})):React.createElement("div",{dangerouslySetInnerHTML:{__html:o.content}})},p=function(e,t,n,r,a,c,l){var u=n.billingCountry,p=n.cartTotal;s=a;var d=n.billingCountry;return document.addEventListener("mollie_components_ready_to_submit",(function(){i()})),{name:c.name,label:React.createElement("div",{dangerouslySetInnerHTML:{__html:c.label}}),content:React.createElement(f,{item:c,useEffect:e,ajaxUrl:t,jQuery:l}),edit:React.createElement("div",null,c.edit),paymentMethodId:c.paymentMethodId,canMakePayment:function(e){var r=e.cartTotals,a=e.billingData;if(!_.isEmpty(c.allowedCountries)&&!c.allowedCountries.includes(a.country))return!1;if(r<=0)return!0;p=null==r?void 0:r.total_price,u=null==a?void 0:a.country;var i=null==r?void 0:r.currency_code,f=i+"-"+n.paymentLocale+"-"+u;return u!==d&&(d=u,s.hasOwnProperty(f)||l.ajax({url:t,method:"POST",data:{action:"mollie_checkout_blocks_canmakepayment",currentGateway:c,currency:i,billingCountry:u,cartTotal:p,paymentLocale:n.paymentLocale},complete:function(e,t){},success:function(e,t,n){return s=o(o({},s),e.data),console.log(s),!!s.hasOwnProperty(f)&&s[f].hasOwnProperty(c.name)},error:function(e,t,n){console.warn(t,n)}})),!!s.hasOwnProperty(f)&&("mollie_wc_gateway_creditcard"===c.name&&document.documentElement.dispatchEvent(m),s[f].hasOwnProperty(c.name))},ariaLabel:c.ariaLabel,supports:{features:c.supports}}};!function(e){var t=e.mollieBlockData,n=e.wc,r=e._,o=e.jQuery;if(!r.isEmpty(t)){var a=n.wcBlocksRegistry.registerPaymentMethod,c=t.gatewayData,l=c.ajaxUrl,i=c.filters,u=c.gatewayData,s=c.availableGateways,m=wp.element.useEffect,f="function"==typeof window.ApplePaySession;u.forEach((function(e){"mollie_wc_gateway_applepay"!==e.name&&a(p(m,l,i,u,s,e,o)),"mollie_wc_gateway_applepay"===e.name&&f&&window.ApplePaySession.canMakePayments()&&a(p(m,l,i,u,s,e,o))}))}}(window,wc)}});
1
+ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/public/js/",n(n.s="AGGC")}({AGGC:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],c=!0,l=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var i,u,s;n.r(t);var m=new Event("mollie_creditcard_component_selected",{bubbles:!0}),f=function(e){var t=e.onSubmit,n=e.activePaymentMethod,r=e.billing,o=e.item,l=e.useEffect,s=e.ajaxUrl,f=e.jQuery,p=e.emitResponse,d=e.eventRegistration,y=p.responseTypes,b=d.onPaymentProcessing,w=c(wp.element.useState(""),2),_=w[0],v=w[1],g="mollie-payments-for-woocommerce_issuer_"+n;function h(e,t){var n="<span class='wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-item__value'>"+(e+" "+t)+"</span>";f(".wc-block-components-totals-footer-item .wc-block-formatted-money-amount:first").replaceWith(n)}function O(e){var t=f(".wc-block-components-totals-fees");if(e.data.amount){var n=function(e){return"<div class='wc-block-components-totals-item wc-block-components-totals-fees'><span class='wc-block-components-totals-item__label'>"+e.data.name+"</span><span class='wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-item__value'>"+e.data.amount.toFixed(2).replace(".",",")+" "+e.data.currency+"</span><div class='wc-block-components-totals-item__description'></div></div>"}(e);t.length?function(e,t,n){e.replaceWith(t),h(n.data.newTotal.toFixed(2).replace(".",","),n.data.currency)}(t,n,e):function(e,t){f(".wc-block-components-totals-item:first").after(e),h(t.data.newTotal.toFixed(2).replace(".",","),t.data.currency)}(n,e)}else!function(e,t){null==e||e.hide(),h(t.data.newTotal,"")}(t,e)}l((function(){u!==n&&"mollie_wc_gateway_creditcard"===n&&document.documentElement.dispatchEvent(m),u=n,f.ajax({url:s,method:"POST",data:{action:"mollie_checkout_blocks_surchage",method:n},complete:function(e,t){},success:function(e,t,n){O(e)},error:function(e,t,n){console.warn(t,n)}})}),[n,r.cartTotal]),l((function(){var e=b((function(){return{type:y.SUCCESS,meta:{paymentMethodData:a({payment_method:n,payment_method_title:o.title},g,_)}}}));return function(){e()}}),[_,b]),i=t;return o.issuers&&"mollie_wc_gateway_creditcard"!==o.name?React.createElement("div",null,React.createElement("p",null,o.content),React.createElement("select",{name:g,dangerouslySetInnerHTML:{__html:o.issuers},value:_,onChange:function(e){v(e.target.value)}})):React.createElement("div",{dangerouslySetInnerHTML:{__html:o.content}})},p=function(e,t,n,r,a,c,l){var u=n.billingCountry,p=n.cartTotal;s=a;var d=n.billingCountry;return document.addEventListener("mollie_components_ready_to_submit",(function(){i()})),{name:c.name,label:React.createElement("div",{dangerouslySetInnerHTML:{__html:c.label}}),content:React.createElement(f,{item:c,useEffect:e,ajaxUrl:t,jQuery:l}),edit:React.createElement("div",null,c.edit),paymentMethodId:c.paymentMethodId,canMakePayment:function(e){var r=e.cartTotals,a=e.billingData;if(!_.isEmpty(c.allowedCountries)&&!c.allowedCountries.includes(a.country))return!1;if(r<=0)return!0;p=null==r?void 0:r.total_price,u=null==a?void 0:a.country;var i=null==r?void 0:r.currency_code,f=i+"-"+n.paymentLocale+"-"+u;return u!==d&&(d=u,s.hasOwnProperty(f)||l.ajax({url:t,method:"POST",data:{action:"mollie_checkout_blocks_canmakepayment",currentGateway:c,currency:i,billingCountry:u,cartTotal:p,paymentLocale:n.paymentLocale},complete:function(e,t){},success:function(e,t,n){return!!(s=o(o({},s),e.data)).hasOwnProperty(f)&&s[f].hasOwnProperty(c.name)},error:function(e,t,n){console.warn(t,n)}})),!!s.hasOwnProperty(f)&&("mollie_wc_gateway_creditcard"===c.name&&document.documentElement.dispatchEvent(m),s[f].hasOwnProperty(c.name))},ariaLabel:c.ariaLabel,supports:{features:c.supports}}};!function(e){var t=e.mollieBlockData,n=e.wc,r=e._,o=e.jQuery;if(!r.isEmpty(t)){var a=n.wcBlocksRegistry.registerPaymentMethod,c=t.gatewayData,l=c.ajaxUrl,i=c.filters,u=c.gatewayData,s=c.availableGateways,m=wp.element.useEffect,f="function"==typeof window.ApplePaySession;u.forEach((function(e){"mollie_wc_gateway_applepay"!==e.name&&a(p(m,l,i,u,s,e,o)),"mollie_wc_gateway_applepay"===e.name&&f&&window.ApplePaySession.canMakePayments()&&a(p(m,l,i,u,s,e,o))}))}}(window,wc)}});
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: daanvm, danielhuesken, davdebcom, dinamiko, inpsyde, l.vangunst, n
3
  Tags: mollie, payments, payment gateway, woocommerce, credit card, ideal, bancontact, klarna, sofort, giropay, woocommerce subscriptions
4
  Requires at least: 3.8
5
  Tested up to: 5.9
6
- Stable tag: 7.0.3
7
  Requires PHP: 7.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -68,7 +68,7 @@ Please go to the [signup page](https://www.mollie.com/signup) to create a new Mo
68
  = FEATURES =
69
 
70
  * Support for all available Mollie payment methods
71
- * Compatible with WooCommerce Subscriptions for recurring payments (credit card, iDEAL, SEPA Direct Debit and more)
72
  * Transparent pricing. No startup fees, no monthly fees, and no gateway fees. No hidden fees, period.
73
  * Edit the order, title and description of every payment method in WooCommerce checkout
74
  * Support for full and partial payment refunds (WooCommerce 2.2+)
@@ -156,16 +156,17 @@ Where possible, also include the Mollie log file. You can find the Mollie log fi
156
 
157
  = Minimum Requirements =
158
 
159
- * PHP version 5.6 or greater
160
  * PHP extensions enabled: cURL, JSON
161
  * WordPress 3.8 or greater
162
- * WooCommerce 2.2.0 or greater
 
163
 
164
  = Automatic installation =
165
 
166
  1. Install the plugin via Plugins -> New plugin. Search for 'Mollie Payments for WooCommerce'.
167
  2. Activate the 'Mollie Payments for WooCommerce' plugin through the 'Plugins' menu in WordPress
168
- 3. Set your Mollie API key at WooCommerce -> Settings -> Payments (or use the *Mollie Settings* link in the Plugins overview)
169
  4. You're done, the active payment methods should be visible in the checkout of your webshop.
170
 
171
  = Manual installation =
@@ -173,7 +174,7 @@ Where possible, also include the Mollie log file. You can find the Mollie log fi
173
  1. Unpack the download package
174
  2. Upload the directory 'mollie-payments-for-woocommerce' to the `/wp-content/plugins/` directory
175
  3. Activate the 'Mollie Payments for WooCommerce' plugin through the 'Plugins' menu in WordPress
176
- 4. Set your Mollie API key at WooCommerce -> Settings -> Payments (or use the *Mollie Settings* link in the Plugins overview)
177
  5. You're done, the active payment methods should be visible in the checkout of your webshop.
178
 
179
  Please contact info@mollie.com if you need help installing the Mollie WooCommerce plugin. Please provide your Mollie partner ID and website URL.
@@ -184,6 +185,12 @@ Automatic updates should work like a charm; as always though, ensure you backup
184
 
185
  == Changelog ==
186
 
 
 
 
 
 
 
187
  = 7.0.3 - 15-03-2022 =
188
 
189
  * Fix - Update Mollie SDK and add http client
3
  Tags: mollie, payments, payment gateway, woocommerce, credit card, ideal, bancontact, klarna, sofort, giropay, woocommerce subscriptions
4
  Requires at least: 3.8
5
  Tested up to: 5.9
6
+ Stable tag: 7.0.4
7
  Requires PHP: 7.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
68
  = FEATURES =
69
 
70
  * Support for all available Mollie payment methods
71
+ * Compatible with WooCommerce Subscriptions for recurring payments (Apple Pay, credit card, iDEAL, and more via SEPA Direct Debit)
72
  * Transparent pricing. No startup fees, no monthly fees, and no gateway fees. No hidden fees, period.
73
  * Edit the order, title and description of every payment method in WooCommerce checkout
74
  * Support for full and partial payment refunds (WooCommerce 2.2+)
156
 
157
  = Minimum Requirements =
158
 
159
+ * PHP version 7.2 or greater
160
  * PHP extensions enabled: cURL, JSON
161
  * WordPress 3.8 or greater
162
+ * WooCommerce 3.0 or greater
163
+ * Mollie account
164
 
165
  = Automatic installation =
166
 
167
  1. Install the plugin via Plugins -> New plugin. Search for 'Mollie Payments for WooCommerce'.
168
  2. Activate the 'Mollie Payments for WooCommerce' plugin through the 'Plugins' menu in WordPress
169
+ 3. Set your Mollie API key at WooCommerce -> Settings -> Mollie Settings (or use the *Mollie Settings* link in the Plugins overview)
170
  4. You're done, the active payment methods should be visible in the checkout of your webshop.
171
 
172
  = Manual installation =
174
  1. Unpack the download package
175
  2. Upload the directory 'mollie-payments-for-woocommerce' to the `/wp-content/plugins/` directory
176
  3. Activate the 'Mollie Payments for WooCommerce' plugin through the 'Plugins' menu in WordPress
177
+ 4. Set your Mollie API key at WooCommerce -> Settings -> Mollie Settings (or use the *Mollie Settings* link in the Plugins overview)
178
  5. You're done, the active payment methods should be visible in the checkout of your webshop.
179
 
180
  Please contact info@mollie.com if you need help installing the Mollie WooCommerce plugin. Please provide your Mollie partner ID and website URL.
185
 
186
  == Changelog ==
187
 
188
+ = 7.0.4 - 23-03-2022 =
189
+
190
+ * Fix - Conflict with Paytium plugin
191
+ * Fix - Fallback from orders API to payments API not working
192
+ * Fix - Container access for third-party developers
193
+
194
  = 7.0.3 - 15-03-2022 =
195
 
196
  * Fix - Update Mollie SDK and add http client
src/Payment/PaymentModule.php CHANGED
@@ -14,6 +14,7 @@ use Mollie\WooCommerce\Gateway\MolliePaymentGateway;
14
  use Psr\Container\ContainerInterface;
15
  use Psr\Log\LoggerInterface as Logger;
16
  use Psr\Log\LogLevel;
 
17
  use WC_Order;
18
 
19
  class PaymentModule implements ServiceModule, ExecutableModule
14
  use Psr\Container\ContainerInterface;
15
  use Psr\Log\LoggerInterface as Logger;
16
  use Psr\Log\LogLevel;
17
+ use RuntimeException;
18
  use WC_Order;
19
 
20
  class PaymentModule implements ServiceModule, ExecutableModule
src/Payment/PaymentService.php CHANGED
@@ -133,7 +133,7 @@ class PaymentService
133
  $redirectUrl
134
  ),
135
  ];
136
- } catch (Mollie\Api\Exceptions\ApiException $error) {
137
  $this->reportPaymentCreationFailure($orderId, $error);
138
  }
139
  return ['result' => 'failure'];
@@ -372,7 +372,7 @@ class PaymentService
372
  $orderWithPayments = $this->apiHelper->getApiClient($apiKey)->orders->get( $paymentObject->id, [ "embed" => "payments" ] );
373
  $paymentOrder->updatePaymentDataWithOrderData($orderWithPayments, $orderId);
374
  }
375
- } catch (Mollie\Api\Exceptions\ApiException $e) {
376
  // Don't try to create a Mollie Payment for Klarna payment methods
377
  $order_payment_method = $order->get_payment_method();
378
 
@@ -409,7 +409,7 @@ class PaymentService
409
  $paymentObject = $this->apiHelper->getApiClient(
410
  $apiKey
411
  )->orders->create($data);
412
- } catch (Mollie\Api\Exceptions\ApiException $e) {
413
  // Set Mollie payment type to payment, when creating a Mollie Order has failed
414
  $molliePaymentType = self::PAYMENT_METHOD_TYPE_PAYMENT;
415
  }
@@ -425,7 +425,7 @@ class PaymentService
425
  * @param $customer_id
426
  * @param $test_mode
427
  *
428
- * @return Mollie\Api\Resources\Payment $paymentObject
429
  * @throws ApiException
430
  */
431
  protected function processAsMolliePayment(
@@ -473,7 +473,7 @@ class PaymentService
473
  $paymentObject = $this->apiHelper->getApiClient(
474
  $apiKey
475
  )->payments->create($data);
476
- } catch (Mollie\Api\Exceptions\ApiException $e) {
477
  $message = $e->getMessage();
478
  $this->logger->log( LogLevel::DEBUG, $message);
479
  throw $e;
@@ -615,7 +615,7 @@ class PaymentService
615
  'mollie-payments-for-woocommerce'
616
  )
617
  );
618
- throw new Mollie\Api\Exceptions\ApiException(
619
  __('Failed switching subscriptions, no valid mandate.', 'mollie-payments-for-woocommerce')
620
  );
621
  }
@@ -677,7 +677,7 @@ class PaymentService
677
  $this->noValidMandateForSubsSwitchFailure($orderId);
678
  }
679
  }
680
- catch ( Mollie\Api\Exceptions\ApiException $e ) {
681
  if ( $e->getField() ) {
682
  throw $e;
683
  }
133
  $redirectUrl
134
  ),
135
  ];
136
+ } catch (ApiException $error) {
137
  $this->reportPaymentCreationFailure($orderId, $error);
138
  }
139
  return ['result' => 'failure'];
372
  $orderWithPayments = $this->apiHelper->getApiClient($apiKey)->orders->get( $paymentObject->id, [ "embed" => "payments" ] );
373
  $paymentOrder->updatePaymentDataWithOrderData($orderWithPayments, $orderId);
374
  }
375
+ } catch (ApiException $e) {
376
  // Don't try to create a Mollie Payment for Klarna payment methods
377
  $order_payment_method = $order->get_payment_method();
378
 
409
  $paymentObject = $this->apiHelper->getApiClient(
410
  $apiKey
411
  )->orders->create($data);
412
+ } catch (ApiException $e) {
413
  // Set Mollie payment type to payment, when creating a Mollie Order has failed
414
  $molliePaymentType = self::PAYMENT_METHOD_TYPE_PAYMENT;
415
  }
425
  * @param $customer_id
426
  * @param $test_mode
427
  *
428
+ * @return Payment $paymentObject
429
  * @throws ApiException
430
  */
431
  protected function processAsMolliePayment(
473
  $paymentObject = $this->apiHelper->getApiClient(
474
  $apiKey
475
  )->payments->create($data);
476
+ } catch (ApiException $e) {
477
  $message = $e->getMessage();
478
  $this->logger->log( LogLevel::DEBUG, $message);
479
  throw $e;
615
  'mollie-payments-for-woocommerce'
616
  )
617
  );
618
+ throw new ApiException(
619
  __('Failed switching subscriptions, no valid mandate.', 'mollie-payments-for-woocommerce')
620
  );
621
  }
677
  $this->noValidMandateForSubsSwitchFailure($orderId);
678
  }
679
  }
680
+ catch ( ApiException $e ) {
681
  if ( $e->getField() ) {
682
  throw $e;
683
  }
src/SDK/Api.php CHANGED
@@ -50,8 +50,7 @@ class Api
50
  }
51
 
52
  if (empty(self::$api_client) || $needToUpdateApiKey) {
53
- $httpClient = new WordPressHttpAdapter();
54
- $client = new MollieApiClient($httpClient);
55
  $client->setApiKey($apiKey);
56
  $client->setApiEndpoint($this->getApiEndpoint());
57
  $client->addVersionString('WooCommerce/' . get_option('woocommerce_version', 'Unknown'));
50
  }
51
 
52
  if (empty(self::$api_client) || $needToUpdateApiKey) {
53
+ $client = new MollieApiClient(null, new WordPressHttpAdapterPicker());
 
54
  $client->setApiKey($apiKey);
55
  $client->setApiEndpoint($this->getApiEndpoint());
56
  $client->addVersionString('WooCommerce/' . get_option('woocommerce_version', 'Unknown'));
src/SDK/WordPressHttpAdapterPicker.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ declare(strict_types=1);
4
+
5
+ namespace Mollie\WooCommerce\SDK;
6
+
7
+ use Mollie\Api\HttpAdapter\MollieHttpAdapterPickerInterface;
8
+
9
+ class WordPressHttpAdapterPicker implements MollieHttpAdapterPickerInterface
10
+ {
11
+ public function pickHttpAdapter($httpClient)
12
+ {
13
+ if($httpClient === null ){
14
+ return new WordPressHttpAdapter();
15
+ }
16
+ return $httpClient;
17
+ }
18
+ }
src/Shared/SharedModule.php CHANGED
@@ -29,7 +29,7 @@ class SharedModule implements ServiceModule
29
  },
30
  'shared.plugin_version' => static function (): string {
31
  //Get plugin version
32
- return '7.0.3';
33
  },
34
  'shared.plugin_title' => static function (): string {
35
  //Get plugin version
29
  },
30
  'shared.plugin_version' => static function (): string {
31
  //Get plugin version
32
+ return '7.0.4';
33
  },
34
  'shared.plugin_title' => static function (): string {
35
  //Get plugin version