From 91f82912c55a669ba369511efc94cf4373ce581e Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Thu, 5 Dec 2024 09:13:01 +0100 Subject: [PATCH] NTR: fix pipeline (#905) Co-authored-by: Vitalij Mik --- .../src/core/service/api/mollie-payments-config.service.js | 4 +++- .../components/mollie-refund-manager/RefundManager.js | 2 +- .../components/mollie-refund-manager/index.js | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Resources/app/administration/src/core/service/api/mollie-payments-config.service.js b/src/Resources/app/administration/src/core/service/api/mollie-payments-config.service.js index 73590ad9b..12523895e 100644 --- a/src/Resources/app/administration/src/core/service/api/mollie-payments-config.service.js +++ b/src/Resources/app/administration/src/core/service/api/mollie-payments-config.service.js @@ -85,7 +85,9 @@ export default class MolliePaymentsConfigService extends ApiService { MolliePaymentsRefundBundleRepositoryService.setClient(this.httpClient); MolliePaymentsRefundBundleRepositoryService.setHeaders(this.getBasicHeaders()); - return MolliePaymentsRefundBundleRepositoryService.fetch() + return MolliePaymentsRefundBundleRepositoryService.fetch().then((response) => { + return ApiService.handleResponse(response); + }); } } diff --git a/src/Resources/app/administration/src/module/mollie-payments/components/mollie-refund-manager/RefundManager.js b/src/Resources/app/administration/src/module/mollie-payments/components/mollie-refund-manager/RefundManager.js index c6e145ad4..4ddf83bcc 100644 --- a/src/Resources/app/administration/src/module/mollie-payments/components/mollie-refund-manager/RefundManager.js +++ b/src/Resources/app/administration/src/module/mollie-payments/components/mollie-refund-manager/RefundManager.js @@ -26,7 +26,7 @@ export default class RefundManager { await this._configService.getRefundManagerConfig(salesChannelId, orderId) .then((response) => { - refundManagerPossible = response.data.config.enabled; + refundManagerPossible = response.config.enabled; }); return refundManagerPossible; diff --git a/src/Resources/app/administration/src/module/mollie-payments/components/mollie-refund-manager/index.js b/src/Resources/app/administration/src/module/mollie-payments/components/mollie-refund-manager/index.js index c35f86ebb..85cb8b8a0 100644 --- a/src/Resources/app/administration/src/module/mollie-payments/components/mollie-refund-manager/index.js +++ b/src/Resources/app/administration/src/module/mollie-payments/components/mollie-refund-manager/index.js @@ -160,9 +160,9 @@ Component.register('mollie-refund-manager', { // also get the config for the refund manager // so that we can show/hide a few things this.MolliePaymentsConfigService.getRefundManagerConfig(this.order.salesChannelId, this.order.id).then((response) => { - me.configVerifyRefund = response.verifyRefund; - me.configAutoStockReset = response.autoStockReset; - me.configShowInstructions = response.showInstructions; + me.configVerifyRefund = response.config.verifyRefund; + me.configAutoStockReset = response.config.autoStockReset; + me.configShowInstructions = response.config.showInstructions; }); } },