@@ -100,6 +102,7 @@
@@ -109,6 +112,7 @@
@@ -119,7 +123,7 @@
- {{ $tc('mollie-payments.refund-manager.cart.roundDiffItemAdded') }} ({{ roundingDiff | currency(order.currency.shortName) }})
+ {{ $tc('mollie-payments.refund-manager.cart.roundDiffItemAdded') }} ({{ currencyFilter( roundingDiff , order.currency.isoCode, order.totalRounding.decimals) }})
{# --------------------------------------------------------------------------------------------- #}
@@ -250,10 +254,10 @@
{{ $tc('mollie-payments.refund-manager.summary.captionTotal') }}
- {{ order.amountNet | currency(order.currency.shortName) }}
+ {{ currencyFilter( order.amountNet , order.currency.isoCode, order.totalRounding.decimals) }}
- {{ order.amountTotal | currency(order.currency.shortName) }}
+ {{ currencyFilter( order.amountTotal , order.currency.isoCode, order.totalRounding.decimals) }}
{% endblock %}
@@ -264,7 +268,7 @@
- {{ order.positionPrice | currency(order.currency.translated.shortName) }}
+ {{ currencyFilter( order.positionPrice , order.currency.isoCode, order.totalRounding.decimals) }}
{% endblock %}
@@ -276,7 +280,7 @@
- ({{ roundingDiff | currency(order.currency.shortName) }})
+ ({{ currencyFilter( roundingDiff , order.currency.isoCode, order.totalRounding.decimals) }})
{% endblock %}
@@ -287,7 +291,7 @@
- - {{ voucherAmount | currency(order.currency.shortName) }}
+ - {{ currencyFilter( voucherAmount , order.currency.isoCode, order.totalRounding.decimals) }}
{% endblock %}
@@ -297,7 +301,7 @@
- - {{ pendingRefunds | currency(order.currency.shortName) }}
+ - {{ currencyFilter( pendingRefunds , order.currency.isoCode, order.totalRounding.decimals) }}
{% endblock %}
{% block sw_order_line_items_grid_refund_summary_amount_refunded %}
@@ -306,7 +310,7 @@
- - {{ refundedAmount | currency(order.currency.shortName) }}
+ - {{ currencyFilter( refundedAmount , order.currency.isoCode, order.totalRounding.decimals) }}
{% endblock %}
{% block sw_order_line_items_grid_refund_summary_amount_remaining %}
@@ -318,7 +322,7 @@
- = {{ remainingAmount | currency(order.currency.shortName) }}
+ = {{ currencyFilter( remainingAmount , order.currency.isoCode, order.totalRounding.decimals) }}
{% endblock %}
@@ -330,8 +334,11 @@
numberType="float"
size="medium"
v-model="refundAmount"
+ v-model:value="refundAmount"
:min="0"
- :class="{ 'tutorial-active' : tutorialPartialAmountRefundVisible || tutorialPartialQuantityVisible || tutorialPartialPromotionsVisible || tutorialRefundShipping }">
+ :class="{ 'tutorial-active' : tutorialPartialAmountRefundVisible || tutorialPartialQuantityVisible || tutorialPartialPromotionsVisible || tutorialRefundShipping }"
+ class="refund-amount"
+ >
{{ order.currency.symbol }}
@@ -347,7 +354,8 @@
@@ -356,7 +364,8 @@
@@ -364,6 +373,7 @@
{# --------------------------------------------------------------------------------------------- #}
@@ -412,7 +422,7 @@
:isLoading="isRefundDataLoading">
- {{ item.amount.value | currency(item.amount.currency) }}
+ {{ currencyFilter( item.amount.value , order.currency.isoCode, order.totalRounding.decimals) }}
@@ -430,7 +440,7 @@
- {{ item.createdAt | date({hour: '2-digit', minute: '2-digit'}) }}
+ {{ dateFilter(item.createdAt, { hour: '2-digit', minute: '2-digit' }) }}
+ v-model="item.selected"
+ v-model:value="item.selected"
+ >
+ v-model="item.quantity"
+ v-model:value="item.quantity"
+ >
@@ -48,7 +52,7 @@
{% block sw_order_line_items_grid_grid_mollie_ship_item_modal_tracking %}
-
diff --git a/src/Resources/app/administration/src/module/mollie-payments/components/mollie-tracking-info/mollie-tracking-info.html.twig b/src/Resources/app/administration/src/module/mollie-payments/components/mollie-tracking-info/mollie-tracking-info.html.twig
index 5841c9c39..c4f452706 100644
--- a/src/Resources/app/administration/src/module/mollie-payments/components/mollie-tracking-info/mollie-tracking-info.html.twig
+++ b/src/Resources/app/administration/src/module/mollie-payments/components/mollie-tracking-info/mollie-tracking-info.html.twig
@@ -18,15 +18,15 @@
-
-
-
diff --git a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/component/sw-order-line-items-grid/sw-order-line-items-grid.html.twig b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/component/sw-order-line-items-grid/sw-order-line-items-grid.html.twig
index 2d892fbe6..779ed4e09 100644
--- a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/component/sw-order-line-items-grid/sw-order-line-items-grid.html.twig
+++ b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/component/sw-order-line-items-grid/sw-order-line-items-grid.html.twig
@@ -117,12 +117,6 @@ SHOPWARE 6.4
{% endblock %}
-{% block sw_order_line_items_grid_grid_actions %}
- {% parent %}
-
- {% block sw_order_line_items_grid_grid_actions_modals_items %}{% endblock %}
-
-{% endblock %}
{% block sw_order_line_items_grid_grid_actions_modals_items %}
{% parent %}
@@ -160,7 +154,9 @@ SHOPWARE 6.4
:step="1"
:min="0"
:max="shippableQuantity(item)"
- v-model="shipQuantity">
+ v-model:value="shipQuantity"
+ v-model="shipQuantity"
+ >
{{ $tc('mollie-payments.modals.shipping.item.summary.quantity') }}
@@ -175,7 +171,7 @@ SHOPWARE 6.4
{% endblock %}
{% block sw_order_line_items_grid_grid_mollie_ship_item_modal_tracking %}
-
diff --git a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-base/index.js b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-base/index.js
index 0ff6ca29d..20a77d587 100644
--- a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-base/index.js
+++ b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-base/index.js
@@ -3,7 +3,7 @@ import OrderAttributes from '../../../../../../core/models/OrderAttributes';
import MollieShippingEvents from '../../../../components/mollie-ship-order/MollieShippingEvents';
// eslint-disable-next-line no-undef
-const {Component, Mixin} = Shopware;
+const {Component, Mixin, Filter} = Shopware;
Component.override('sw-order-detail-base', {
template,
@@ -41,6 +41,10 @@ Component.override('sw-order-detail-base', {
const attr = new OrderAttributes(this.order);
return attr.isMollieOrder();
},
+
+ currencyFilter() {
+ return Filter.getByName('currency');
+ },
},
watch: {
diff --git a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-base/sw-order-detail-base.html.twig b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-base/sw-order-detail-base.html.twig
index d26adab7f..9ad2b1efa 100644
--- a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-base/sw-order-detail-base.html.twig
+++ b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-base/sw-order-detail-base.html.twig
@@ -14,21 +14,21 @@ SHOPWARE 6.4
{{ $tc('sw-order.detailExtended.totalRefunds') }}
- {{ refundedAmount | currency(order.currency.shortName) }}
+ {{ currencyFilter( refundedAmount, order.currency.isoCode, order.totalRounding.decimals) }}
{{ $tc('sw-order.detailExtended.totalRefundsPending') }}
- {{ refundAmountPending | currency(order.currency.shortName) }}
+ {{ currencyFilter( refundAmountPending, order.currency.isoCode, order.totalRounding.decimals) }}
{{ $tc('sw-order.detailExtended.totalShipments', 0, { quantity: shippedQuantity }) }}
- {{ shippedAmount | currency(order.currency.shortName) }}
+ {{ currencyFilter( shippedAmount, order.currency.isoCode, order.totalRounding.decimals) }}
{% endblock %}
diff --git a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-general/index.js b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-general/index.js
index 9ca91b566..1ddccfe91 100644
--- a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-general/index.js
+++ b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-general/index.js
@@ -6,7 +6,7 @@ import MollieShipping from '../../../../components/mollie-ship-order/MollieShipp
import MollieShippingEvents from '../../../../components/mollie-ship-order/MollieShippingEvents';
// eslint-disable-next-line no-undef
-const {Component, Mixin} = Shopware;
+const {Component, Mixin, Filter} = Shopware;
Component.override('sw-order-detail-general', {
template,
@@ -135,6 +135,10 @@ Component.override('sw-order-detail-general', {
return this.molliePaymentUrl !== '';
},
+ currencyFilter() {
+ return Filter.getByName('currency');
+ },
+
},
watch: {
diff --git a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-general/sw-order-detail-general.html.twig b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-general/sw-order-detail-general.html.twig
index 74fe784fe..c71dc655e 100644
--- a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-general/sw-order-detail-general.html.twig
+++ b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-general/sw-order-detail-general.html.twig
@@ -159,18 +159,18 @@ SHOPWARE 6.5
{{ $tc('sw-order.detailExtended.totalRefunds') }}
- {{ refundedAmount | currency(order.currency.shortName) }}
+ {{ currencyFilter( refundedAmount, order.currency.isoCode, order.totalRounding.decimals) }}
{{ $tc('sw-order.detailExtended.totalRefundsPending') }}
- {{ refundAmountPending | currency(order.currency.shortName) }}
+ {{ currencyFilter( refundAmountPending, order.currency.isoCode, order.totalRounding.decimals) }}
{{ $tc('sw-order.detailExtended.totalShipments', 0, { quantity: shippedQuantity }) }}
- {{ shippedAmount | currency(order.currency.shortName) }}
+ {{ currencyFilter( shippedAmount, order.currency.isoCode, order.totalRounding.decimals) }}
{% endblock %}
diff --git a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-settings/components/sw-system-config/index.js b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-settings/components/sw-system-config/index.js
new file mode 100644
index 000000000..518c0255b
--- /dev/null
+++ b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-settings/components/sw-system-config/index.js
@@ -0,0 +1,12 @@
+
+// eslint-disable-next-line no-undef
+const {Component} = Shopware;
+
+Component.override('sw-system-config', {
+ provide() {
+ return {
+ 'actualConfigData': this.actualConfigData,
+ 'currentSalesChannelId':this.currentSalesChannelId, //TODO: currentSalesChannelId is not reactive and does not change when you select a new saleschannel in config. because of this the preview does work only for all saleschannels but not for a specific one. we have to fix the preview later
+ };
+ },
+});
\ No newline at end of file
diff --git a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-settings/index.js b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-settings/index.js
new file mode 100644
index 000000000..6a996f1f0
--- /dev/null
+++ b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-settings/index.js
@@ -0,0 +1 @@
+import './components/sw-system-config';
\ No newline at end of file
diff --git a/src/Resources/app/administration/src/module/mollie-payments/index.js b/src/Resources/app/administration/src/module/mollie-payments/index.js
index 433f91e1a..300bfb80d 100644
--- a/src/Resources/app/administration/src/module/mollie-payments/index.js
+++ b/src/Resources/app/administration/src/module/mollie-payments/index.js
@@ -1,6 +1,7 @@
import './acl';
import './extension/sw-customer';
import './extension/sw-order';
+import './extension/sw-settings';
import './components/mollie-pluginconfig-element-orderstate-select';
import './components/mollie-pluginconfig-section-info';
import './components/mollie-pluginconfig-section-api';
diff --git a/src/Resources/app/administration/src/module/mollie-payments/page/mollie-subscriptions-detail/index.js b/src/Resources/app/administration/src/module/mollie-payments/page/mollie-subscriptions-detail/index.js
index 5e431bedc..89ca7c41a 100644
--- a/src/Resources/app/administration/src/module/mollie-payments/page/mollie-subscriptions-detail/index.js
+++ b/src/Resources/app/administration/src/module/mollie-payments/page/mollie-subscriptions-detail/index.js
@@ -3,7 +3,7 @@ import './mollie-subscriptions-detail.scss';
import SubscriptionService from '../../../../core/service/subscription/subscription.service';
// eslint-disable-next-line no-undef
-const {Component, Mixin, Application, ApiService} = Shopware;
+const {Component, Mixin, Application, ApiService, Filter} = Shopware;
// eslint-disable-next-line no-undef
const {Criteria} = Shopware.Data;
@@ -124,6 +124,10 @@ Component.register('mollie-subscriptions-detail', {
return this.$tc('mollie-payments.subscriptions.detail.history.cardTitle') + ' (' + this.history.length + ')';
},
+
+ dateFilter() {
+ return Filter.getByName('date');
+ },
},
created() {
@@ -150,6 +154,7 @@ Component.register('mollie-subscriptions-detail', {
criteria.addAssociation('addresses');
criteria.addAssociation('historyEntries');
criteria.addAssociation('customer');
+ criteria.addAssociation('currency');
// eslint-disable-next-line no-undef
this.repoSubscriptions.search(criteria, Shopware.Context.api).then((result) => {
diff --git a/src/Resources/app/administration/src/module/mollie-payments/page/mollie-subscriptions-detail/mollie-subscriptions-detail.html.twig b/src/Resources/app/administration/src/module/mollie-payments/page/mollie-subscriptions-detail/mollie-subscriptions-detail.html.twig
index 74ac6e42c..32840cee4 100644
--- a/src/Resources/app/administration/src/module/mollie-payments/page/mollie-subscriptions-detail/mollie-subscriptions-detail.html.twig
+++ b/src/Resources/app/administration/src/module/mollie-payments/page/mollie-subscriptions-detail/mollie-subscriptions-detail.html.twig
@@ -71,7 +71,7 @@
{% block sw_order_detail_card_basic_field_description %}
-
@@ -80,7 +80,7 @@
{% block sw_order_detail_card_basic_field_amount %}
-
@@ -89,7 +89,7 @@
{% endblock %}
{% block sw_order_detail_card_basic_field_quantity %}
-
@@ -97,13 +97,13 @@
{% block sw_order_detail_card_basic_field_customer_name %}
-
{% endblock %}
{% block sw_order_detail_card_basic_field_mollie_customer_id %}
-
@@ -111,7 +111,8 @@
{% block sw_order_detail_card_basic_field_created_at %}
-
@@ -135,43 +136,49 @@
{% block sw_order_detail_card_status_field_status %}
-
{% endblock %}
{% block sw_order_detail_card_status_field_canceled_at %}
-
{% endblock %}
{% block sw_order_detail_card_status_field_mollie_id %}
-
{% endblock %}
{% block sw_order_detail_card_status_field_mandate_id %}
-
{% endblock %}
{% block sw_order_detail_card_status_field_next_payment_at %}
-
{% endblock %}
{% block sw_order_detail_card_status_field_reminded_at %}
{% endblock %}
@@ -216,7 +223,7 @@
:allowInlineEdit="false">
- {{ item.createdAt | date({hour: '2-digit',minute: '2-digit',day: '2-digit',month: '2-digit',year: 'numeric'}) }}
+ {{ dateFilter(item.createdAt, { hour: '2-digit', minute: '2-digit', day: '2-digit',month: '2-digit',year: 'numeric' }) }}
{% block sw_order_detail_card_history_grid_columns %}
diff --git a/src/Resources/app/administration/src/module/mollie-payments/page/mollie-subscriptions-list/index.js b/src/Resources/app/administration/src/module/mollie-payments/page/mollie-subscriptions-list/index.js
index 91467c61d..e61a7ee11 100755
--- a/src/Resources/app/administration/src/module/mollie-payments/page/mollie-subscriptions-list/index.js
+++ b/src/Resources/app/administration/src/module/mollie-payments/page/mollie-subscriptions-list/index.js
@@ -4,7 +4,7 @@ import MollieSubscriptionGrid from './grids/MollieSubscriptionGrid';
import SubscriptionService from '../../../../core/service/subscription/subscription.service';
// eslint-disable-next-line no-undef
-const {Component, Mixin, Application} = Shopware;
+const {Component, Mixin, Application, Filter} = Shopware;
// eslint-disable-next-line no-undef
const {Criteria} = Shopware.Data;
@@ -102,6 +102,14 @@ Component.register('mollie-subscriptions-list', {
refresh: map.has('icons-regular-undo') ? 'regular-undo' : 'default-arrow-360-left',
};
},
+ currencyFilter() {
+ return Filter.getByName('currency');
+ },
+
+
+ dateFilter() {
+ return Filter.getByName('date');
+ },
},
methods: {
@@ -133,6 +141,7 @@ Component.register('mollie-subscriptions-list', {
criteria.addSorting(Criteria.sort(this.sortBy, this.sortDirection, this.naturalSorting));
criteria.addAssociation('customer');
+ criteria.addAssociation('currency');
// eslint-disable-next-line no-undef
this.repoSubscriptions.search(criteria, Shopware.Context.api).then((result) => {
diff --git a/src/Resources/app/administration/src/module/mollie-payments/page/mollie-subscriptions-list/mollie-subscriptions-list.html.twig b/src/Resources/app/administration/src/module/mollie-payments/page/mollie-subscriptions-list/mollie-subscriptions-list.html.twig
index 7d7476199..c18a4753a 100755
--- a/src/Resources/app/administration/src/module/mollie-payments/page/mollie-subscriptions-list/mollie-subscriptions-list.html.twig
+++ b/src/Resources/app/administration/src/module/mollie-payments/page/mollie-subscriptions-list/mollie-subscriptions-list.html.twig
@@ -62,7 +62,7 @@
{% block mollie_payments_subscription_list_content_amount %}
- {{ item.amount | currency(item.currency) }}
+ {{ currencyFilter( item.amount , item.currency.isoCode, item.totalRounding.decimals) }}
{% endblock %}
@@ -81,27 +81,27 @@
{% block mollie_payments_subscription_list_content_next_payment_date %}
- {{ item.nextPaymentAt | date({hour: '2-digit',minute: '2-digit',day: '2-digit',month: '2-digit',year: 'numeric'}) }}
+ {{ dateFilter(item.nextPaymentAt, { hour: '2-digit', minute: '2-digit', day: '2-digit',month: '2-digit',year: 'numeric' }) }}
{% endblock %}
{% block mollie_payments_subscription_list_content_pre_payment_reminder %}
- {{ item.lastRemindedAt | date({hour: '2-digit',minute: '2-digit',day: '2-digit',month: '2-digit',year: 'numeric'}) }}
+ {{ dateFilter(item.lastRemindedAt, { hour: '2-digit', minute: '2-digit', day: '2-digit',month: '2-digit',year: 'numeric' }) }}
{% endblock %}
{% block mollie_payments_subscription_list_content_created_at %}
- {{ item.createdAt | date({hour: '2-digit',minute: '2-digit',day: '2-digit',month: '2-digit',year: 'numeric'}) }}
+ {{ dateFilter(item.createdAt, { hour: '2-digit', minute: '2-digit', day: '2-digit',month: '2-digit',year: 'numeric' }) }}
{% endblock %}
{% block mollie_payments_subscription_list_content_canceled_at %}
- {{ item.canceledAt | date({hour: '2-digit',minute: '2-digit',day: '2-digit',month: '2-digit',year: 'numeric'}) }}
+ {{ dateFilter(item.canceledAt, { hour: '2-digit', minute: '2-digit', day: '2-digit',month: '2-digit',year: 'numeric' }) }}
{% endblock %}
diff --git a/src/Resources/app/administration/src/module/mollie-payments/rules/mollie-cart-subscription-rule/mollie-cart-subscription-rule.html.twig b/src/Resources/app/administration/src/module/mollie-payments/rules/mollie-cart-subscription-rule/mollie-cart-subscription-rule.html.twig
index 088d5d605..4809f297c 100644
--- a/src/Resources/app/administration/src/module/mollie-payments/rules/mollie-cart-subscription-rule/mollie-cart-subscription-rule.html.twig
+++ b/src/Resources/app/administration/src/module/mollie-payments/rules/mollie-cart-subscription-rule/mollie-cart-subscription-rule.html.twig
@@ -3,6 +3,7 @@
id="mollie-cart-subscription-rule"
size="medium"
:options="selectValues"
+ v-model:value="isSubscription"
v-model="isSubscription"
class="field--main">
diff --git a/src/Resources/app/administration/src/module/mollie-payments/rules/mollie-lineitem-subscription-rule/mollie-lineitem-subscription-rule.html.twig b/src/Resources/app/administration/src/module/mollie-payments/rules/mollie-lineitem-subscription-rule/mollie-lineitem-subscription-rule.html.twig
index 8a93d3378..e85a56e71 100644
--- a/src/Resources/app/administration/src/module/mollie-payments/rules/mollie-lineitem-subscription-rule/mollie-lineitem-subscription-rule.html.twig
+++ b/src/Resources/app/administration/src/module/mollie-payments/rules/mollie-lineitem-subscription-rule/mollie-lineitem-subscription-rule.html.twig
@@ -3,6 +3,7 @@
id="mollie-lineitem-subscription-rule"
size="medium"
:options="selectValues"
+ v-model:value="isSubscription"
v-model="isSubscription"
class="field--main">
diff --git a/src/Resources/app/administration/src/module/sw-product/view/sw-product-detail-mollie/sw-product-detail-mollie.html.twig b/src/Resources/app/administration/src/module/sw-product/view/sw-product-detail-mollie/sw-product-detail-mollie.html.twig
index f03a8ec24..749b0b088 100644
--- a/src/Resources/app/administration/src/module/sw-product/view/sw-product-detail-mollie/sw-product-detail-mollie.html.twig
+++ b/src/Resources/app/administration/src/module/sw-product/view/sw-product-detail-mollie/sw-product-detail-mollie.html.twig
@@ -32,6 +32,7 @@
@@ -93,6 +94,7 @@
@@ -114,6 +116,7 @@
@@ -128,6 +131,7 @@
@@ -147,6 +151,7 @@
diff --git a/src/Resources/app/administration/tests/core/models/ProductAttributes.spec.js b/src/Resources/app/administration/tests/core/models/ProductAttributes.spec.js
index 840ab4db8..53ca35427 100644
--- a/src/Resources/app/administration/tests/core/models/ProductAttributes.spec.js
+++ b/src/Resources/app/administration/tests/core/models/ProductAttributes.spec.js
@@ -1,4 +1,4 @@
-import ProductAttributes from "../../../src/core/models/ProductAttributes";
+import ProductAttributes from '../../../src/core/models/ProductAttributes';
test('Attributes do not crash with NULL custom fields', () => {
diff --git a/src/Resources/app/administration/tests/core/service/product/ProductService.spec.js b/src/Resources/app/administration/tests/core/service/product/ProductService.spec.js
index 77eeb806d..93b242cf7 100644
--- a/src/Resources/app/administration/tests/core/service/product/ProductService.spec.js
+++ b/src/Resources/app/administration/tests/core/service/product/ProductService.spec.js
@@ -1,5 +1,5 @@
-import ProductService from "../../../../src/core/service/product/product.service";
-import ProductAttributes from "../../../../src/core/models/ProductAttributes";
+import ProductService from '../../../../src/core/service/product/product.service';
+import ProductAttributes from '../../../../src/core/models/ProductAttributes';
const productService = new ProductService();
diff --git a/src/Resources/app/administration/tests/core/utils/array-utils.service.spec.js b/src/Resources/app/administration/tests/core/utils/array-utils.service.spec.js
index f44e0e620..c0138291d 100644
--- a/src/Resources/app/administration/tests/core/utils/array-utils.service.spec.js
+++ b/src/Resources/app/administration/tests/core/utils/array-utils.service.spec.js
@@ -1,4 +1,4 @@
-import ArrayUtilsService from "../../../src/core/service/utils/array-utils.service";
+import ArrayUtilsService from '../../../src/core/service/utils/array-utils.service';
const utils = new ArrayUtilsService();
diff --git a/src/Resources/app/administration/tests/core/utils/string-utils.service.spec.js b/src/Resources/app/administration/tests/core/utils/string-utils.service.spec.js
index e502a5342..7962e2cb6 100644
--- a/src/Resources/app/administration/tests/core/utils/string-utils.service.spec.js
+++ b/src/Resources/app/administration/tests/core/utils/string-utils.service.spec.js
@@ -1,4 +1,4 @@
-import StringUtils from "../../../src/core/service/utils/string-utils.service";
+import StringUtils from '../../../src/core/service/utils/string-utils.service';
const stringUtils = new StringUtils();
diff --git a/src/Resources/app/storefront/src/mollie-payments/plugins/apple-pay-direct.plugin.js b/src/Resources/app/storefront/src/mollie-payments/plugins/apple-pay-direct.plugin.js
index d4abb1394..ab95242ec 100644
--- a/src/Resources/app/storefront/src/mollie-payments/plugins/apple-pay-direct.plugin.js
+++ b/src/Resources/app/storefront/src/mollie-payments/plugins/apple-pay-direct.plugin.js
@@ -21,11 +21,9 @@ export default class MollieApplePayDirect extends Plugin {
// register our off-canvas listener
// we need to re-init all apple pay button
// once the offcanvas is loaded (lazy) into the DOM
- const elementOffcanvas = document.querySelector('[data-offcanvas-cart]');
- if (elementOffcanvas instanceof HTMLElement) {
- const pluginOffCanvas = window.PluginManager.getPluginInstanceFromElement(elementOffcanvas, 'OffCanvasCart');
- pluginOffCanvas.$emitter.subscribe('offCanvasOpened', me.onOffCanvasOpened.bind(me));
- }
+
+ const pluginOffCanvas = window.PluginManager.getPluginList().OffCanvasCart.get("instances")[0];
+ pluginOffCanvas.$emitter.subscribe('offCanvasOpened', me.onOffCanvasOpened.bind(me));
// now update our current page
this.initCurrentPage();
@@ -58,10 +56,12 @@ export default class MollieApplePayDirect extends Plugin {
if (!window.ApplePaySession || !window.ApplePaySession.canMakePayments()) {
// hide our wrapping Apple Pay containers
// to avoid any wrong margins being displayed
+
if (applePayContainers) {
- for (let i = 0; i < applePayContainers.length; i++) {
- applePayContainers[i].style.display = 'none';
- }
+ applePayContainers.forEach(function (container){
+ container.style.display = 'none';
+ container.classList.add('d-none');
+ });
}
return;
}
@@ -74,8 +74,8 @@ export default class MollieApplePayDirect extends Plugin {
// we start by fetching the shop url from the data attribute.
// we need this as prefix for our ajax calls, so that we always
// call the correct sales channel and its controllers.
- const button = applePayButtons[0];
- const shopUrl = me.getShopUrl(button);
+
+ const shopUrl = me.getShopUrl(applePayButtons[0]);
// verify if apple pay is even allowed
// in our current sales channel
@@ -86,6 +86,10 @@ export default class MollieApplePayDirect extends Plugin {
return;
}
+ applePayContainers.forEach(function (container){
+ container.classList.remove('d-none');
+ });
+
applePayButtons.forEach(function (button) {
// Remove display none
button.classList.remove('d-none');
diff --git a/src/Resources/app/storefront/src/mollie-payments/plugins/apple-pay-direct.plugin.scss b/src/Resources/app/storefront/src/mollie-payments/plugins/apple-pay-direct.plugin.scss
index a7c9af5b0..4d31f4e98 100644
--- a/src/Resources/app/storefront/src/mollie-payments/plugins/apple-pay-direct.plugin.scss
+++ b/src/Resources/app/storefront/src/mollie-payments/plugins/apple-pay-direct.plugin.scss
@@ -34,6 +34,7 @@
min-height: 32px;
max-height: 64px;
}
+
.apple-pay-button-black-with-text {
background-color: black;
color: white;
@@ -75,4 +76,8 @@
margin-left: calc(2px * var(--apple-pay-scale));
border: none;
}
+}
+
+.d-none{
+ display:none !important;
}
\ No newline at end of file
diff --git a/src/Resources/config/compatibility/base.xml b/src/Resources/config/compatibility/base.xml
deleted file mode 100644
index 3a65c2d88..000000000
--- a/src/Resources/config/compatibility/base.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
- %kernel.shopware_version%
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Resources/config/compatibility/controller_6.5.xml b/src/Resources/config/compatibility/controller_6.5.xml
deleted file mode 100644
index 3d59f398e..000000000
--- a/src/Resources/config/compatibility/controller_6.5.xml
+++ /dev/null
@@ -1,235 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Resources/config/compatibility/routes/sw6/routes.xml b/src/Resources/config/compatibility/routes/sw6/routes.xml
deleted file mode 100644
index 0e6babde5..000000000
--- a/src/Resources/config/compatibility/routes/sw6/routes.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/Resources/config/compatibility/routes/sw65/routes.xml b/src/Resources/config/compatibility/routes/sw65/routes.xml
deleted file mode 100644
index 466f68e74..000000000
--- a/src/Resources/config/compatibility/routes/sw65/routes.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
diff --git a/src/Resources/config/compatibility/services_6.2.xml b/src/Resources/config/compatibility/services_6.2.xml
deleted file mode 100644
index e69de29bb..000000000
diff --git a/src/Resources/config/compatibility/services_6.3.5.0.xml b/src/Resources/config/compatibility/services_6.3.5.0.xml
deleted file mode 100644
index 6ea7930c7..000000000
--- a/src/Resources/config/compatibility/services_6.3.5.0.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Resources/config/compatibility/services_6.4.xml b/src/Resources/config/compatibility/services_6.4.xml
deleted file mode 100644
index aaf9560fd..000000000
--- a/src/Resources/config/compatibility/services_6.4.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Resources/config/compatibility/snippets_6.5.xml b/src/Resources/config/compatibility/snippets_6.5.xml
deleted file mode 100644
index f18487b10..000000000
--- a/src/Resources/config/compatibility/snippets_6.5.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Resources/config/routes.xml b/src/Resources/config/routes.xml
index 0b0630af4..0760c8dd5 100644
--- a/src/Resources/config/routes.xml
+++ b/src/Resources/config/routes.xml
@@ -3,5 +3,5 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/routing
https://symfony.com/schema/routing/routing-1.0.xsd">
-
+
diff --git a/src/Resources/config/routes/admin-api/config.xml b/src/Resources/config/routes/admin-api/config.xml
new file mode 100644
index 000000000..1fb24a29a
--- /dev/null
+++ b/src/Resources/config/routes/admin-api/config.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+ Kiener\MolliePayments\Controller\Api\PluginConfig\ConfigControllerBase::testApiKeys
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\PluginConfig\ConfigControllerBase::testApiKeys64
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\PluginConfig\ConfigControllerBase::validateFlowBuilder
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\PluginConfig\ConfigControllerBase::getRefundManagerConfig
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\PluginConfig\ConfigControllerBase::getRefundManagerConfigLegacy
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\PluginConfig\ConfigControllerBase::getSubscriptionConfig
+ api
+ true
+ true
+
+
+
\ No newline at end of file
diff --git a/src/Resources/config/routes/admin-api/order.xml b/src/Resources/config/routes/admin-api/order.xml
new file mode 100644
index 000000000..8163d0007
--- /dev/null
+++ b/src/Resources/config/routes/admin-api/order.xml
@@ -0,0 +1,19 @@
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\OrderControllerBase::paymentUrl
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\OrderControllerBase::paymentUrlLegacy
+ api
+ true
+ true
+
+
diff --git a/src/Resources/config/routes/admin-api/payment_method.xml b/src/Resources/config/routes/admin-api/payment_method.xml
new file mode 100644
index 000000000..9169bc0c4
--- /dev/null
+++ b/src/Resources/config/routes/admin-api/payment_method.xml
@@ -0,0 +1,21 @@
+
+
+
+
+ Kiener\MolliePayments\Controller\Api\PaymentMethod\PaymentMethodControllerBase::updatePaymentMethods
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\PaymentMethod\PaymentMethodControllerBase::updatePaymentMethodsLegacy
+ api
+ true
+ true
+
+
+
diff --git a/src/Resources/config/routes/admin-api/refund.xml b/src/Resources/config/routes/admin-api/refund.xml
new file mode 100644
index 000000000..e952ff1ea
--- /dev/null
+++ b/src/Resources/config/routes/admin-api/refund.xml
@@ -0,0 +1,82 @@
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\RefundControllerBase::refundOrderNumber
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\RefundControllerBase::refundManagerData
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\RefundControllerBase::list
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\RefundControllerBase::total
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\RefundControllerBase::refundOrderID
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\RefundControllerBase::cancel
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\RefundControllerBase::refundManagerDataLegacy
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\RefundControllerBase::listLegacy
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\RefundControllerBase::totalLegacy
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\RefundControllerBase::refundLegacy
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\RefundControllerBase::cancelLegacy
+ api
+ true
+ true
+
+
diff --git a/src/Resources/config/routes/admin-api/return.xml b/src/Resources/config/routes/admin-api/return.xml
new file mode 100644
index 000000000..f23b5ee55
--- /dev/null
+++ b/src/Resources/config/routes/admin-api/return.xml
@@ -0,0 +1,19 @@
+
+
+
+ Kiener\MolliePayments\Controller\Api\Payment\ReturnControllerBase::returnAction
+ api
+ false
+ false
+
+
+
+ Kiener\MolliePayments\Controller\Api\Payment\ReturnControllerBase::returnActionLegacy
+ api
+ false
+ false
+
+
diff --git a/src/Resources/config/routes/admin-api/shipping.xml b/src/Resources/config/routes/admin-api/shipping.xml
new file mode 100644
index 000000000..41ae4ea5c
--- /dev/null
+++ b/src/Resources/config/routes/admin-api/shipping.xml
@@ -0,0 +1,99 @@
+
+
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\ShippingControllerBase::status
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\ShippingControllerBase::statusLegacy
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\ShippingControllerBase::total
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\ShippingControllerBase::totalLegacy
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\ShippingControllerBase::shipOrderOperational
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\ShippingControllerBase::shipOrderOperationalDeprecated
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\ShippingControllerBase::shipOrderBatchOperational
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\ShippingControllerBase::shipItemOperational
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\ShippingControllerBase::shipItemOperationalDeprecated
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\ShippingControllerBase::shipOrderAdmin
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\ShippingControllerBase::shipOrderAdminLegacy
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\ShippingControllerBase::shipItemAdmin
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Order\ShippingControllerBase::shipItemAdminLegacy
+ api
+ true
+ true
+
+
+
diff --git a/src/Resources/config/routes/admin-api/subscription.xml b/src/Resources/config/routes/admin-api/subscription.xml
new file mode 100644
index 000000000..02d652105
--- /dev/null
+++ b/src/Resources/config/routes/admin-api/subscription.xml
@@ -0,0 +1,63 @@
+
+
+
+
+ Kiener\MolliePayments\Controller\Api\Subscription\SubscriptionControllerBase::cancel
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Subscription\SubscriptionControllerBase::cancelLegacy
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Subscription\SubscriptionControllerBase::pause
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Subscription\SubscriptionControllerBase::pauseLegacy
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Subscription\SubscriptionControllerBase::resume
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Subscription\SubscriptionControllerBase::resumeLegacy
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Subscription\SubscriptionControllerBase::skip
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Subscription\SubscriptionControllerBase::skipLegacy
+ api
+ true
+ true
+
+
+
diff --git a/src/Resources/config/routes/admin-api/support.xml b/src/Resources/config/routes/admin-api/support.xml
new file mode 100644
index 000000000..a033c838a
--- /dev/null
+++ b/src/Resources/config/routes/admin-api/support.xml
@@ -0,0 +1,21 @@
+
+
+
+
+ Kiener\MolliePayments\Controller\Api\Support\SupportControllerBase::requestSupport
+ api
+ true
+ true
+
+
+
+ Kiener\MolliePayments\Controller\Api\Support\SupportControllerBase::requestSupportLegacy
+ api
+ true
+ true
+
+
+
diff --git a/src/Resources/config/routes/admin-api/webhook.xml b/src/Resources/config/routes/admin-api/webhook.xml
new file mode 100644
index 000000000..9268f416a
--- /dev/null
+++ b/src/Resources/config/routes/admin-api/webhook.xml
@@ -0,0 +1,62 @@
+
+
+
+
+ Kiener\MolliePayments\Controller\Api\Webhook\WebhookControllerBase::webhookAction
+ api
+ false
+ false
+
+
+
+ Kiener\MolliePayments\Controller\Api\Webhook\WebhookControllerBase::webhookLegacyAction
+ api
+ false
+ false
+
+
+
+ Kiener\MolliePayments\Controller\Api\Webhook\WebhookControllerBase::webhookSubscriptionAction
+ api
+ false
+ false
+
+
+
+ Kiener\MolliePayments\Controller\Api\Webhook\WebhookControllerBase::webhookSubscriptionLegacyAction
+ api
+ false
+ false
+
+
+
+ Kiener\MolliePayments\Controller\Api\Webhook\WebhookControllerBase::webhookSubscriptionRenewAction
+ api
+ false
+ false
+
+
+
+ Kiener\MolliePayments\Controller\Api\Webhook\WebhookControllerBase::webhookSubscriptionRenewLegacyAction
+ api
+ false
+ false
+
+
+
+ Kiener\MolliePayments\Controller\Api\Webhook\WebhookControllerBase::webhookSubscriptionMandateUpdatedAction
+ api
+ false
+ false
+
+
+
+ Kiener\MolliePayments\Controller\Api\Webhook\WebhookControllerBase::webhookSubscriptionMandateUpdatedLegacyAction
+ api
+ false
+ false
+
+
diff --git a/src/Resources/config/routes/store-api/apple_pay_direct.xml b/src/Resources/config/routes/store-api/apple_pay_direct.xml
new file mode 100644
index 000000000..fd0103525
--- /dev/null
+++ b/src/Resources/config/routes/store-api/apple_pay_direct.xml
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\ApplePayDirect\ApplePayDirectControllerBase::isEnabled
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\ApplePayDirect\ApplePayDirectControllerBase::getId
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\ApplePayDirect\ApplePayDirectControllerBase::addProduct
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\ApplePayDirect\ApplePayDirectControllerBase::createPaymentSession
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\ApplePayDirect\ApplePayDirectControllerBase::getCart
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\ApplePayDirect\ApplePayDirectControllerBase::getShippingMethods
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\ApplePayDirect\ApplePayDirectControllerBase::setShippingMethod
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\ApplePayDirect\ApplePayDirectControllerBase::pay
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\ApplePayDirect\ApplePayDirectControllerBase::restoreCart
+ store-api
+
+
+
diff --git a/src/Resources/config/routes/store-api/config.xml b/src/Resources/config/routes/store-api/config.xml
new file mode 100644
index 000000000..f637f840f
--- /dev/null
+++ b/src/Resources/config/routes/store-api/config.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\Config\ConfigControllerBase::getConfig
+ store-api
+
+
diff --git a/src/Resources/config/routes/store-api/credit_card.xml b/src/Resources/config/routes/store-api/credit_card.xml
new file mode 100644
index 000000000..576548b72
--- /dev/null
+++ b/src/Resources/config/routes/store-api/credit_card.xml
@@ -0,0 +1,34 @@
+
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\CreditCard\CreditCardControllerBase::saveCardToken
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\CreditCard\CreditCardControllerBase::saveMandateId
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\CreditCard\CreditCardControllerBase::revokeMandate
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\CreditCard\CreditCardControllerBase::getMandates
+ store-api
+
+
diff --git a/src/Resources/config/routes/store-api/ideal.xml b/src/Resources/config/routes/store-api/ideal.xml
new file mode 100644
index 000000000..a5cc18668
--- /dev/null
+++ b/src/Resources/config/routes/store-api/ideal.xml
@@ -0,0 +1,21 @@
+
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\iDEAL\iDealControllerBase::getIssuers
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\iDEAL\iDealControllerBase::saveIssuer
+ store-api
+
+
+
diff --git a/src/Resources/config/routes/store-api/pos.xml b/src/Resources/config/routes/store-api/pos.xml
new file mode 100644
index 000000000..a37cb0f56
--- /dev/null
+++ b/src/Resources/config/routes/store-api/pos.xml
@@ -0,0 +1,20 @@
+
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\POS\PosControllerBase::getIssuers
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\POS\PosControllerBase::saveTerminalId
+ store-api
+
+
diff --git a/src/Resources/config/routes/store-api/subscription.xml b/src/Resources/config/routes/store-api/subscription.xml
new file mode 100644
index 000000000..5f97d3f3f
--- /dev/null
+++ b/src/Resources/config/routes/store-api/subscription.xml
@@ -0,0 +1,63 @@
+
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\Subscription\SubscriptionControllerBase::getSubscriptions
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\Subscription\SubscriptionControllerBase::updateBilling
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\Subscription\SubscriptionControllerBase::updateShipping
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\Subscription\SubscriptionControllerBase::updatePayment
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\Subscription\SubscriptionControllerBase::pause
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\Subscription\SubscriptionControllerBase::resume
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\Subscription\SubscriptionControllerBase::skip
+ store-api
+
+
+
+ Kiener\MolliePayments\Controller\StoreApi\Subscription\SubscriptionControllerBase::cancel
+ store-api
+
+
+
diff --git a/src/Resources/config/routes/storefront/account.xml b/src/Resources/config/routes/storefront/account.xml
new file mode 100644
index 000000000..688ad4725
--- /dev/null
+++ b/src/Resources/config/routes/storefront/account.xml
@@ -0,0 +1,73 @@
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\Account\AccountControllerBase::subscriptionsList
+ storefront
+ true
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\Account\AccountControllerBase::updateBilling
+ storefront
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\Account\AccountControllerBase::updateShipping
+ storefront
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\Account\AccountControllerBase::updatePaymentStart
+ storefront
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\Account\AccountControllerBase::updatePaymentFinish
+ storefront
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\Account\AccountControllerBase::pauseSubscription
+ storefront
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\Account\AccountControllerBase::skipSubscription
+ storefront
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\Account\AccountControllerBase::resumeSubscription
+ storefront
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\Account\AccountControllerBase::cancelSubscription
+ storefront
+
+
+
+
diff --git a/src/Resources/config/routes/storefront/apple_pay_direct.xml b/src/Resources/config/routes/storefront/apple_pay_direct.xml
new file mode 100644
index 000000000..ef6177a5d
--- /dev/null
+++ b/src/Resources/config/routes/storefront/apple_pay_direct.xml
@@ -0,0 +1,74 @@
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\ApplePayDirect\ApplePayDirectControllerBase::isPaymentAvailable
+ storefront
+ true
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\ApplePayDirect\ApplePayDirectControllerBase::getApplePayID
+ storefront
+ true
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\ApplePayDirect\ApplePayDirectControllerBase::addProduct
+ storefront
+ false
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\ApplePayDirect\ApplePayDirectControllerBase::createPaymentSession
+ storefront
+ false
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\ApplePayDirect\ApplePayDirectControllerBase::getShippingMethods
+ storefront
+ false
+ true
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\ApplePayDirect\ApplePayDirectControllerBase::setShippingMethod
+ storefront
+ false
+ true
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\ApplePayDirect\ApplePayDirectControllerBase::startPayment
+ storefront
+ false
+ true
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\ApplePayDirect\ApplePayDirectControllerBase::finishPayment
+ storefront
+ false
+ true
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\ApplePayDirect\ApplePayDirectControllerBase::restoreCart
+ storefront
+ false
+
+
+
+
diff --git a/src/Resources/config/routes/storefront/credit_card.xml b/src/Resources/config/routes/storefront/credit_card.xml
new file mode 100644
index 000000000..209ae9215
--- /dev/null
+++ b/src/Resources/config/routes/storefront/credit_card.xml
@@ -0,0 +1,24 @@
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\CreditCard\CreditCardControllerBase::storeCardToken
+ storefront
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\CreditCard\CreditCardControllerBase::storeMandateId
+ storefront
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\CreditCard\CreditCardControllerBase::revokeMandate
+ storefront
+
+
+
diff --git a/src/Resources/config/routes/storefront/ideal.xml b/src/Resources/config/routes/storefront/ideal.xml
new file mode 100644
index 000000000..dc9fe5d92
--- /dev/null
+++ b/src/Resources/config/routes/storefront/ideal.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\iDEAL\iDealControllerBase::storeIssuer
+ storefront
+
+
+
+
diff --git a/src/Resources/config/routes/storefront/mollie_failure.xml b/src/Resources/config/routes/storefront/mollie_failure.xml
new file mode 100644
index 000000000..bfa1a6648
--- /dev/null
+++ b/src/Resources/config/routes/storefront/mollie_failure.xml
@@ -0,0 +1,26 @@
+
+
+
+
+ .*
+ Kiener\MolliePayments\Controller\Storefront\Payment\MollieFailureControllerBase::paymentFailedAction
+ storefront
+ false
+
+
+
+
+ .*
+ Kiener\MolliePayments\Controller\Storefront\Payment\MollieFailureControllerBase::retry
+ storefront
+ false
+
+
+
diff --git a/src/Resources/config/routes/storefront/pos.xml b/src/Resources/config/routes/storefront/pos.xml
new file mode 100644
index 000000000..07b7e72d2
--- /dev/null
+++ b/src/Resources/config/routes/storefront/pos.xml
@@ -0,0 +1,25 @@
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\POS\PosControllerBase::storeTerminal
+ storefront
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\POS\PosControllerBase::checkoutAction
+ storefront
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\POS\PosControllerBase::statusAction
+ storefront
+
+
+
+
diff --git a/src/Resources/config/routes/storefront/return.xml b/src/Resources/config/routes/storefront/return.xml
new file mode 100644
index 000000000..95a9adc25
--- /dev/null
+++ b/src/Resources/config/routes/storefront/return.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ .*
+ Kiener\MolliePayments\Controller\Storefront\Payment\ReturnControllerBase::payment
+ false
+ storefront
+
+
+
diff --git a/src/Resources/config/routes/storefront/webhook.xml b/src/Resources/config/routes/storefront/webhook.xml
new file mode 100644
index 000000000..e0166d0f0
--- /dev/null
+++ b/src/Resources/config/routes/storefront/webhook.xml
@@ -0,0 +1,27 @@
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\Webhook\WebhookControllerBase::onWebhookReceived
+ storefront
+ false
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\Webhook\WebhookControllerBase::onWebhookSubscriptionReceived
+ storefront
+ false
+
+
+
+
+ Kiener\MolliePayments\Controller\Storefront\Webhook\WebhookControllerBase::onWebhookSubscriptionLegacyReceived
+ storefront
+ false
+
+
+
diff --git a/src/Resources/config/services.xml b/src/Resources/config/services.xml
index 6f13b9128..3b1ba8c64 100644
--- a/src/Resources/config/services.xml
+++ b/src/Resources/config/services.xml
@@ -21,6 +21,8 @@
+
+
@@ -177,6 +179,41 @@
+
+
+
+
+
+ %kernel.shopware_version%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Resources/config/compatibility/controller.xml b/src/Resources/config/services/controller.xml
similarity index 85%
rename from src/Resources/config/compatibility/controller.xml
rename to src/Resources/config/services/controller.xml
index 4925d940d..078c98d5d 100644
--- a/src/Resources/config/compatibility/controller.xml
+++ b/src/Resources/config/services/controller.xml
@@ -1,5 +1,6 @@
+
@@ -10,7 +11,7 @@
-
+
@@ -18,26 +19,29 @@
+
-
+
+
-
+
+
-
+
@@ -45,9 +49,10 @@
+
-
+
@@ -55,25 +60,28 @@
+
-
+
+
-
+
+
-
+
@@ -82,19 +90,29 @@
+
+
+
+
+
+
+
+
+
-
+
+
-
+
@@ -110,9 +128,10 @@
+
-
+
@@ -121,25 +140,28 @@
+
-
+
+
-
+
+
-
+
@@ -149,10 +171,10 @@
+
-
+
@@ -166,16 +188,11 @@
+
-
-
-
-
-
-
-
+
@@ -183,45 +200,52 @@
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
\ No newline at end of file
diff --git a/src/Resources/config/services/repositories.xml b/src/Resources/config/services/repositories.xml
index 710b18f78..29163ce72 100644
--- a/src/Resources/config/services/repositories.xml
+++ b/src/Resources/config/services/repositories.xml
@@ -89,6 +89,11 @@
+
+
+
+
+
diff --git a/src/Resources/config/services/services.xml b/src/Resources/config/services/services.xml
index f2859303a..0007e36d9 100644
--- a/src/Resources/config/services/services.xml
+++ b/src/Resources/config/services/services.xml
@@ -120,13 +120,14 @@
+
-
+
diff --git a/src/Resources/config/compatibility/snippets.xml b/src/Resources/config/services/snippets.xml
similarity index 100%
rename from src/Resources/config/compatibility/snippets.xml
rename to src/Resources/config/services/snippets.xml
diff --git a/src/Resources/config/services/subscription/services.xml b/src/Resources/config/services/subscription/services.xml
index 3319e5aab..4e07bfcea 100755
--- a/src/Resources/config/services/subscription/services.xml
+++ b/src/Resources/config/services/subscription/services.xml
@@ -37,6 +37,11 @@
+
+
+
+
+
diff --git a/src/Resources/snippet/de_DE/SnippetFile_de_DE_65.php b/src/Resources/snippet/de_DE/SnippetFile_de_DE_65.php
deleted file mode 100644
index e56b519ee..000000000
--- a/src/Resources/snippet/de_DE/SnippetFile_de_DE_65.php
+++ /dev/null
@@ -1,42 +0,0 @@
-getName();
- }
-
- public function getPath(): string
- {
- return __DIR__ . '/mollie-payments.de-DE.json';
- }
-
- public function getIso(): string
- {
- return 'de-DE';
- }
-
- public function getAuthor(): string
- {
- return 'Mollie B.V.';
- }
-
- public function isBase(): bool
- {
- return false;
- }
-
-}
diff --git a/src/Resources/snippet/en_GB/SnippetFile_en_GB.php b/src/Resources/snippet/en_GB/SnippetFile_en_GB.php
index baadf35c3..8442af31b 100644
--- a/src/Resources/snippet/en_GB/SnippetFile_en_GB.php
+++ b/src/Resources/snippet/en_GB/SnippetFile_en_GB.php
@@ -2,9 +2,10 @@
namespace Kiener\MolliePayments\Resources\snippet\en_GB;
+use Shopware\Core\System\Snippet\Files\AbstractSnippetFile;
use Shopware\Core\System\Snippet\Files\SnippetFileInterface;
-class SnippetFile_en_GB implements SnippetFileInterface
+class SnippetFile_en_GB extends AbstractSnippetFile implements SnippetFileInterface
{
public function getName(): string
{
diff --git a/src/Resources/snippet/en_GB/SnippetFile_en_GB_65.php b/src/Resources/snippet/en_GB/SnippetFile_en_GB_65.php
deleted file mode 100644
index f0214d415..000000000
--- a/src/Resources/snippet/en_GB/SnippetFile_en_GB_65.php
+++ /dev/null
@@ -1,38 +0,0 @@
-getName();
- }
-
- public function getPath(): string
- {
- return __DIR__ . '/mollie-payments.en-GB.json';
- }
-
- public function getIso(): string
- {
- return 'en-GB';
- }
-
- public function getAuthor(): string
- {
- return 'Mollie B.V.';
- }
-
- public function isBase(): bool
- {
- return false;
- }
-}
diff --git a/src/Resources/snippet/nl_NL/SnippetFile_nl_NL_65.php b/src/Resources/snippet/nl_NL/SnippetFile_nl_NL_65.php
deleted file mode 100644
index 9260ca2ae..000000000
--- a/src/Resources/snippet/nl_NL/SnippetFile_nl_NL_65.php
+++ /dev/null
@@ -1,38 +0,0 @@
-getName();
- }
-
- public function getPath(): string
- {
- return __DIR__ . '/mollie-payments.nl-NL.json';
- }
-
- public function getIso(): string
- {
- return 'nl-NL';
- }
-
- public function getAuthor(): string
- {
- return 'Mollie B.V.';
- }
-
- public function isBase(): bool
- {
- return false;
- }
-}
diff --git a/src/Resources/views/storefront/component/line-item/type/product.html.twig b/src/Resources/views/storefront/component/line-item/type/product.html.twig
index 7a0dd8f97..db344da60 100644
--- a/src/Resources/views/storefront/component/line-item/type/product.html.twig
+++ b/src/Resources/views/storefront/component/line-item/type/product.html.twig
@@ -8,4 +8,14 @@
{{ lineItem.extensions.mollieSubscription.translatedInterval }}
{% endif %}
-{% endblock %}
\ No newline at end of file
+{% endblock %}
+
+{% block component_line_item_type_product_number %}
+ {{ parent() }}
+ {% if lineItem.extensions.mollieSubscription.isSubscriptionProduct %}
+
+ {{ lineItem.extensions.mollieSubscription.translatedInterval }}
+
+ {% endif %}
+{% endblock %}
+
diff --git a/src/Resources/views/storefront/component/payment/payment-method.html.twig b/src/Resources/views/storefront/component/payment/payment-method.html.twig
index af3746b8b..cc2b689dc 100644
--- a/src/Resources/views/storefront/component/payment/payment-method.html.twig
+++ b/src/Resources/views/storefront/component/payment/payment-method.html.twig
@@ -12,6 +12,8 @@
{% block component_payment_method_description %}
+
+
{% if "MolliePayments" in payment.handlerIdentifier and page.extensions.MollieTestModePageExtension.testMode == true %}
{{ payment.translated.name }} ({{ "molliePayments.testMode.label"|trans }})
diff --git a/src/Service/CartService.php b/src/Service/CartService.php
index ce91264af..e62c5f2c3 100644
--- a/src/Service/CartService.php
+++ b/src/Service/CartService.php
@@ -5,8 +5,8 @@
use Kiener\MolliePayments\Compatibility\Gateway\CompatibilityGateway;
use Kiener\MolliePayments\Compatibility\Gateway\CompatibilityGatewayInterface;
use Shopware\Core\Checkout\Cart\Cart;
+use Shopware\Core\Checkout\Cart\LineItemFactoryHandler\ProductLineItemFactory;
use Shopware\Core\Checkout\Cart\SalesChannel\CartService as SalesChannelCartService;
-use Shopware\Core\Content\Product\Cart\ProductLineItemFactory;
use Shopware\Core\Framework\Validation\DataBag\DataBag;
use Shopware\Core\System\SalesChannel\Context\SalesChannelContextService;
use Shopware\Core\System\SalesChannel\SalesChannel\SalesChannelContextSwitcher;
@@ -59,8 +59,12 @@ public function __construct(SalesChannelCartService $swCartService, SalesChannel
public function addProduct(string $productId, int $quantity, SalesChannelContext $context): Cart
{
$cart = $this->getCalculatedMainCart($context);
-
- $productItem = $this->productItemFactory->create($productId, ['quantity' => $quantity]);
+ $data = [
+ 'id' => $productId,
+ 'referencedId' => $productId,
+ 'quantity' => $quantity
+ ];
+ $productItem = $this->productItemFactory->create($data, $context);
return $this->swCartService->add($cart, $productItem, $context);
}
diff --git a/src/Service/Order/OrderStatusUpdater.php b/src/Service/Order/OrderStatusUpdater.php
index 069a36127..a3ac1754e 100644
--- a/src/Service/Order/OrderStatusUpdater.php
+++ b/src/Service/Order/OrderStatusUpdater.php
@@ -4,6 +4,8 @@
use Kiener\MolliePayments\Repository\Order\OrderRepository;
use Kiener\MolliePayments\Repository\Order\OrderRepositoryInterface;
+use Kiener\MolliePayments\Repository\OrderTransaction\OrderTransactionRepositoryInterface;
+use Kiener\MolliePayments\Repository\StateMachineState\StateMachineStateRepositoryInterface;
use Kiener\MolliePayments\Service\Mollie\MolliePaymentStatus;
use Kiener\MolliePayments\Service\Transition\TransactionTransitionServiceInterface;
use Kiener\MolliePayments\Setting\MollieSettingStruct;
@@ -31,11 +33,17 @@ class OrderStatusUpdater
*/
private $transactionTransitionService;
+
/**
* @var LoggerInterface
*/
private $logger;
+ /**
+ * @var StateMachineStateRepositoryInterface
+ */
+ private $stateMachineStateRepository;
+
/**
* @param OrderStateService $orderHandler
@@ -43,12 +51,14 @@ class OrderStatusUpdater
* @param TransactionTransitionServiceInterface $transactionTransitionService
* @param LoggerInterface $logger
*/
- public function __construct(OrderStateService $orderHandler, OrderRepositoryInterface $repoOrders, TransactionTransitionServiceInterface $transactionTransitionService, LoggerInterface $logger)
+ public function __construct(OrderStateService $orderHandler, OrderRepositoryInterface $repoOrders, TransactionTransitionServiceInterface $transactionTransitionService, StateMachineStateRepositoryInterface $stateMachineStateRepository, LoggerInterface $logger)
{
$this->orderHandler = $orderHandler;
$this->repoOrders = $repoOrders;
$this->transactionTransitionService = $transactionTransitionService;
$this->logger = $logger;
+
+ $this->stateMachineStateRepository = $stateMachineStateRepository;
}
@@ -63,13 +73,17 @@ public function updatePaymentStatus(OrderTransactionEntity $transaction, string
{
$currentShopwareState = $transaction->getStateMachineState();
- if (!$currentShopwareState instanceof StateMachineStateEntity) {
- return;
+
+ if (! $currentShopwareState instanceof StateMachineStateEntity) {
+ $currentShopwareState = $this->stateMachineStateRepository->findByStateId($transaction->getStateId(), $context);
+ if (! $currentShopwareState instanceof StateMachineStateEntity) {
+ return;
+ }
}
$order = $transaction->getOrder();
- if (!$order instanceof OrderEntity) {
+ if (! $order instanceof OrderEntity) {
return;
}
@@ -171,7 +185,7 @@ public function updateOrderStatus(OrderEntity $order, string $statusTo, MollieSe
# let's check if we have configured a final order state.
# if so, we need to verify, if a transition is even allowed
- if (!empty($settings->getOrderStateFinalState())) {
+ if (! empty($settings->getOrderStateFinalState())) {
$currentId = ($stateMachine instanceof StateMachineStateEntity) ? $stateMachine->getId() : '';
# test if our current order does already have
@@ -186,7 +200,7 @@ public function updateOrderStatus(OrderEntity $order, string $statusTo, MollieSe
# once our final state is reached, we only allow transitions
# to chargebacks and refunds.
# all other transitions will not happen.
- if (!in_array($statusTo, $allowedList)) {
+ if (! in_array($statusTo, $allowedList)) {
return;
}
}
diff --git a/src/Subscriber/KernelSubscriber.php b/src/Subscriber/KernelSubscriber.php
new file mode 100644
index 000000000..59b0a1364
--- /dev/null
+++ b/src/Subscriber/KernelSubscriber.php
@@ -0,0 +1,38 @@
+ 'onModifyRouteScope'
+ ];
+ }
+
+ public function onModifyRouteScope(ControllerEvent $event): void
+ {
+ $attributes = $event->getRequest()->attributes;
+
+ /** @var null|RouteScope|string $routeScopeValue */
+ $routeScopeValue = $attributes->get(PlatformRequest::ATTRIBUTE_ROUTE_SCOPE);
+
+ if (is_string($routeScopeValue)) {
+ $routeScope = [$routeScopeValue];
+
+ if (class_exists(RouteScope::class)) {
+ $routeScope = new RouteScope(['scopes' => [$routeScopeValue]]);
+ }
+
+ $attributes->set(PlatformRequest::ATTRIBUTE_ROUTE_SCOPE, $routeScope);
+ }
+ }
+}
diff --git a/switch-composer.php b/switch-composer.php
index 83b073117..35cdb52ad 100644
--- a/switch-composer.php
+++ b/switch-composer.php
@@ -8,7 +8,7 @@
// >= 6.4.0.0
-const SW_VERSIONS_RELEASE = '6.4.0.0 - 6.6.0.0';
+const SW_VERSIONS_RELEASE = '6.4.0.0 - 6.7.0.0';
const SW_VERSIONS_DEV = '*';
diff --git a/tests/Cypress/cypress/e2e/admin/plugin-config.cy.js b/tests/Cypress/cypress/e2e/admin/plugin-config.cy.js
index f3a48d086..398ec69de 100644
--- a/tests/Cypress/cypress/e2e/admin/plugin-config.cy.js
+++ b/tests/Cypress/cypress/e2e/admin/plugin-config.cy.js
@@ -64,19 +64,19 @@ context("Plugin Config", () => {
cy.contains('Request support from Mollie');
// the modal should show the Shopware version number
- cy.contains("v" + shopware.getVersion());
+ cy.contains("v" + shopware.getDisplayedVersion());
// the send button is disabled until data is filled in
cy.get('.sw-button-process').should('be.disabled');
// now fill in our data
- cy.get('#sw-field--name').type('John');
- cy.get('#sw-field--email').type('test@localhost.com');
- cy.get('#sw-field--subject').type('Cypress Test Request');
- cy.get('.sw-text-editor').type('This is an automated request by Cypress and should not be sent.');
+ cy.get('.input-name input').type('John');
+ cy.get('.input-email input').type('test@localhost.com');
+ cy.get('.input-subject input').type('Cypress Test Request');
+ cy.get('.input-message [contenteditable="true"]').type('This is an automated request by Cypress and should not be sent.');
// now click somewhere else
- cy.get('#sw-field--name').click();
+ cy.get('.input-name input').click();
// the send button should be enabled now
cy.get('.sw-button-process').should('not.be.disabled');
diff --git a/tests/Cypress/cypress/support/actions/admin/AdminLoginAction.js b/tests/Cypress/cypress/support/actions/admin/AdminLoginAction.js
index 8b76a678e..baf876a86 100644
--- a/tests/Cypress/cypress/support/actions/admin/AdminLoginAction.js
+++ b/tests/Cypress/cypress/support/actions/admin/AdminLoginAction.js
@@ -9,12 +9,17 @@ export default class AdminLoginAction {
// otherwise we don't see a lot (page height)
cy.viewport(1920, 1500);
+
+
+
cy.visit('/admin');
cy.get('#sw-field--username').type('admin');
cy.get('#sw-field--password').type('shopware');
+ cy.intercept('/admin').as('admin');
cy.get('.sw-button').click();
+ cy.wait('@admin');
}
}
diff --git a/tests/Cypress/cypress/support/actions/admin/AdminOrdersAction.js b/tests/Cypress/cypress/support/actions/admin/AdminOrdersAction.js
index 8c25e7251..e67a108db 100644
--- a/tests/Cypress/cypress/support/actions/admin/AdminOrdersAction.js
+++ b/tests/Cypress/cypress/support/actions/admin/AdminOrdersAction.js
@@ -17,11 +17,12 @@ export default class AdminOrdersAction {
*
*/
openOrders() {
- cy.wait(1000);
+ cy.intercept('**').as('page')
repoMainMenu.getOrders().click({force: true});
- cy.wait(1000);
+ cy.wait('@page');
+ cy.intercept('**').as('page')
repoMainMenu.getOrdersOverview().click({force: true});
- cy.wait(4000);
+ cy.wait('@page');
}
/**
@@ -36,18 +37,17 @@ export default class AdminOrdersAction {
*
*/
openRefundManager() {
- cy.wait(1000);
+ cy.intercept('**').as('page')
if (shopware.isVersionLower('6.5')) {
// forceClick because if a Shopware update exists, that dialog is above our button
repoOrdersDetails.getMollieActionsButton().click({force: true, waitForAnimations: false});
}
- cy.wait(2000);
repoOrdersDetails.getMollieRefundManagerButton().click({force: true, waitForAnimations: false});
// here are automatic reloads and things as it seems
// I really want to test the real UX, so we just wait like a human
- cy.wait(4000);
+ cy.wait('@page');
}
@@ -59,7 +59,6 @@ export default class AdminOrdersAction {
this.openOrders();
- cy.wait(800);
// match with case-insensitive option because shopware
// switched from "In progress" to "In Progress" with 6.4.11.0 for example
@@ -74,7 +73,6 @@ export default class AdminOrdersAction {
this.openOrders();
- cy.wait(800);
cy.contains(repoOrdersList.getLatestPaymentStatusLabelSelector(), status);
}
@@ -82,10 +80,10 @@ export default class AdminOrdersAction {
*
*/
openShipThroughMollie() {
-
+ cy.intercept('**').as('page')
if (shopware.isVersionLower('6.5')) {
repoOrdersDetails.getMollieActionsButton().click({force: true});
- cy.wait(2000);
+ cy.wait('@page');
}
repoOrdersDetails.getMollieActionButtonShipThroughMollie().should('not.have.class', 'sw-button--disabled');
@@ -93,7 +91,7 @@ export default class AdminOrdersAction {
// here are automatic reloads and things as it seems
// I really want to test the real UX, so we just wait like a human
- cy.wait(4000);
+ cy.wait('@page');
}
/**
@@ -102,8 +100,8 @@ export default class AdminOrdersAction {
*/
openLineItemShipping(nthItem) {
- cy.wait(2000);
+ cy.intercept('**').as('page')
repoOrdersDetails.getLineItemActionsButton(nthItem).click({force: true})
repoOrdersDetails.getLineItemActionsButtonShipThroughMollie().should('not.have.class', 'is--disabled');
@@ -112,7 +110,7 @@ export default class AdminOrdersAction {
// here are automatic reloads and things as it seems
// I really want to test the real UX, so we just wait like a human
- cy.wait(4000);
+ cy.wait('@page');
}
/**
@@ -120,35 +118,35 @@ export default class AdminOrdersAction {
* @param trackingCode
*/
setTrackingCode(trackingCode) {
-
+ cy.intercept('**').as('page')
if (shopware.isVersionLower('6.5')) {
repoOrdersDetails.getEditButton().click();
}
- cy.wait(2000);
+
// Tracking Code is added on OrderDetails Tab, therefore we need to open a new tab first
// and navigating back after tracking code is set. since 6.5
if (shopware.isVersionGreaterEqual('6.5')) {
- cy.wait(1000);
+
repoOrdersDetails.getOrderDetailsTab().click();
}
repoOrdersDetails.getTrackingCode(trackingCode).type(trackingCode, forceOption);
repoOrdersDetails.getTrackingCodeAddButton().click();
- cy.wait(1000);
+
repoOrdersDetails.getSaveButton().click();
if (shopware.isVersionGreaterEqual('6.5')) {
- cy.wait(2000);
+
repoOrdersDetails.getOrderDetailsGeneralTab().click();
}
// here are automatic reloads and things as it seems
// I really want to test the real UX, so we just wait like a human
- cy.wait(4000);
+ cy.wait('@page');
}
addTrackingCodeToLineItem(quantity, shippingMethodName, trackingCode) {
diff --git a/tests/Cypress/cypress/support/actions/admin/AdminPluginAction.js b/tests/Cypress/cypress/support/actions/admin/AdminPluginAction.js
index 5daef65a8..a4c2c9e0a 100644
--- a/tests/Cypress/cypress/support/actions/admin/AdminPluginAction.js
+++ b/tests/Cypress/cypress/support/actions/admin/AdminPluginAction.js
@@ -9,19 +9,20 @@ export default class AdminPluginAction {
*
*/
openPluginConfiguration() {
-
+ cy.intercept('**').as('admin');
if (shopware.isVersionGreaterEqual('6.4')) {
cy.visit('/admin#/sw/extension/config/MolliePayments');
} else {
cy.visit('/admin#/sw/plugin/settings/MolliePayments');
}
- cy.wait(4000);
+ cy.wait('@admin');
}
savePlugConfiguration() {
+ cy.intercept('**').as('admin');
cy.get('.sw-extension-config__save-action').click();
- cy.wait(4000);
+ cy.wait('@admin');
}
}
diff --git a/tests/Cypress/cypress/support/actions/admin/RefundManagerAction.js b/tests/Cypress/cypress/support/actions/admin/RefundManagerAction.js
index e45f27095..eb225bce3 100644
--- a/tests/Cypress/cypress/support/actions/admin/RefundManagerAction.js
+++ b/tests/Cypress/cypress/support/actions/admin/RefundManagerAction.js
@@ -21,6 +21,7 @@ export default class RefundManagerAction {
* @param privateDesc
*/
fullRefund(publicDesc, privateDesc) {
+ cy.intercept('**').as('page')
repoRefundManager.getDescription().clear(forceOption).type(publicDesc, forceOption);
if (privateDesc !== null && privateDesc.trim() !== '') {
@@ -33,7 +34,7 @@ export default class RefundManagerAction {
// here are automatic reloads and things as it seems
// I really want to test the real UX, so we just wait like a human
- cy.wait(4000);
+ cy.wait('@page');
}
/**
@@ -42,6 +43,7 @@ export default class RefundManagerAction {
* @param description
*/
partialAmountRefund(amount, description) {
+ cy.intercept('**').as('page')
repoRefundManager.getAmountField().clear(forceOption).type(amount, forceOption);
repoRefundManager.getDescription().clear(forceOption).type(description, forceOption);
repoRefundManager.getVerifyCheckbox().click(forceOption);
@@ -49,19 +51,20 @@ export default class RefundManagerAction {
// here are automatic reloads and things as it seems
// I really want to test the real UX, so we just wait like a human
- cy.wait(4000);
+ cy.wait('@page');
}
/**
*
*/
cancelPendingRefund() {
+ cy.intercept('**').as('page')
repoRefundManager.getFirstRefundContextButton().click(forceOption);
repoRefundManager.getFirstRefundCancelButton().click(forceOption);
// here are automatic reloads and things as it seems
// I really want to test the real UX, so we just wait like a human
- cy.wait(4000);
+ cy.wait('@page');
}
/**
diff --git a/tests/Cypress/cypress/support/actions/store-api/StoreApiLoginAction.js b/tests/Cypress/cypress/support/actions/store-api/StoreApiLoginAction.js
index 021365eca..c8c834e7b 100644
--- a/tests/Cypress/cypress/support/actions/store-api/StoreApiLoginAction.js
+++ b/tests/Cypress/cypress/support/actions/store-api/StoreApiLoginAction.js
@@ -95,7 +95,10 @@ export default class StoreApiLoginAction {
);
cy.wrap(loginPromise).then((response) => {
- const loginToken = response.data.contextToken;
+ let loginToken = response.data.contextToken;
+ if(loginToken === undefined){
+ loginToken = response.headers["sw-context-token"];
+ }
this.client.setContextToken(loginToken);
cy.log('Context-Token: ' + loginToken);
});
diff --git a/tests/Cypress/cypress/support/repositories/admin/refund-manager/RefundManagerRepository.js b/tests/Cypress/cypress/support/repositories/admin/refund-manager/RefundManagerRepository.js
index 00e47c07a..18026d0b6 100644
--- a/tests/Cypress/cypress/support/repositories/admin/refund-manager/RefundManagerRepository.js
+++ b/tests/Cypress/cypress/support/repositories/admin/refund-manager/RefundManagerRepository.js
@@ -6,7 +6,7 @@ export default class RefundManagerRepository {
* @returns {Cypress.Chainable>}
*/
getAmountField() {
- return cy.get('#sw-field--refundAmount');
+ return cy.get('.refund-amount input');
}
/**
@@ -22,7 +22,7 @@ export default class RefundManagerRepository {
* @returns {Cypress.Chainable>}
*/
getDescription() {
- return cy.get('#sw-field--refundDescription');
+ return cy.get('.refund-description textarea');
}
/**
@@ -30,7 +30,7 @@ export default class RefundManagerRepository {
* @returns {Cypress.Chainable>}
*/
getInternalDescription() {
- return cy.get('#sw-field--refundInternalDescription');
+ return cy.get('.refund-internal-description textarea');
}
/**
diff --git a/tests/Cypress/cypress/support/repositories/admin/subscriptions/SubscriptionDetailsRepository.js b/tests/Cypress/cypress/support/repositories/admin/subscriptions/SubscriptionDetailsRepository.js
index 5a65331e8..0efb796fa 100644
--- a/tests/Cypress/cypress/support/repositories/admin/subscriptions/SubscriptionDetailsRepository.js
+++ b/tests/Cypress/cypress/support/repositories/admin/subscriptions/SubscriptionDetailsRepository.js
@@ -1,35 +1,35 @@
export default class SubscriptionDetailsRepository {
getMollieCustomerIdField() {
- return cy.get('#sw-field--subscription-mollieCustomerId');
+ return cy.get('.cy-subscription-customer-id input');
}
getCreatedAtField() {
- return cy.get('#sw-field--formattedCreateAt');
+ return cy.get('.cy-subscription-formatted-created-at input');
}
getMollieSubscriptionIdField() {
- return cy.get('#sw-field--subscription-mollieId');
+ return cy.get('.cy-subscription-mollie-id input');
}
getMandateField() {
- return cy.get('#sw-field--subscription-mandateId');
+ return cy.get('.cy-subscription-mandate-id input');
}
getCanceledAtField() {
- return cy.get('#sw-field--formattedCanceledAt');
+ return cy.get('.cy-subscription-formatted-canceled-at input');
}
getStatusField() {
- return cy.get('#sw-field--translatedStatus');
+ return cy.get('.cy-subscription-translated-status input');
}
getNextPaymentAtField() {
- return cy.get('#sw-field--formattedNextPaymentAt');
+ return cy.get('.cy-subscription-formatted-next-payment-at input');
}
getLastRemindedAtField() {
- return cy.get('#sw-field--formattedLastRemindedAt');
+ return cy.get('.cy-subscription-formatted-last-reminded-at input');
}
getPauseButton() {
diff --git a/tests/Cypress/cypress/support/services/shopware/Shopware.js b/tests/Cypress/cypress/support/services/shopware/Shopware.js
index 932c85b7b..ca1b5ac97 100644
--- a/tests/Cypress/cypress/support/services/shopware/Shopware.js
+++ b/tests/Cypress/cypress/support/services/shopware/Shopware.js
@@ -13,6 +13,14 @@ export default class Shopware {
return Cypress.env().SHOPWARE;
}
+ /**
+ * sometimes we test RC versions, and shopware display the version differently in the admin
+ * @returns {string}
+ */
+ getDisplayedVersion(){
+ return Cypress.env().SHOPWARE.replace('-rc',' RC ');
+ }
+
/**
*
* @returns {string}
diff --git a/tests/PHPUnit/Components/Subscription/Services/Builder/MollieDataBuilderTest.php b/tests/PHPUnit/Components/Subscription/Services/Builder/MollieDataBuilderTest.php
index 7afeb9493..617e5081c 100644
--- a/tests/PHPUnit/Components/Subscription/Services/Builder/MollieDataBuilderTest.php
+++ b/tests/PHPUnit/Components/Subscription/Services/Builder/MollieDataBuilderTest.php
@@ -11,6 +11,7 @@
use MolliePayments\Tests\Fakes\FakeRouter;
use MolliePayments\Tests\Traits\BuilderTestTrait;
use PHPUnit\Framework\TestCase;
+use Shopware\Core\System\Currency\CurrencyEntity;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
@@ -32,7 +33,9 @@ public function testBuildSubscriptionPayload()
$subscription = new SubscriptionEntity();
$subscription->setId('ID123');
- $subscription->setCurrency('USD');
+ $currency = new CurrencyEntity();
+ $currency->setIsoCode('USD');
+ $subscription->setCurrency($currency);
$subscription->setAmount(10.5);
$subscription->setDescription('Subscription Product A');