diff --git a/src/Controller/SettingsController.php b/src/Controller/SettingsController.php index 0e57c4a59..c414b4bcf 100644 --- a/src/Controller/SettingsController.php +++ b/src/Controller/SettingsController.php @@ -26,7 +26,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; -#[Route(defaults: ['_routeScope' => ['api']])] +#[Route(defaults: ['_routeScope' => ['api'], '_acl' => ['payone:configuration']])] class SettingsController extends AbstractController { private const REFERENCE_PREFIX_TEST = 'TESTPO-'; diff --git a/src/Resources/app/administration/src/acl/index.js b/src/Resources/app/administration/src/acl/index.js index c7829bdda..116fd0e62 100644 --- a/src/Resources/app/administration/src/acl/index.js +++ b/src/Resources/app/administration/src/acl/index.js @@ -6,10 +6,50 @@ try { roles: { payone_order_management: { privileges: [ - 'order_transaction:update', - 'order_line_item:update', - 'state_machine_history:create', - Shopware.Service('privileges').getPrivileges('order.viewer') + // 'order_transaction:update', + // 'order_line_item:update', + // 'state_machine_history:create', + // Shopware.Service('privileges').getPrivileges('order.viewer'), + + 'payone_order_management', + + 'payone_payment_order_transaction_data:read', + 'payone_payment_order_transaction_data:update', + + 'payone_payment_order_action_log:read', + 'payone_payment_order_action_log:create', + + 'payone_payment_webhook_log:read', + 'payone_payment_notification_forward:read', + 'payone_payment_notification_forward:create', + ], + dependencies: [] + }, + payone_configuration: { + privileges: [ + 'system_config:read', + 'system_config:create', + 'system_config:update', + 'system_config:delete', + 'currency:read', + 'sales_channel:read', + 'payone:configuration' + ], + dependencies: [] + }, + payone_webhook_forward: { + privileges: [ + 'payone_payment_notification_target:read', + 'payone_payment_notification_target:create', + 'payone_payment_notification_target:update', + 'payone_payment_notification_target:delete', + 'payone:manage_webhook_forwards' + ], + dependencies: [] + }, + payone_webhook_resend: { + privileges: [ + 'payone_webhook_resend' ], dependencies: [] } diff --git a/src/Resources/app/administration/src/module/payone-notification-target/index.js b/src/Resources/app/administration/src/module/payone-notification-target/index.js index d0975bc92..9ec0ff409 100644 --- a/src/Resources/app/administration/src/module/payone-notification-target/index.js +++ b/src/Resources/app/administration/src/module/payone-notification-target/index.js @@ -19,9 +19,12 @@ Shopware.Module.register('payone-notification-target', { routes: { list: { component: 'payone-notification-target-list', - path: 'list' + path: 'list', + meta: { + privilege: 'payone_payment_notification_target:read' + } }, - detail: { + detail: { component: 'payone-notification-target-detail', path: 'detail/:id', props: { @@ -32,14 +35,16 @@ Shopware.Module.register('payone-notification-target', { } }, meta: { - parentPath: 'payone.notification.target.list' + parentPath: 'payone.notification.target.list', + privilege: 'payone_payment_notification_target:read' } }, create: { component: 'payone-notification-target-detail', path: 'create', meta: { - parentPath: 'payone.notification.target.list' + parentPath: 'payone.notification.target.list', + privilege: 'payone_payment_notification_target:create' } } } diff --git a/src/Resources/app/administration/src/module/payone-notification-target/page/payone-notification-target-detail/index.js b/src/Resources/app/administration/src/module/payone-notification-target/page/payone-notification-target-detail/index.js index 22de21bd3..10463d86c 100644 --- a/src/Resources/app/administration/src/module/payone-notification-target/page/payone-notification-target-detail/index.js +++ b/src/Resources/app/administration/src/module/payone-notification-target/page/payone-notification-target-detail/index.js @@ -1,6 +1,6 @@ import template from './payone-notification-target-detail.html.twig'; -const { Mixin } = Shopware; +const {Mixin} = Shopware; export default { template, @@ -78,22 +78,22 @@ export default { this.notificationTarget = notificationTarget; - if(null === notificationTarget.txactions) { + if (null === notificationTarget.txactions) { return; } - if(!notificationTarget.txactions.length) { + if (!notificationTarget.txactions.length) { this.notificationTarget.txactions = null; } }); }, isInvalid() { - if(this.notificationTarget.isBasicAuth !== true ) { + if (this.notificationTarget.isBasicAuth !== true) { return false; } - if(this.notificationTarget.username && this.notificationTarget.password) { + if (this.notificationTarget.username && this.notificationTarget.password) { return false; } @@ -107,7 +107,7 @@ export default { }, onSave() { - if(this.isInvalid()) { + if (this.isInvalid()) { return; } @@ -134,7 +134,7 @@ export default { }, onCancel() { - this.$router.push({ name: 'payone.notification.target.list' }); + this.$router.push({name: 'payone.notification.target.list'}); } } }; diff --git a/src/Resources/app/administration/src/module/payone-notification-target/page/payone-notification-target-list/index.js b/src/Resources/app/administration/src/module/payone-notification-target/page/payone-notification-target-list/index.js index d089d677f..091c2f8fd 100644 --- a/src/Resources/app/administration/src/module/payone-notification-target/page/payone-notification-target-list/index.js +++ b/src/Resources/app/administration/src/module/payone-notification-target/page/payone-notification-target-list/index.js @@ -4,7 +4,7 @@ const { Mixin, Data: { Criteria } } = Shopware; export default { template, - inject: ['repositoryFactory'], + inject: ['repositoryFactory', 'acl'], mixins: [ Mixin.getByName('listing') diff --git a/src/Resources/app/administration/src/module/payone-notification-target/page/payone-notification-target-list/payone-notification-target-list.html.twig b/src/Resources/app/administration/src/module/payone-notification-target/page/payone-notification-target-list/payone-notification-target-list.html.twig index 89cdd8768..c014e0cd2 100644 --- a/src/Resources/app/administration/src/module/payone-notification-target/page/payone-notification-target-list/payone-notification-target-list.html.twig +++ b/src/Resources/app/administration/src/module/payone-notification-target/page/payone-notification-target-list/payone-notification-target-list.html.twig @@ -25,7 +25,9 @@ {% block payone_notification_target_list_smart_bar_actions %} + variant="primary" + v-if="acl.can('payone_payment_notification_target:create')" + > {{ $tc('payonePayment.notificationTarget.list.buttonCreate') }} {% endblock %} @@ -48,16 +50,23 @@ :disableDataFetching="true" :sortBy="sortBy" :showSelection="false" - :allowInlineEdit="false" :sortDirection="sortDirection" - identifier="payone-notification-target-list"> + identifier="payone-notification-target-list" + :allowInlineEdit="false" + :allowBulkEdit="false" + :allowColumnEdit="acl.can('payone_payment_notification_target:update')" + :allowEdit="acl.can('payone_payment_notification_target:update')" + :allowDelete="acl.can('payone_payment_notification_target:delete')" + > {% block payone_notification_target_list_grid_columns %} {% block payone_notification_target_list_grid_columns_url %} {% endblock %} diff --git a/src/Resources/app/administration/src/module/payone-payment/index.js b/src/Resources/app/administration/src/module/payone-payment/index.js index 2d533a5cf..8310f559c 100644 --- a/src/Resources/app/administration/src/module/payone-payment/index.js +++ b/src/Resources/app/administration/src/module/payone-payment/index.js @@ -31,7 +31,8 @@ Shopware.Module.register('payone-payment', { component: 'payone-settings', path: 'index', meta: { - parentPath: 'sw.settings.index' + parentPath: 'sw.settings.index', + privilege: 'payone:configuration' } } }, @@ -42,6 +43,7 @@ Shopware.Module.register('payone-payment', { label: 'payone-payment.general.mainMenuItemGeneral', group: 'plugins', iconComponent: 'payone-payment-plugin-icon', - backgroundEnabled: false + backgroundEnabled: false, + privilege: 'payone:configuration' }], }); diff --git a/src/Resources/app/administration/src/module/payone-payment/page/payone-settings/index.js b/src/Resources/app/administration/src/module/payone-payment/page/payone-settings/index.js index 312d640f0..4661ae252 100644 --- a/src/Resources/app/administration/src/module/payone-payment/page/payone-settings/index.js +++ b/src/Resources/app/administration/src/module/payone-payment/page/payone-settings/index.js @@ -11,7 +11,7 @@ export default { Mixin.getByName('sw-inline-snippet') ], - inject: ['PayonePaymentSettingsService'], + inject: ['PayonePaymentSettingsService', 'acl'], data() { return { diff --git a/src/Resources/app/administration/src/module/payone-payment/page/payone-settings/payone-settings.html.twig b/src/Resources/app/administration/src/module/payone-payment/page/payone-settings/payone-settings.html.twig index f8b46a829..ce38ce724 100644 --- a/src/Resources/app/administration/src/module/payone-payment/page/payone-settings/payone-settings.html.twig +++ b/src/Resources/app/administration/src/module/payone-payment/page/payone-settings/payone-settings.html.twig @@ -31,7 +31,9 @@ variant="ghost" :square="false" :block="false" - :isLoading="false"> + :isLoading="false" + v-if="acl.can('payone_payment_notification_target:read')" + > {{ $tc('payonePayment.notificationTarget.module.buttonTitle') }} {% endblock %} diff --git a/src/Resources/app/administration/src/module/payone-payment/snippet/de_DE.json b/src/Resources/app/administration/src/module/payone-payment/snippet/de_DE.json index 28510df58..6eb2b5e39 100644 --- a/src/Resources/app/administration/src/module/payone-payment/snippet/de_DE.json +++ b/src/Resources/app/administration/src/module/payone-payment/snippet/de_DE.json @@ -127,7 +127,10 @@ "additional_permissions": { "Payone": { "label": "PAYONE", - "payone_order_management": "PAYONE Transaktionsmanagement" + "payone_order_management": "Transaktionsmanagement", + "payone_configuration": "Konfiguration", + "payone_webhook_forward": "Webhook Weiterleitung Verwaltung", + "payone_webhook_resend": "Webhook Weiterleitung erneut senden" } } } diff --git a/src/Resources/app/administration/src/module/payone-payment/snippet/en_GB.json b/src/Resources/app/administration/src/module/payone-payment/snippet/en_GB.json index 9d76a9217..c2ecd25de 100644 --- a/src/Resources/app/administration/src/module/payone-payment/snippet/en_GB.json +++ b/src/Resources/app/administration/src/module/payone-payment/snippet/en_GB.json @@ -127,7 +127,10 @@ "additional_permissions": { "Payone": { "label": "PAYONE", - "payone_order_management": "PAYONE transaction management" + "payone_order_management": "Transaction management", + "payone_configuration": "Configuration", + "payone_webhook_forward": "Manage webhook forwards", + "payone_webhook_resend": "Allow Webhook forward resend" } } } diff --git a/src/Resources/app/administration/src/module/sw-order/component/payone-payment-management/index.js b/src/Resources/app/administration/src/module/sw-order/component/payone-payment-management/index.js index d89abc7ed..227087524 100644 --- a/src/Resources/app/administration/src/module/sw-order/component/payone-payment-management/index.js +++ b/src/Resources/app/administration/src/module/sw-order/component/payone-payment-management/index.js @@ -125,14 +125,6 @@ export default { }); }, - can(permission) { - try { - return this.acl.can(permission); - } catch (e) { - return true; - } - }, - reloadEntityData() { this.$emit('reload-entity-data'); }, diff --git a/src/Resources/app/administration/src/module/sw-order/component/payone-payment-management/payone-payment-management.html.twig b/src/Resources/app/administration/src/module/sw-order/component/payone-payment-management/payone-payment-management.html.twig index a048a91f9..08610db53 100644 --- a/src/Resources/app/administration/src/module/sw-order/component/payone-payment-management/payone-payment-management.html.twig +++ b/src/Resources/app/administration/src/module/sw-order/component/payone-payment-management/payone-payment-management.html.twig @@ -32,13 +32,13 @@ - + - + {{ $tc('payonePayment.notificationTarget.list.title') }} {{ $tc('payonePayment.notificationTarget.actions.requeue') }} diff --git a/src/Resources/app/administration/src/module/sw-order/page/sw-order-detail/index.js b/src/Resources/app/administration/src/module/sw-order/page/sw-order-detail/index.js index 71363ce37..31991af5e 100644 --- a/src/Resources/app/administration/src/module/sw-order/page/sw-order-detail/index.js +++ b/src/Resources/app/administration/src/module/sw-order/page/sw-order-detail/index.js @@ -1,37 +1,47 @@ import template from './sw-order-detail.html.twig'; export default { - template, + template, - methods: { - hasPayoneTransaction(order) { - let me = this; - let isPayone = false; + inject: ['acl'], - if (!order.transactions) { - return false; - } + methods: { + hasPayoneTransaction(order) { + let me = this; + let isPayone = false; - order.transactions.map(function(transaction) { - if (me.isPayoneTransaction(transaction) && me.isActiveTransaction(transaction)) { - isPayone = true; - } - }); + if (!order.transactions) { + return false; + } + + order.transactions.map(function (transaction) { + if (me.isPayoneTransaction(transaction) && me.isActiveTransaction(transaction)) { + isPayone = true; + } + }); - return isPayone; - }, + return isPayone; + }, - isPayoneTransaction(transaction) { - if (!transaction.extensions || !transaction.extensions.payonePaymentOrderTransactionData || !transaction.extensions.payonePaymentOrderTransactionData.transactionId) { - return false; - } + isPayoneTransaction(transaction) { + if (!transaction.extensions || !transaction.extensions.payonePaymentOrderTransactionData || !transaction.extensions.payonePaymentOrderTransactionData.transactionId) { + return false; + } - return transaction.extensions.payonePaymentOrderTransactionData.transactionId; - }, + return transaction.extensions.payonePaymentOrderTransactionData.transactionId; + }, - isActiveTransaction(transaction) { - return transaction.stateMachineState.technicalName !== 'cancelled'; - }, - } + isActiveTransaction(transaction) { + return transaction.stateMachineState.technicalName !== 'cancelled'; + }, + + canAccessPayoneTab() { + return (this.acl.can('payone_order_management') + || this.acl.can('payone_payment_order_action_log:read') + || this.acl.can('payone_payment_notification_forward:read') + || this.acl.can('payone_payment_webhook_log:read')) + && this.order && this.hasPayoneTransaction(this.order); + } + } }; diff --git a/src/Resources/app/administration/src/module/sw-order/page/sw-order-detail/sw-order-detail.html.twig b/src/Resources/app/administration/src/module/sw-order/page/sw-order-detail/sw-order-detail.html.twig index ae310a81a..b6817f6a7 100644 --- a/src/Resources/app/administration/src/module/sw-order/page/sw-order-detail/sw-order-detail.html.twig +++ b/src/Resources/app/administration/src/module/sw-order/page/sw-order-detail/sw-order-detail.html.twig @@ -3,7 +3,7 @@ {% block sw_order_detail_content_tabs_payone %} {% endblock %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/src/Resources/app/administration/src/module/sw-order/view/sw-order-detail-payone/index.js b/src/Resources/app/administration/src/module/sw-order/view/sw-order-detail-payone/index.js index 4f8e83591..c86573e6a 100644 --- a/src/Resources/app/administration/src/module/sw-order/view/sw-order-detail-payone/index.js +++ b/src/Resources/app/administration/src/module/sw-order/view/sw-order-detail-payone/index.js @@ -6,6 +6,8 @@ const { mapState } = Component.getComponentHelper(); export default { template, + inject: ['acl'], + props: { orderId: { type: String, @@ -21,8 +23,8 @@ export default { methods: { reloadEntityData() { - this.$refs.payoneOrderActionLogs.reloadActionLogs(); - this.$refs.payoneWebhookLogs.reloadWebhookLogs(); + this.$refs.payoneOrderActionLogs?.reloadActionLogs(); + this.$refs.payoneWebhookLogs?.reloadWebhookLogs(); this.$emit('reload-entity-data'); }, } diff --git a/src/Resources/app/administration/src/module/sw-order/view/sw-order-detail-payone/sw-order-detail-payone.html.twig b/src/Resources/app/administration/src/module/sw-order/view/sw-order-detail-payone/sw-order-detail-payone.html.twig index d7118792a..7fa57edeb 100644 --- a/src/Resources/app/administration/src/module/sw-order/view/sw-order-detail-payone/sw-order-detail-payone.html.twig +++ b/src/Resources/app/administration/src/module/sw-order/view/sw-order-detail-payone/sw-order-detail-payone.html.twig @@ -4,6 +4,7 @@ {% endblock %} @@ -12,6 +13,7 @@ ref="payoneOrderActionLogs" :order="order" @reload-entity-data="reloadEntityData" + v-if="acl.can('payone_payment_order_action_log:read')" /> {% endblock %} @@ -20,6 +22,7 @@ ref="payoneWebhookLogs" :order="order" @reload-entity-data="reloadEntityData" + v-if="acl.can('payone_payment_webhook_log:read')" /> {% endblock %} diff --git a/src/Resources/public/administration/js/payone-payment.js b/src/Resources/public/administration/js/payone-payment.js index 82f221a22..251ede7fa 100755 --- a/src/Resources/public/administration/js/payone-payment.js +++ b/src/Resources/public/administration/js/payone-payment.js @@ -37,7 +37,7 @@ {% endblock %} -`});var $={};r($,{default:()=>Ve});var Ve,D=i(()=>{x();I();Ve={template:E,inject:["PayonePaymentSettingsService"],props:{value:{type:Object,required:!1,default(){return{}}},name:{type:String,required:!0}},data(){return{isLoading:!1,configuration:this.value}},created(){this.createdComponent()},destroyed(){this.destroyedComponent()},computed:{profileConfigurations(){let e=this.name,t=[];for(let a in this.configuration){let n="",o="";switch(e){case"PayonePayment.settings.ratepayDebitProfileConfigurations":n=this.configuration[a]["tx-limit-elv-min"],o=this.configuration[a]["tx-limit-elv-max"];break;case"PayonePayment.settings.ratepayInstallmentProfileConfigurations":n=this.configuration[a]["tx-limit-installment-min"],o=this.configuration[a]["tx-limit-installment-max"];break;case"PayonePayment.settings.ratepayInvoicingProfileConfigurations":n=this.configuration[a]["tx-limit-invoice-min"],o=this.configuration[a]["tx-limit-invoice-max"];break;default:return}let s={shopId:a,shopCurrency:this.configuration[a].currency,invoiceCountry:this.configuration[a]["country-code-billing"],shippingCountry:this.configuration[a]["country-code-delivery"],minBasket:n,maxBasket:o};t.push(s)}return t}},methods:{createdComponent(){this.$root.$on("payone-ratepay-profiles-update-result",this.onProfilesUpdateResult)},destroyedComponent(){this.$root.$off("payone-ratepay-profiles-update-result")},onProfilesUpdateResult(e){e.updates[this.name]&&(this.configuration=e.updates[this.name])}}}});var L=i(()=>{});var O,N=i(()=>{O=`{% block payone_ratepay_profiles %} +`});var $={};r($,{default:()=>Ue});var Ue,D=i(()=>{x();I();Ue={template:E,inject:["PayonePaymentSettingsService"],props:{value:{type:Object,required:!1,default(){return{}}},name:{type:String,required:!0}},data(){return{isLoading:!1,configuration:this.value}},created(){this.createdComponent()},destroyed(){this.destroyedComponent()},computed:{profileConfigurations(){let e=this.name,t=[];for(let a in this.configuration){let n="",o="";switch(e){case"PayonePayment.settings.ratepayDebitProfileConfigurations":n=this.configuration[a]["tx-limit-elv-min"],o=this.configuration[a]["tx-limit-elv-max"];break;case"PayonePayment.settings.ratepayInstallmentProfileConfigurations":n=this.configuration[a]["tx-limit-installment-min"],o=this.configuration[a]["tx-limit-installment-max"];break;case"PayonePayment.settings.ratepayInvoicingProfileConfigurations":n=this.configuration[a]["tx-limit-invoice-min"],o=this.configuration[a]["tx-limit-invoice-max"];break;default:return}let s={shopId:a,shopCurrency:this.configuration[a].currency,invoiceCountry:this.configuration[a]["country-code-billing"],shippingCountry:this.configuration[a]["country-code-delivery"],minBasket:n,maxBasket:o};t.push(s)}return t}},methods:{createdComponent(){this.$root.$on("payone-ratepay-profiles-update-result",this.onProfilesUpdateResult)},destroyedComponent(){this.$root.$off("payone-ratepay-profiles-update-result")},onProfilesUpdateResult(e){e.updates[this.name]&&(this.configuration=e.updates[this.name])}}}});var L=i(()=>{});var R,N=i(()=>{R=`{% block payone_ratepay_profiles %}
{% block payone_ratepay_shop_ids %}

{{ $tc('payone-payment.general.headlines.ratepayProfiles') }}

@@ -116,7 +116,7 @@ {% endblock %}
{% endblock %} -`});var R={};r(R,{default:()=>Qe});var He,Qe,F=i(()=>{L();N();({Utils:He}=Shopware),Qe={template:O,props:{value:{type:Array,required:!1,default(){return[]}},name:{type:String,required:!0}},data(){return{selectedItems:{},newItem:null,showDuplicateAlert:!1,showEmptyAlert:!1,profiles:this.value}},computed:{getLineItemColumns(){return[{property:"shopId",dataIndex:"shopId",label:this.$tc("payone-payment.general.label.shopId"),allowResize:!1,inlineEdit:"string",width:"200px",primary:!0},{property:"currency",dataIndex:"currency",label:this.$tc("payone-payment.general.label.currency"),allowResize:!1,inlineEdit:"string",width:"200px",primary:!0},{property:"error",label:this.$tc("payone-payment.general.label.error"),allowResize:!1,width:"100px",primary:!0}]}},watch:{profiles(e){this.$emit("update:value",e),this.$emit("input",e),this.$emit("change",e)}},created(){this.createdComponent()},destroyed(){this.destroyedComponent()},methods:{createdComponent(){this.$root.$on("payone-ratepay-profiles-update-result",this.onProfilesUpdateResult)},destroyedComponent(){this.$root.$off("payone-ratepay-profiles-update-result")},onProfilesUpdateResult(e){if(e.updates[this.name]&&(this.profiles=e.updates[this.name]),e.errors[this.name])for(let t of e.errors[this.name])this.profiles.push(t)},onInlineEditCancel(e){e.shopId===""&&e.currency===""&&this.profiles.forEach(function(t,a,n){t.id===e.id&&n.splice(a,1)}),this.$emit("item-cancel")},onInlineEditSave(e){if(e.shopId!==""&&e.currency!==""){this.showEmptyAlert=!1;let t=!1;this.profiles.forEach(function(a){a.id!==e.id&&a.shopId===e.shopId&&(t=!0)}),t?(this.showDuplicateAlert=!0,this.$nextTick(()=>{this.$refs.shopIdsDataGrid.currentInlineEditId=e.id,this.$refs.shopIdsDataGrid.enableInlineEdit()})):this.showDuplicateAlert=!1}else this.showEmptyAlert=!0,this.$nextTick(()=>{this.$refs.shopIdsDataGrid.currentInlineEditId=e.id,this.$refs.shopIdsDataGrid.enableInlineEdit()});this.$emit("update-list",this.profiles)},createNewLineItem(){let e=!1;if(e=this.profiles.length===0,e){this.createLine();return}this.profiles[this.profiles.length-1].shopId!==""&&this.createLine()},createLine(){let e=He.createId();this.profiles.push({id:e,shopId:"",currency:""}),this.$nextTick(()=>{this.$refs.shopIdsDataGrid.currentInlineEditId=e,this.$refs.shopIdsDataGrid.enableInlineEdit()})},onDeleteSelectedItem(e){this.profiles=this.profiles.filter(t=>t.shopId!==e.shopId),this.$emit("deleted",this.profiles)}}}});var q,M=i(()=>{q=`{% block payone_payment %} +`});var O={};r(O,{default:()=>Qe});var He,Qe,F=i(()=>{L();N();({Utils:He}=Shopware),Qe={template:R,props:{value:{type:Array,required:!1,default(){return[]}},name:{type:String,required:!0}},data(){return{selectedItems:{},newItem:null,showDuplicateAlert:!1,showEmptyAlert:!1,profiles:this.value}},computed:{getLineItemColumns(){return[{property:"shopId",dataIndex:"shopId",label:this.$tc("payone-payment.general.label.shopId"),allowResize:!1,inlineEdit:"string",width:"200px",primary:!0},{property:"currency",dataIndex:"currency",label:this.$tc("payone-payment.general.label.currency"),allowResize:!1,inlineEdit:"string",width:"200px",primary:!0},{property:"error",label:this.$tc("payone-payment.general.label.error"),allowResize:!1,width:"100px",primary:!0}]}},watch:{profiles(e){this.$emit("update:value",e),this.$emit("input",e),this.$emit("change",e)}},created(){this.createdComponent()},destroyed(){this.destroyedComponent()},methods:{createdComponent(){this.$root.$on("payone-ratepay-profiles-update-result",this.onProfilesUpdateResult)},destroyedComponent(){this.$root.$off("payone-ratepay-profiles-update-result")},onProfilesUpdateResult(e){if(e.updates[this.name]&&(this.profiles=e.updates[this.name]),e.errors[this.name])for(let t of e.errors[this.name])this.profiles.push(t)},onInlineEditCancel(e){e.shopId===""&&e.currency===""&&this.profiles.forEach(function(t,a,n){t.id===e.id&&n.splice(a,1)}),this.$emit("item-cancel")},onInlineEditSave(e){if(e.shopId!==""&&e.currency!==""){this.showEmptyAlert=!1;let t=!1;this.profiles.forEach(function(a){a.id!==e.id&&a.shopId===e.shopId&&(t=!0)}),t?(this.showDuplicateAlert=!0,this.$nextTick(()=>{this.$refs.shopIdsDataGrid.currentInlineEditId=e.id,this.$refs.shopIdsDataGrid.enableInlineEdit()})):this.showDuplicateAlert=!1}else this.showEmptyAlert=!0,this.$nextTick(()=>{this.$refs.shopIdsDataGrid.currentInlineEditId=e.id,this.$refs.shopIdsDataGrid.enableInlineEdit()});this.$emit("update-list",this.profiles)},createNewLineItem(){let e=!1;if(e=this.profiles.length===0,e){this.createLine();return}this.profiles[this.profiles.length-1].shopId!==""&&this.createLine()},createLine(){let e=He.createId();this.profiles.push({id:e,shopId:"",currency:""}),this.$nextTick(()=>{this.$refs.shopIdsDataGrid.currentInlineEditId=e,this.$refs.shopIdsDataGrid.enableInlineEdit()})},onDeleteSelectedItem(e){this.profiles=this.profiles.filter(t=>t.shopId!==e.shopId),this.$emit("deleted",this.profiles)}}}});var q,M=i(()=>{q=`{% block payone_payment %} {% block payone_payment_header %} {% endblock %} -`});var me=i(()=>{});var ye={};r(ye,{default:()=>bt});var ft,gt,m,bt,he=i(()=>{pe();me();({Mixin:ft,Filter:gt}=Shopware),{Criteria:m}=Shopware.Data,bt={template:ue,inject:["acl","PayonePaymentService","repositoryFactory"],mixins:[ft.getByName("notification")],props:{order:{type:Object,required:!0}},data(){return{notificationForwards:null}},computed:{dateFilter(){return gt.getByName("date")},payoneTransactions:function(){return this.order.transactions.filter(e=>this.isPayoneTransaction(e)).sort((e,t)=>e.createdAtt.createdAt?-1:0)},notificationForwardRepository(){return this.repositoryFactory.create("payone_payment_notification_forward")},notificationTargetColumns(){return[{property:"txaction",type:"text",width:"100px"},{property:"notificationTarget.url",type:"text"},{property:"response",width:"100px"},{property:"updatedAt",align:"right",type:"date"}]}},methods:{isPayoneTransaction(e){return!e.extensions||!e.extensions.payonePaymentOrderTransactionData||!e.extensions.payonePaymentOrderTransactionData.transactionId?!1:e.extensions.payonePaymentOrderTransactionData.transactionId},isActiveTransaction(e){return e.stateMachineState.technicalName!=="cancelled"},hasNotificationForwards(e){return this.notificationForwards===null?(this.getNotificationForwards(e),!1):this.notificationForwards.length>0},getNotificationForwards(e){let t=new m;return t.addAssociation("notificationTarget"),t.addSorting(m.sort("updatedAt","DESC",!0)),t.addFilter(m.equals("transactionId",e.id)),t.setLimit(500),this.notificationForwardRepository.search(t,Shopware.Context.api).then(a=>{this.notificationForwards=a})},requeue(e,t){let a={notificationForwardId:e.id};this.PayonePaymentService.requeueNotificationForward(a).then(()=>{this.createNotificationSuccess({title:this.$tc("payonePayment.notificationTarget.actions.requeue"),message:this.$tc("payonePayment.notificationTarget.messages.success")}),this.getNotificationForwards(t)}).catch(n=>{this.createNotificationError({title:this.$tc("payonePayment.notificationTarget.actions.requeue"),message:n.message})}).finally(()=>{this.$nextTick().then(()=>{this.$emit("reload")})})},can(e){try{return this.acl.can(e)}catch{return!0}},reloadEntityData(){this.$emit("reload-entity-data")},getPayoneCardType(e){let t=e.extensions.payonePaymentOrderTransactionData?.additionalData?.card_type;return t?this.$tc("sw-order.payone-payment.creditCard.cardTypes."+t):null}}}});var ge,fe=i(()=>{ge=`{% block payone_payment_order_action_log %} +`});var me=i(()=>{});var ye={};r(ye,{default:()=>wt});var ft,gt,m,wt,he=i(()=>{pe();me();({Mixin:ft,Filter:gt}=Shopware),{Criteria:m}=Shopware.Data,wt={template:ue,inject:["acl","PayonePaymentService","repositoryFactory"],mixins:[ft.getByName("notification")],props:{order:{type:Object,required:!0}},data(){return{notificationForwards:null}},computed:{dateFilter(){return gt.getByName("date")},payoneTransactions:function(){return this.order.transactions.filter(e=>this.isPayoneTransaction(e)).sort((e,t)=>e.createdAtt.createdAt?-1:0)},notificationForwardRepository(){return this.repositoryFactory.create("payone_payment_notification_forward")},notificationTargetColumns(){return[{property:"txaction",type:"text",width:"100px"},{property:"notificationTarget.url",type:"text"},{property:"response",width:"100px"},{property:"updatedAt",align:"right",type:"date"}]}},methods:{isPayoneTransaction(e){return!e.extensions||!e.extensions.payonePaymentOrderTransactionData||!e.extensions.payonePaymentOrderTransactionData.transactionId?!1:e.extensions.payonePaymentOrderTransactionData.transactionId},isActiveTransaction(e){return e.stateMachineState.technicalName!=="cancelled"},hasNotificationForwards(e){return this.notificationForwards===null?(this.getNotificationForwards(e),!1):this.notificationForwards.length>0},getNotificationForwards(e){let t=new m;return t.addAssociation("notificationTarget"),t.addSorting(m.sort("updatedAt","DESC",!0)),t.addFilter(m.equals("transactionId",e.id)),t.setLimit(500),this.notificationForwardRepository.search(t,Shopware.Context.api).then(a=>{this.notificationForwards=a})},requeue(e,t){let a={notificationForwardId:e.id};this.PayonePaymentService.requeueNotificationForward(a).then(()=>{this.createNotificationSuccess({title:this.$tc("payonePayment.notificationTarget.actions.requeue"),message:this.$tc("payonePayment.notificationTarget.messages.success")}),this.getNotificationForwards(t)}).catch(n=>{this.createNotificationError({title:this.$tc("payonePayment.notificationTarget.actions.requeue"),message:n.message})}).finally(()=>{this.$nextTick().then(()=>{this.$emit("reload")})})},reloadEntityData(){this.$emit("reload-entity-data")},getPayoneCardType(e){let t=e.extensions.payonePaymentOrderTransactionData?.additionalData?.card_type;return t?this.$tc("sw-order.payone-payment.creditCard.cardTypes."+t):null}}}});var ge,fe=i(()=>{ge=`{% block payone_payment_order_action_log %} {% endblock %} -`});var be={};r(be,{default:()=>_t});var y,d,_t,we=i(()=>{fe();({Criteria:y}=Shopware.Data),{Filter:d}=Shopware,_t={template:ge,inject:["repositoryFactory"],props:{order:{type:Object,required:!0}},data(){return{orderActionLogs:[],isLoading:!1,showRequestDetails:null,showResponseDetails:null}},computed:{orderActionLogRepository(){return this.repositoryFactory.create("payone_payment_order_action_log")},dateFilter(){return d.getByName("date")},currencyFilter(){return d.getByName("currency")},assetFilter(){return d.getByName("asset")},payoneCurrencyFilter(){return d.getByName("payone_currency")},orderActionLogColumns(){return[{property:"transactionId",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleTransactionId")},{property:"request",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleRequest")},{property:"response",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleResponse")},{property:"amount",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleAmount")},{property:"requestDateTime",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleRequestDateTime")}]},keyValueColumns(){return[{property:"key",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleKey")},{property:"value",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleValue")}]}},created(){this.createdComponent()},methods:{createdComponent(){this.getOrderActionLogs()},reloadActionLogs(){this.getOrderActionLogs()},getOrderActionLogs(){let e=new y;return e.addFilter(y.equals("orderId",this.order.id)),e.addSorting(y.sort("requestDateTime","ASC",!0)),this.isLoading=!0,this.orderActionLogRepository.search(e,Shopware.Context.api).then(t=>{this.orderActionLogs=t,this.isLoading=!1})},openRequest(e){this.showRequestDetails=e.requestDetails},openResponse(e){this.showResponseDetails=e.responseDetails},onCloseRequestModal(){this.showRequestDetails=null},onCloseResponseModal(){this.showResponseDetails=null},toKeyValueSource(e){let t=[];for(let a in e)t.push({key:a,value:e[a]});return t.sort((a,n)=>a.key.localeCompare(n.key)),t},downloadAsTxt(e,t,a){let n=document.createElement("a");n.href="data:text/plain;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,4)),n.download=`PAYONE-${t}-${a}.txt`,n.dispatchEvent(new MouseEvent("click")),n.remove()}}}});var Pe,_e=i(()=>{Pe=`{% block payone_payment_webhook_log %} +`});var we={};r(we,{default:()=>_t});var y,d,_t,be=i(()=>{fe();({Criteria:y}=Shopware.Data),{Filter:d}=Shopware,_t={template:ge,inject:["repositoryFactory"],props:{order:{type:Object,required:!0}},data(){return{orderActionLogs:[],isLoading:!1,showRequestDetails:null,showResponseDetails:null}},computed:{orderActionLogRepository(){return this.repositoryFactory.create("payone_payment_order_action_log")},dateFilter(){return d.getByName("date")},currencyFilter(){return d.getByName("currency")},assetFilter(){return d.getByName("asset")},payoneCurrencyFilter(){return d.getByName("payone_currency")},orderActionLogColumns(){return[{property:"transactionId",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleTransactionId")},{property:"request",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleRequest")},{property:"response",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleResponse")},{property:"amount",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleAmount")},{property:"requestDateTime",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleRequestDateTime")}]},keyValueColumns(){return[{property:"key",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleKey")},{property:"value",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleValue")}]}},created(){this.createdComponent()},methods:{createdComponent(){this.getOrderActionLogs()},reloadActionLogs(){this.getOrderActionLogs()},getOrderActionLogs(){let e=new y;return e.addFilter(y.equals("orderId",this.order.id)),e.addSorting(y.sort("requestDateTime","ASC",!0)),this.isLoading=!0,this.orderActionLogRepository.search(e,Shopware.Context.api).then(t=>{this.orderActionLogs=t,this.isLoading=!1})},openRequest(e){this.showRequestDetails=e.requestDetails},openResponse(e){this.showResponseDetails=e.responseDetails},onCloseRequestModal(){this.showRequestDetails=null},onCloseResponseModal(){this.showResponseDetails=null},toKeyValueSource(e){let t=[];for(let a in e)t.push({key:a,value:e[a]});return t.sort((a,n)=>a.key.localeCompare(n.key)),t},downloadAsTxt(e,t,a){let n=document.createElement("a");n.href="data:text/plain;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,4)),n.download=`PAYONE-${t}-${a}.txt`,n.dispatchEvent(new MouseEvent("click")),n.remove()}}}});var Pe,_e=i(()=>{Pe=`{% block payone_payment_webhook_log %} {% endblock %} @@ -853,6 +866,7 @@ ref="payoneOrderActionLogs" :order="order" @reload-entity-data="reloadEntityData" + v-if="acl.can('payone_payment_order_action_log:read')" /> {% endblock %} @@ -861,16 +875,17 @@ ref="payoneWebhookLogs" :order="order" @reload-entity-data="reloadEntityData" + v-if="acl.can('payone_payment_webhook_log:read')" /> {% endblock %} {% endblock %} -`});var Le={};r(Le,{default:()=>It});var Ct,xt,It,Ne=i(()=>{$e();({Component:Ct}=Shopware),{mapState:xt}=Ct.getComponentHelper(),It={template:De,props:{orderId:{type:String,required:!0}},computed:{...xt("swOrderDetail",["order"])},methods:{reloadEntityData(){this.$refs.payoneOrderActionLogs.reloadActionLogs(),this.$refs.payoneWebhookLogs.reloadWebhookLogs(),this.$emit("reload-entity-data")}}}});var Re,Oe=i(()=>{Re=`{% block sw_order_detail_content_tabs_extension %} +`});var Le={};r(Le,{default:()=>It});var Ct,xt,It,Ne=i(()=>{$e();({Component:Ct}=Shopware),{mapState:xt}=Ct.getComponentHelper(),It={template:De,inject:["acl"],props:{orderId:{type:String,required:!0}},computed:{...xt("swOrderDetail",["order"])},methods:{reloadEntityData(){this.$refs.payoneOrderActionLogs?.reloadActionLogs(),this.$refs.payoneWebhookLogs?.reloadWebhookLogs(),this.$emit("reload-entity-data")}}}});var Oe,Re=i(()=>{Oe=`{% block sw_order_detail_content_tabs_extension %} {% parent %} {% block sw_order_detail_content_tabs_payone %} {% endblock %} -{% endblock %}`});var Fe={};r(Fe,{default:()=>$t});var $t,Me=i(()=>{Oe();$t={template:Re,methods:{hasPayoneTransaction(e){let t=this,a=!1;return e.transactions?(e.transactions.map(function(n){t.isPayoneTransaction(n)&&t.isActiveTransaction(n)&&(a=!0)}),a):!1},isPayoneTransaction(e){return!e.extensions||!e.extensions.payonePaymentOrderTransactionData||!e.extensions.payonePaymentOrderTransactionData.transactionId?!1:e.extensions.payonePaymentOrderTransactionData.transactionId},isActiveTransaction(e){return e.stateMachineState.technicalName!=="cancelled"}}}});var w={"payone-payment":{title:"PAYONE",general:{mainMenuItemGeneral:"PAYONE",descriptionTextModule:"Einstellungen f\xFCr PAYONE",headlines:{ratepayProfiles:"Profile",ratepayProfileConfigurations:"Profile Konfigurationen"},label:{shopId:"Shop-ID",currency:"W\xE4hrung",error:"Status",invoiceCountry:"Rechnungsland",shippingCountry:"Lieferland",minBasket:"Min. Warenkorb",maxBasket:"Max. Warenkorb",reloadConfigInfo:"Profile-Konfigurationen werden beim Speichern der Plugin-Einstellungen automatisch aktualisiert."},actions:{addShop:"Shop-ID hinzuf\xFCgen"},errors:{existingShopId:"Die eingegebene ShopId existiert bereits.",emptyInputs:"Bitte f\xFCllen Sie alle Eingabefelder aus."}},settingsForm:{save:"Speichern",test:"API-Zugangsdaten testen",titleSuccess:"Erfolg",titleError:"Fehler",labelShowSpecificStatusMapping:"Statusmappingkonfiguration einblenden",helpTextShowSpecificStatusMapping:"Sie k\xF6nnen f\xFCr jede Zahlungsart ein spezifisches Statusmapping konfigurieren. Existiert eine solche Konfiguration nicht, wird auf die allgemeine Konfiguration zur\xFCckgegriffen.",messageSaveError:{ratepayProfilesUpdateFailed:"Mindestens ein Ratepay Profil konnte nicht erfolgreich gespeichert werden, bitte pr\xFCfen Sie Ihre Konfiguration."},messageTestSuccess:"Die API-Zugangsdaten wurden erfolgreich validiert.",messageTestNoTestedPayments:"Bei der Pr\xFCfung wurden keine Zahlarten getestet, weil keine der PAYONE Zahlarten aktiviert ist. Bitte aktivieren Sie mindestens eine PAYONE Zahlart unter Einstellungen --> Shop --> Zahlungsarten.",messageTestError:{general:"Die API-Zugangsdaten konnten nicht validiert werden.",creditCard:"Die API-Zugangsdaten f\xFCr PAYONE Kreditkarte sind nicht korrekt.",prepayment:"Die API-Zugangsdaten f\xFCr PAYONE Vorkasse sind nicht korrekt.",debit:"Die API-Zugangsdaten f\xFCr PAYONE Lastschrift sind nicht korrekt.",paypalExpress:"Die API-Zugangsdaten f\xFCr PAYONE PayPal Express sind nicht korrekt.",paypal:"Die API-Zugangsdaten f\xFCr PAYONE PayPal sind nicht korrekt.",payolutionInstallment:"Die API-Zugangsdaten f\xFCr PAYONE Unzer Ratenkauf sind nicht korrekt.",payolutionInvoicing:"Die API-Zugangsdaten f\xFCr PAYONE Unzer Rechnungskauf sind nicht korrekt.",payolutionDebit:"Die API-Zugangsdaten f\xFCr PAYONE Unzer Lastschrift sind nicht korrekt.",sofort:"Die API-Zugangsdaten f\xFCr PAYONE Sofort \xDCberweisung sind nicht korrekt.",eps:"Die API-Zugangsdaten f\xFCr PAYONE eps \xDCberweisung sind nicht korrekt.",iDeal:"Die API-Zugangsdaten f\xFCr PAYONE iDEAL sind nicht korrekt.",secureInvoice:"Die API-Zugangsdaten f\xFCr PAYONE Gesicherter Rechnungskauf sind nicht korrekt.",openInvoice:"Die API-Zugangsdaten f\xFCr PAYONE Rechnungskauf sind nicht korrekt.",paydirekt:"Die API-Zugangsdaten f\xFCr PAYONE paydirekt sind nicht korrekt.",trustly:"Die API-Zugangsdaten f\xFCr PAYONE Trustly sind nicht korrekt.",applePay:"Die API-Zugangsdaten f\xFCr PAYONE Apple Pay sind nicht korrekt.",bancontact:"Die API-Zugangsdaten f\xFCr PAYONE Bancontact sind nicht korrekt.",ratepayDebit:"Die API-Zugangsdaten f\xFCr PAYONE Ratepay Lastschrift sind nicht korrekt.",ratepayInstallment:"Die API-Zugangsdaten f\xFCr PAYONE Ratepay Ratenzahlung sind nicht korrekt.",ratepayInvoicing:"Die API-Zugangsdaten f\xFCr PAYONE Ratepay Rechnungskauf sind nicht korrekt.",klarnaInvoice:"Die API-Zugangsdaten f\xFCr PAYONE Klarna Rechnung sind nicht korrekt.",klarnaDirectDebit:"Die API-Zugangsdaten f\xFCr PAYONE Klarna Sofort bezahlen sind nicht korrekt.",klarnaInstallment:"Die API-Zugangsdaten f\xFCr PAYONE Klarna Ratenkauf sind nicht korrekt.",przelewy24:"Die API-Zugangsdaten f\xFCr PAYONE Przelewy24 sind nicht korrekt.",weChatPay:"Die API-Zugangsdaten f\xFCr PAYONE WeChat Pay sind nicht korrekt.",postfinanceCard:"Die API-Zugangsdaten f\xFCr PAYONE Postfinance (Card) sind nicht korrekt.",postfinanceWallet:"Die API-Zugangsdaten f\xFCr PAYONE Postfinance (Wallet) sind nicht korrekt.",alipay:"Die API-Zugangsdaten f\xFCr PAYONE Alipay sind nicht korrekt.",securedInvoice:"Die API-Zugangsdaten f\xFCr PAYONE Gesicherter Rechnungskauf sind nicht korrekt.",securedInstallment:"Die API-Zugangsdaten f\xFCr PAYONE Gesicherter Ratenkauf sind nicht korrekt.",securedDirectDebit:"Die API-Zugangsdaten f\xFCr PAYONE Gesicherte Lastschrift sind nicht korrekt.",amazonPay:"Die API-Zugangsdaten f\xFCr PAYONE Amazon Pay sind nicht korrekt.",amazonPayExpress:"Die API-Zugangsdaten f\xFCr PAYONE Amazon Pay sind nicht korrekt."}},supportModal:{menuButton:"Support",title:"Wie k\xF6nnen wir Ihnen helfen?",documentation:{description:"Lesen Sie unsere Online-Dokumentation",button:"Dokumentation"},support:{description:"Kontaktieren Sie unseren Support",button:"Technischer Support"},repository:{description:"Melden Sie Fehler und Verbesserungen",button:"GitHub"},testdata:{description:"Erstellen Sie hier Ihre pers\xF6nlichen Testdaten",button:"Testdaten"}},applePay:{cert:{notification:`F\xFCr die Nutzung von ApplePay ist ein Zertifikat/Key-Paar zur Authentifizierung des Merchants erforderlich. Die Anlage eines solchen Zertifikats wird hier beschrieben:
+{% endblock %} +`});var Fe={};r(Fe,{default:()=>$t});var $t,Me=i(()=>{Re();$t={template:Oe,inject:["acl"],methods:{hasPayoneTransaction(e){let t=this,a=!1;return e.transactions?(e.transactions.map(function(n){t.isPayoneTransaction(n)&&t.isActiveTransaction(n)&&(a=!0)}),a):!1},isPayoneTransaction(e){return!e.extensions||!e.extensions.payonePaymentOrderTransactionData||!e.extensions.payonePaymentOrderTransactionData.transactionId?!1:e.extensions.payonePaymentOrderTransactionData.transactionId},isActiveTransaction(e){return e.stateMachineState.technicalName!=="cancelled"},canAccessPayoneTab(){return(this.acl.can("payone_order_management")||this.acl.can("payone_payment_order_action_log:read")||this.acl.can("payone_payment_notification_forward:read")||this.acl.can("payone_payment_webhook_log:read"))&&this.order&&this.hasPayoneTransaction(this.order)}}}});var b={"payone-payment":{title:"PAYONE",general:{mainMenuItemGeneral:"PAYONE",descriptionTextModule:"Einstellungen f\xFCr PAYONE",headlines:{ratepayProfiles:"Profile",ratepayProfileConfigurations:"Profile Konfigurationen"},label:{shopId:"Shop-ID",currency:"W\xE4hrung",error:"Status",invoiceCountry:"Rechnungsland",shippingCountry:"Lieferland",minBasket:"Min. Warenkorb",maxBasket:"Max. Warenkorb",reloadConfigInfo:"Profile-Konfigurationen werden beim Speichern der Plugin-Einstellungen automatisch aktualisiert."},actions:{addShop:"Shop-ID hinzuf\xFCgen"},errors:{existingShopId:"Die eingegebene ShopId existiert bereits.",emptyInputs:"Bitte f\xFCllen Sie alle Eingabefelder aus."}},settingsForm:{save:"Speichern",test:"API-Zugangsdaten testen",titleSuccess:"Erfolg",titleError:"Fehler",labelShowSpecificStatusMapping:"Statusmappingkonfiguration einblenden",helpTextShowSpecificStatusMapping:"Sie k\xF6nnen f\xFCr jede Zahlungsart ein spezifisches Statusmapping konfigurieren. Existiert eine solche Konfiguration nicht, wird auf die allgemeine Konfiguration zur\xFCckgegriffen.",messageSaveError:{ratepayProfilesUpdateFailed:"Mindestens ein Ratepay Profil konnte nicht erfolgreich gespeichert werden, bitte pr\xFCfen Sie Ihre Konfiguration."},messageTestSuccess:"Die API-Zugangsdaten wurden erfolgreich validiert.",messageTestNoTestedPayments:"Bei der Pr\xFCfung wurden keine Zahlarten getestet, weil keine der PAYONE Zahlarten aktiviert ist. Bitte aktivieren Sie mindestens eine PAYONE Zahlart unter Einstellungen --> Shop --> Zahlungsarten.",messageTestError:{general:"Die API-Zugangsdaten konnten nicht validiert werden.",creditCard:"Die API-Zugangsdaten f\xFCr PAYONE Kreditkarte sind nicht korrekt.",prepayment:"Die API-Zugangsdaten f\xFCr PAYONE Vorkasse sind nicht korrekt.",debit:"Die API-Zugangsdaten f\xFCr PAYONE Lastschrift sind nicht korrekt.",paypalExpress:"Die API-Zugangsdaten f\xFCr PAYONE PayPal Express sind nicht korrekt.",paypal:"Die API-Zugangsdaten f\xFCr PAYONE PayPal sind nicht korrekt.",payolutionInstallment:"Die API-Zugangsdaten f\xFCr PAYONE Unzer Ratenkauf sind nicht korrekt.",payolutionInvoicing:"Die API-Zugangsdaten f\xFCr PAYONE Unzer Rechnungskauf sind nicht korrekt.",payolutionDebit:"Die API-Zugangsdaten f\xFCr PAYONE Unzer Lastschrift sind nicht korrekt.",sofort:"Die API-Zugangsdaten f\xFCr PAYONE Sofort \xDCberweisung sind nicht korrekt.",eps:"Die API-Zugangsdaten f\xFCr PAYONE eps \xDCberweisung sind nicht korrekt.",iDeal:"Die API-Zugangsdaten f\xFCr PAYONE iDEAL sind nicht korrekt.",secureInvoice:"Die API-Zugangsdaten f\xFCr PAYONE Gesicherter Rechnungskauf sind nicht korrekt.",openInvoice:"Die API-Zugangsdaten f\xFCr PAYONE Rechnungskauf sind nicht korrekt.",paydirekt:"Die API-Zugangsdaten f\xFCr PAYONE paydirekt sind nicht korrekt.",trustly:"Die API-Zugangsdaten f\xFCr PAYONE Trustly sind nicht korrekt.",applePay:"Die API-Zugangsdaten f\xFCr PAYONE Apple Pay sind nicht korrekt.",bancontact:"Die API-Zugangsdaten f\xFCr PAYONE Bancontact sind nicht korrekt.",ratepayDebit:"Die API-Zugangsdaten f\xFCr PAYONE Ratepay Lastschrift sind nicht korrekt.",ratepayInstallment:"Die API-Zugangsdaten f\xFCr PAYONE Ratepay Ratenzahlung sind nicht korrekt.",ratepayInvoicing:"Die API-Zugangsdaten f\xFCr PAYONE Ratepay Rechnungskauf sind nicht korrekt.",klarnaInvoice:"Die API-Zugangsdaten f\xFCr PAYONE Klarna Rechnung sind nicht korrekt.",klarnaDirectDebit:"Die API-Zugangsdaten f\xFCr PAYONE Klarna Sofort bezahlen sind nicht korrekt.",klarnaInstallment:"Die API-Zugangsdaten f\xFCr PAYONE Klarna Ratenkauf sind nicht korrekt.",przelewy24:"Die API-Zugangsdaten f\xFCr PAYONE Przelewy24 sind nicht korrekt.",weChatPay:"Die API-Zugangsdaten f\xFCr PAYONE WeChat Pay sind nicht korrekt.",postfinanceCard:"Die API-Zugangsdaten f\xFCr PAYONE Postfinance (Card) sind nicht korrekt.",postfinanceWallet:"Die API-Zugangsdaten f\xFCr PAYONE Postfinance (Wallet) sind nicht korrekt.",alipay:"Die API-Zugangsdaten f\xFCr PAYONE Alipay sind nicht korrekt.",securedInvoice:"Die API-Zugangsdaten f\xFCr PAYONE Gesicherter Rechnungskauf sind nicht korrekt.",securedInstallment:"Die API-Zugangsdaten f\xFCr PAYONE Gesicherter Ratenkauf sind nicht korrekt.",securedDirectDebit:"Die API-Zugangsdaten f\xFCr PAYONE Gesicherte Lastschrift sind nicht korrekt.",amazonPay:"Die API-Zugangsdaten f\xFCr PAYONE Amazon Pay sind nicht korrekt.",amazonPayExpress:"Die API-Zugangsdaten f\xFCr PAYONE Amazon Pay sind nicht korrekt."}},supportModal:{menuButton:"Support",title:"Wie k\xF6nnen wir Ihnen helfen?",documentation:{description:"Lesen Sie unsere Online-Dokumentation",button:"Dokumentation"},support:{description:"Kontaktieren Sie unseren Support",button:"Technischer Support"},repository:{description:"Melden Sie Fehler und Verbesserungen",button:"GitHub"},testdata:{description:"Erstellen Sie hier Ihre pers\xF6nlichen Testdaten",button:"Testdaten"}},applePay:{cert:{notification:`F\xFCr die Nutzung von ApplePay ist ein Zertifikat/Key-Paar zur Authentifizierung des Merchants erforderlich. Die Anlage eines solchen Zertifikats wird hier beschrieben:
https://docs.payone.com/display/public/PLATFORM/Special+Remarks+-+Apple+Pay#SpecialRemarks-ApplePay-Onboarding

Erstellen Sie im Anschluss unter Verwendung des folgenden Befehls eine PEM-Datei des Zertifikates:
openssl x509 -inform der -in merchant_id.cer -out merchant_id.pem

Hinterlegen Sie das Zertifikat (merchant_id.pem) und den Key (merchant_id.key) in folgendem Verzeichnis:
-
%shopwareRoot%/config/apple-pay-cert
`}},transitionActionNames:{cancel:"Stornieren",complete:"Abschlie\xDFen",pay:"Bezahlen",pay_partially:"Teilweise bezahlen",process:"Durchf\xFChren",refund:"R\xFCckerstatten",refund_partially:"Teilweise r\xFCckerstatten",remind:"Erinnern",reopen:"Wieder \xF6ffnen",retour:"Retoure",retour_partially:"Teilweise retounieren",ship:"Versenden",ship_partially:"Teilweise versenden"},messageNotBlank:"Dieser Wert darf nicht leer sein.",error:{transaction:{notFound:"Es wurde keine passende Transaktion gefundend",orderNotFound:"Es wurde keine passende Bestellung gefundend"}}},"sw-privileges":{additional_permissions:{Payone:{label:"PAYONE",payone_order_management:"PAYONE Transaktionsmanagement"}}}};var _={"payone-payment":{title:"PAYONE",general:{mainMenuItemGeneral:"PAYONE",descriptionTextModule:"Settings for PAYONE",headlines:{ratepayProfiles:"Profile",ratepayProfileConfigurations:"Profile configuration"},label:{shopId:"Shop-ID",currency:"Currency",error:"Status",invoiceCountry:"Invoice Country",shippingCountry:"Shipping Country",minBasket:"Min. Basket",maxBasket:"Max. Basket",reloadConfigInfo:"Profile-Configuration got automatically updated during saving the plugin configuration"},actions:{addShop:"Add Shop-ID"},errors:{existingShopId:"The entered shop-id already exists.",emptyInputs:"Please fill all input fields."}},settingsForm:{save:"Save",test:"Test API Credentials",titleSuccess:"Success",titleError:"Error",labelShowSpecificStatusMapping:"Display state mapping configuration",helpTextShowSpecificStatusMapping:"If not configured the general status mapping config will be applied.",messageSaveError:{ratepayProfilesUpdateFailed:"At least one Ratepay profile could not be saved successfully, please check your configuration."},messageTestSuccess:"The API credentials were verified successfully.",messageTestNoTestedPayments:"No payment methods were tested during the check because none of the PAYONE payment methods are activated. Please activate at least one PAYONE payment method under Settings --> Shop --> Payment.",messageTestError:{general:"The API credentials could not be verified successfully.",creditCard:"The API credentials for PAYONE Credit Card are not valid.",prepayment:"The API credentials for PAYONE Prepayment are not valid.",debit:"The API credentials for PAYONE Direct Debit are not valid.",paypalExpress:"The API credentials for PAYONE PayPal Express are not valid.",paypal:"The API credentials for PAYONE PayPal are not valid.",payolutionInstallment:"The API credentials for PAYONE Unzer Ratenkauf are not valid.",payolutionInvoicing:"The API credentials for PAYONE Unzer Rechnungskauf are not valid.",payolutionDebit:"The API credentials for PAYONE Unzer Lastschrift are not valid.",sofort:"The API credentials for PAYONE Sofort are not valid.",eps:"The API credentials for PAYONE eps are not valid.",iDeal:"The API credentials for PAYONE iDEAL are not valid.",secureInvoice:"The API credentials for PAYONE Secure Invoice are not valid.",openInvoice:"The API credentials for PAYONE Invoice are not valid.",paydirekt:"The API credentials for PAYONE paydirekt are not valid.",trustly:"The API credentials for PAYONE Trustly are not valid.",applePay:"The API credentials for PAYONE Apple Pay are not valid.",bancontact:"The API credentials for PAYONE Bancontact payment are not valid.",ratepayDebit:"The API credentials for PAYONE Ratepay Direct Debit payment are not valid.",ratepayInstallment:"The API credentials for PAYONE Ratepay Installments payment are not valid.",ratepayInvoicing:"The API credentials for PAYONE Ratepay Open Invoice payment are not valid.",klarnaInvoice:"The API credentials for PAYONE Klarna Rechnung are not valid.",klarnaDirectDebit:"The API credentials for PAYONE Klarna Sofort bezahlen are not valid.",klarnaInstallment:"The API credentials for PAYONE Klarna Ratenkauf are not valid.",przelewy24:"The API credentials for PAYONE Przelewy24 are not valid.",weChatPay:"The API credentials for PAYONE WeChat Pay are not valid.",postfinanceCard:"The API credentials for PAYONE Postfinance (Card) are not valid.",postfinanceWallet:"The API credentials for PAYONE Postfinance (Wallet) are not valid.",alipay:"The API credentials for PAYONE Alipay are not valid.",securedInvoice:"The API credentials for PAYONE Secured Invoice are not valid.",securedInstallment:"The API credentials for PAYONE Secured Installment are not valid.",securedDirectDebit:"The API credentials for PAYONE Secured Direct Debit are not valid.",amazonPay:"The API credentials for PAYONE Amazon pay are not valid.",amazonPayExpress:"The API credentials for PAYONE Amazon pay are not valid."}},supportModal:{menuButton:"Support",title:"How Can We Help You?",documentation:{description:"Read our online manual",button:"Online Manual"},support:{description:"Contact our technical support",button:"Tech Support"},repository:{description:"Report errors on GitHub",button:"GitHub"},testdata:{description:"Create your personal test data here",button:"Test Data"}},applePay:{cert:{notification:`The ApplePay merchant authentication requires a certificate/key-pair. Further information:
+
%shopwareRoot%/config/apple-pay-cert
`}},transitionActionNames:{cancel:"Stornieren",complete:"Abschlie\xDFen",pay:"Bezahlen",pay_partially:"Teilweise bezahlen",process:"Durchf\xFChren",refund:"R\xFCckerstatten",refund_partially:"Teilweise r\xFCckerstatten",remind:"Erinnern",reopen:"Wieder \xF6ffnen",retour:"Retoure",retour_partially:"Teilweise retounieren",ship:"Versenden",ship_partially:"Teilweise versenden"},messageNotBlank:"Dieser Wert darf nicht leer sein.",error:{transaction:{notFound:"Es wurde keine passende Transaktion gefundend",orderNotFound:"Es wurde keine passende Bestellung gefundend"}}},"sw-privileges":{additional_permissions:{Payone:{label:"PAYONE",payone_order_management:"Transaktionsmanagement",payone_configuration:"Konfiguration",payone_webhook_forward:"Webhook Weiterleitung Verwaltung",payone_webhook_resend:"Webhook Weiterleitung erneut senden"}}}};var _={"payone-payment":{title:"PAYONE",general:{mainMenuItemGeneral:"PAYONE",descriptionTextModule:"Settings for PAYONE",headlines:{ratepayProfiles:"Profile",ratepayProfileConfigurations:"Profile configuration"},label:{shopId:"Shop-ID",currency:"Currency",error:"Status",invoiceCountry:"Invoice Country",shippingCountry:"Shipping Country",minBasket:"Min. Basket",maxBasket:"Max. Basket",reloadConfigInfo:"Profile-Configuration got automatically updated during saving the plugin configuration"},actions:{addShop:"Add Shop-ID"},errors:{existingShopId:"The entered shop-id already exists.",emptyInputs:"Please fill all input fields."}},settingsForm:{save:"Save",test:"Test API Credentials",titleSuccess:"Success",titleError:"Error",labelShowSpecificStatusMapping:"Display state mapping configuration",helpTextShowSpecificStatusMapping:"If not configured the general status mapping config will be applied.",messageSaveError:{ratepayProfilesUpdateFailed:"At least one Ratepay profile could not be saved successfully, please check your configuration."},messageTestSuccess:"The API credentials were verified successfully.",messageTestNoTestedPayments:"No payment methods were tested during the check because none of the PAYONE payment methods are activated. Please activate at least one PAYONE payment method under Settings --> Shop --> Payment.",messageTestError:{general:"The API credentials could not be verified successfully.",creditCard:"The API credentials for PAYONE Credit Card are not valid.",prepayment:"The API credentials for PAYONE Prepayment are not valid.",debit:"The API credentials for PAYONE Direct Debit are not valid.",paypalExpress:"The API credentials for PAYONE PayPal Express are not valid.",paypal:"The API credentials for PAYONE PayPal are not valid.",payolutionInstallment:"The API credentials for PAYONE Unzer Ratenkauf are not valid.",payolutionInvoicing:"The API credentials for PAYONE Unzer Rechnungskauf are not valid.",payolutionDebit:"The API credentials for PAYONE Unzer Lastschrift are not valid.",sofort:"The API credentials for PAYONE Sofort are not valid.",eps:"The API credentials for PAYONE eps are not valid.",iDeal:"The API credentials for PAYONE iDEAL are not valid.",secureInvoice:"The API credentials for PAYONE Secure Invoice are not valid.",openInvoice:"The API credentials for PAYONE Invoice are not valid.",paydirekt:"The API credentials for PAYONE paydirekt are not valid.",trustly:"The API credentials for PAYONE Trustly are not valid.",applePay:"The API credentials for PAYONE Apple Pay are not valid.",bancontact:"The API credentials for PAYONE Bancontact payment are not valid.",ratepayDebit:"The API credentials for PAYONE Ratepay Direct Debit payment are not valid.",ratepayInstallment:"The API credentials for PAYONE Ratepay Installments payment are not valid.",ratepayInvoicing:"The API credentials for PAYONE Ratepay Open Invoice payment are not valid.",klarnaInvoice:"The API credentials for PAYONE Klarna Rechnung are not valid.",klarnaDirectDebit:"The API credentials for PAYONE Klarna Sofort bezahlen are not valid.",klarnaInstallment:"The API credentials for PAYONE Klarna Ratenkauf are not valid.",przelewy24:"The API credentials for PAYONE Przelewy24 are not valid.",weChatPay:"The API credentials for PAYONE WeChat Pay are not valid.",postfinanceCard:"The API credentials for PAYONE Postfinance (Card) are not valid.",postfinanceWallet:"The API credentials for PAYONE Postfinance (Wallet) are not valid.",alipay:"The API credentials for PAYONE Alipay are not valid.",securedInvoice:"The API credentials for PAYONE Secured Invoice are not valid.",securedInstallment:"The API credentials for PAYONE Secured Installment are not valid.",securedDirectDebit:"The API credentials for PAYONE Secured Direct Debit are not valid.",amazonPay:"The API credentials for PAYONE Amazon pay are not valid.",amazonPayExpress:"The API credentials for PAYONE Amazon pay are not valid."}},supportModal:{menuButton:"Support",title:"How Can We Help You?",documentation:{description:"Read our online manual",button:"Online Manual"},support:{description:"Contact our technical support",button:"Tech Support"},repository:{description:"Report errors on GitHub",button:"GitHub"},testdata:{description:"Create your personal test data here",button:"Test Data"}},applePay:{cert:{notification:`The ApplePay merchant authentication requires a certificate/key-pair. Further information:
https://docs.payone.com/display/public/PLATFORM/Special+Remarks+-+Apple+Pay#SpecialRemarks-ApplePay-Onboarding

Create a pem-File afterwards by using the following command:
openssl x509 -inform der -in merchant_id.cer -out merchant_id.pem

Copy certificate (merchant_id.pem) and key (merchant_id.key) file into the following folder:
-
%shopwareRoot%/config/apple-pay-cert
`}},transitionActionNames:{cancel:"Cancel",complete:"Complete",pay:"Pay",pay_partially:"Pay partially",process:"Process",refund:"Refund",refund_partially:"Refund partially",remind:"Remind",reopen:"Reopen",retour:"Retour",retour_partially:"Retour partially",ship:"Ship",ship_partially:"Ship partially"},messageNotBlank:"This field must not be empty.",error:{transaction:{notFound:"No matching transaction could be found",orderNotFound:"No matching order could be found"}}},"sw-privileges":{additional_permissions:{Payone:{label:"PAYONE",payone_order_management:"PAYONE transaction management"}}}};var{Filter:P}=Shopware;P.register("payone_currency",(e,t,a)=>e===null?"-":(e/=100,P.getByName("currency")(e,t,a)));var{Component:Ze,Utils:k}=Shopware;Ze.extend("payone-payment-settings","sw-system-config",{inject:["PayonePaymentSettingsService"],methods:{_getShowPaymentStatusFieldsFieldName(e){return`PayonePayment.settings.${e}_show_status_mapping`},async readConfig(){this.stateMaschineOptions=await this.PayonePaymentSettingsService.getStateMachineTransitionActions().then(e=>e.data.map(t=>{let a=`payone-payment.transitionActionNames.${t.label}`,n=this.$t(a);return n===a&&(n=t.label),{id:t.value,name:n}})),await this.$super("readConfig"),this.config.forEach(e=>{let t=e.name.match(/^payment_(.*)$/),a=t?t[1]:null;a&&(this.addApiConfigurationFieldsToPaymentSettingCard(e,a),this.addPaymentStatusFieldsToPaymentSettingCard(e,a)),(e.name.startsWith("payment_")||e.name==="status_mapping")&&(e.setShowFields=n=>{e.showFields=n,e.elements.forEach(o=>{o.hidden=!n}),this.showPaymentStatusFieldsBasedOnToggle(e)},e.setShowFields(!1))})},addApiConfigurationFieldsToPaymentSettingCard(e,t){let a=["merchantId","accountId","portalId","portalKey"],n=this.config.find(s=>s.name==="basic_configuration"),o=[];n.elements.forEach(s=>{let l=s.name.match(/\.([^.]+)$/),c=l?l[1]:null;if(!c||!a.includes(c))return;let u=k.object.cloneDeep(s);u.name=s.name.replace("."+c,"."+t+(c[0].toUpperCase()+c.slice(1))),u.config.helpText={"en-GB":"The basic configuration value is used, if nothing is entered here.","de-DE":"Es wird der Wert aus der Grundeinstellung verwendet, wenn hier kein Wert eingetragen ist."},o.push(u)}),e.elements=o.concat(e.elements)},addPaymentStatusFieldsToPaymentSettingCard(e,t){e.elements.push({config:{componentName:"sw-switch-field",label:{"en-GB":"Display state mapping configuration","de-DE":"Statusmappingkonfiguration einblenden"},helpText:{"en-GB":"If not configured the general status mapping config will be applied.","de-DE":"Sie k\xF6nnen f\xFCr jede Zahlungsart ein spezifisches Statusmapping konfigurieren. Existiert eine solche Konfiguration nicht, wird auf die allgemeine Konfiguration zur\xFCckgegriffen."}},name:this._getShowPaymentStatusFieldsFieldName(e.name)}),this.config.find(n=>n.name==="status_mapping").elements.forEach(n=>{let o=k.object.cloneDeep(n);o.name=n.name.replace(".paymentStatus",`.${t}PaymentStatus`),e.elements.push(o)})},getElementBind(e,t){let a=this.$super("getElementBind",e,t);return(e.name.includes("PaymentStatus")||e.name.includes(".paymentStatus"))&&(a.config.options=this.stateMaschineOptions),a},getInheritWrapperBind(e){let t=this.$super("getInheritWrapperBind",e);return t.hidden=e.hidden,t},showPaymentStatusFieldsBasedOnToggle(e){let t=this.actualConfigData[this.currentSalesChannelId];if(!t)return;let a=t[this._getShowPaymentStatusFieldsFieldName(e.name)];e.elements.forEach(n=>{n.name.includes("PaymentStatus")&&(n.hidden=!a)})},emitConfig(){this.config.forEach(e=>this.showPaymentStatusFieldsBasedOnToggle(e)),this.$super("emitConfig")}}});Shopware.Component.register("payone-payment-plugin-icon",()=>Promise.resolve().then(()=>(C(),T)));Shopware.Component.register("payone-ratepay-profile-configurations",()=>Promise.resolve().then(()=>(D(),$)));Shopware.Component.register("payone-ratepay-profiles",()=>Promise.resolve().then(()=>(F(),R)));Shopware.Component.register("payone-settings",()=>Promise.resolve().then(()=>(G(),z)));Shopware.Module.register("payone-payment",{type:"plugin",name:"PayonePayment",title:"payone-payment.general.mainMenuItemGeneral",description:"payone-payment.general.descriptionTextModule",version:"1.0.0",targetVersion:"1.0.0",icon:"regular-cog",snippets:{"de-DE":w,"en-GB":_},routeMiddleware(e,t){e(t)},routes:{index:{component:"payone-settings",path:"index",meta:{parentPath:"sw.settings.index"}}},settingsItem:[{name:"payone-payment",to:"payone.payment.index",label:"payone-payment.general.mainMenuItemGeneral",group:"plugins",iconComponent:"payone-payment-plugin-icon",backgroundEnabled:!1}]});var Z={payonePayment:{notificationTarget:{module:{title:"Payone Notificationweiterleitungen",buttonTitle:"Notifications"},list:{title:"Notificationweiterleitungen",empty:"Keine Eintr\xE4ge",buttonCreate:"Weiterleitungsziel anlegen"},detail:{headline:"Notificationweiterleitung",placeholder:{url:"Url",username:"Benutzer",password:"Passwort"},label:{url:"Url",isBasicAuth:"Basic Auth",txactions:"txactions",buttonSave:"Speichern",buttonCancel:"Abbrechen",username:"Benutzer",password:"Passwort"}},columns:{url:"Url",isBasicAuth:"Basic Auth",txactions:"txactions"},actions:{requeue:"Erneut senden"},messages:{success:"Die Weiterleitung wurde erfolgreich in Auftrag gegeben."}}}};var W={payonePayment:{notificationTarget:{module:{title:"Payone notification forward",buttonTitle:"Notifications"},list:{title:"Notification forward",empty:"No entries",buttonCreate:"Add new notification target"},detail:{headline:"Notification forward",placeholder:{url:"Url",username:"Username",password:"Password"},label:{url:"Url",isBasicAuth:"Basic Auth",txactions:"txactions",buttonSave:"Save",buttonCancel:"Cancel",username:"Username",password:"Password"}},columns:{url:"Url",isBasicAuth:"Basic Auth",txactions:"txactions"},actions:{requeue:"Requeue"},messages:{success:"The notification forward has been successfully queued."}}}};Shopware.Component.register("payone-notification-target-detail",Promise.resolve().then(()=>(j(),V)));Shopware.Component.register("payone-notification-target-list",Promise.resolve().then(()=>(X(),J)));Shopware.Module.register("payone-notification-target",{type:"plugin",name:"PayoneNotificationTarget",title:"payonePayment.notificationTarget.module.title",description:"payonePayment.notificationTarget.module.title",icon:"regular-cog",snippets:{"de-DE":Z,"en-GB":W},routes:{list:{component:"payone-notification-target-list",path:"list"},detail:{component:"payone-notification-target-detail",path:"detail/:id",props:{default(e){return{notificationTargetId:e.params.id}}},meta:{parentPath:"payone.notification.target.list"}},create:{component:"payone-notification-target-detail",path:"create",meta:{parentPath:"payone.notification.target.list"}}}});Shopware.Component.register("payone-capture-button",()=>Promise.resolve().then(()=>(oe(),ie)));Shopware.Component.register("payone-order-items",()=>Promise.resolve().then(()=>(de(),ce)));Shopware.Component.register("payone-payment-management",()=>Promise.resolve().then(()=>(he(),ye)));Shopware.Component.register("payone-payment-order-action-log",()=>Promise.resolve().then(()=>(we(),be)));Shopware.Component.register("payone-payment-webhook-log",()=>Promise.resolve().then(()=>(ve(),Ae)));Shopware.Component.register("payone-refund-button",()=>Promise.resolve().then(()=>(Ee(),Ie)));Shopware.Component.register("sw-order-detail-payone",()=>Promise.resolve().then(()=>(Ne(),Le)));Shopware.Component.override("sw-order-detail",()=>Promise.resolve().then(()=>(Me(),Fe)));Shopware.Module.register("sw-order-detail-tab-payone",{routeMiddleware(e,t){t.name==="sw.order.detail"&&t.children.push({name:"sw.order.detail.payone",path:"payone",component:"sw-order-detail-payone",meta:{parentPath:"sw.order.detail",meta:{parentPath:"sw.order.index",privilege:"order.viewer"}}}),e(t)}});var{Application:qe}=Shopware,p=Shopware.Classes.ApiService,f=class extends p{constructor(t,a,n="payone"){super(t,a,n)}requeueNotificationForward(t){let a=`_action/${this.getApiBasePath()}/requeue-forward`;return this.httpClient.post(a,t,{headers:this.getBasicHeaders()}).then(n=>p.handleResponse(n))}capturePayment(t){let a=`_action/${this.getApiBasePath()}/capture-payment`;return this.httpClient.post(a,t,{headers:this.getBasicHeaders()}).then(n=>p.handleResponse(n))}refundPayment(t){let a=`_action/${this.getApiBasePath()}/refund-payment`;return this.httpClient.post(a,t,{headers:this.getBasicHeaders()}).then(n=>p.handleResponse(n))}};qe.addServiceProvider("PayonePaymentService",e=>{let t=qe.getContainer("init");return new f(t.httpClient,e.loginService)});var{Application:Be}=Shopware,g=Shopware.Classes.ApiService,b=class extends g{constructor(t,a,n="payone_payment"){super(t,a,n)}validateApiCredentials(t){let a=this.getBasicHeaders();return this.httpClient.post(`_action/${this.getApiBasePath()}/validate-api-credentials`,{credentials:t},{headers:a}).then(n=>g.handleResponse(n))}getStateMachineTransitionActions(){let t=this.getBasicHeaders();return this.httpClient.get(`_action/${this.getApiBasePath()}/get-state-machine-transition-actions`,{headers:t}).then(a=>g.handleResponse(a))}hasApplePayCert(){let t=this.getBasicHeaders();return this.httpClient.get(`_action/${this.getApiBasePath()}/check-apple-pay-cert`,{headers:t}).catch(()=>!1).then(a=>!!a)}};Be.addServiceProvider("PayonePaymentSettingsService",e=>{let t=Be.getContainer("init");return new b(t.httpClient,e.loginService)});try{Shopware.Service("privileges").addPrivilegeMappingEntry({category:"additional_permissions",parent:null,key:"Payone",roles:{payone_order_management:{privileges:["order_transaction:update","order_line_item:update","state_machine_history:create",Shopware.Service("privileges").getPrivileges("order.viewer")],dependencies:[]}}})}catch{}})(); +
%shopwareRoot%/config/apple-pay-cert
`}},transitionActionNames:{cancel:"Cancel",complete:"Complete",pay:"Pay",pay_partially:"Pay partially",process:"Process",refund:"Refund",refund_partially:"Refund partially",remind:"Remind",reopen:"Reopen",retour:"Retour",retour_partially:"Retour partially",ship:"Ship",ship_partially:"Ship partially"},messageNotBlank:"This field must not be empty.",error:{transaction:{notFound:"No matching transaction could be found",orderNotFound:"No matching order could be found"}}},"sw-privileges":{additional_permissions:{Payone:{label:"PAYONE",payone_order_management:"Transaction management",payone_configuration:"Configuration",payone_webhook_forward:"Manage webhook forwards",payone_webhook_resend:"Allow Webhook forward resend"}}}};var{Filter:P}=Shopware;P.register("payone_currency",(e,t,a)=>e===null?"-":(e/=100,P.getByName("currency")(e,t,a)));var{Component:Ze,Utils:k}=Shopware;Ze.extend("payone-payment-settings","sw-system-config",{inject:["PayonePaymentSettingsService"],methods:{_getShowPaymentStatusFieldsFieldName(e){return`PayonePayment.settings.${e}_show_status_mapping`},async readConfig(){this.stateMaschineOptions=await this.PayonePaymentSettingsService.getStateMachineTransitionActions().then(e=>e.data.map(t=>{let a=`payone-payment.transitionActionNames.${t.label}`,n=this.$t(a);return n===a&&(n=t.label),{id:t.value,name:n}})),await this.$super("readConfig"),this.config.forEach(e=>{let t=e.name.match(/^payment_(.*)$/),a=t?t[1]:null;a&&(this.addApiConfigurationFieldsToPaymentSettingCard(e,a),this.addPaymentStatusFieldsToPaymentSettingCard(e,a)),(e.name.startsWith("payment_")||e.name==="status_mapping")&&(e.setShowFields=n=>{e.showFields=n,e.elements.forEach(o=>{o.hidden=!n}),this.showPaymentStatusFieldsBasedOnToggle(e)},e.setShowFields(!1))})},addApiConfigurationFieldsToPaymentSettingCard(e,t){let a=["merchantId","accountId","portalId","portalKey"],n=this.config.find(s=>s.name==="basic_configuration"),o=[];n.elements.forEach(s=>{let l=s.name.match(/\.([^.]+)$/),c=l?l[1]:null;if(!c||!a.includes(c))return;let u=k.object.cloneDeep(s);u.name=s.name.replace("."+c,"."+t+(c[0].toUpperCase()+c.slice(1))),u.config.helpText={"en-GB":"The basic configuration value is used, if nothing is entered here.","de-DE":"Es wird der Wert aus der Grundeinstellung verwendet, wenn hier kein Wert eingetragen ist."},o.push(u)}),e.elements=o.concat(e.elements)},addPaymentStatusFieldsToPaymentSettingCard(e,t){e.elements.push({config:{componentName:"sw-switch-field",label:{"en-GB":"Display state mapping configuration","de-DE":"Statusmappingkonfiguration einblenden"},helpText:{"en-GB":"If not configured the general status mapping config will be applied.","de-DE":"Sie k\xF6nnen f\xFCr jede Zahlungsart ein spezifisches Statusmapping konfigurieren. Existiert eine solche Konfiguration nicht, wird auf die allgemeine Konfiguration zur\xFCckgegriffen."}},name:this._getShowPaymentStatusFieldsFieldName(e.name)}),this.config.find(n=>n.name==="status_mapping").elements.forEach(n=>{let o=k.object.cloneDeep(n);o.name=n.name.replace(".paymentStatus",`.${t}PaymentStatus`),e.elements.push(o)})},getElementBind(e,t){let a=this.$super("getElementBind",e,t);return(e.name.includes("PaymentStatus")||e.name.includes(".paymentStatus"))&&(a.config.options=this.stateMaschineOptions),a},getInheritWrapperBind(e){let t=this.$super("getInheritWrapperBind",e);return t.hidden=e.hidden,t},showPaymentStatusFieldsBasedOnToggle(e){let t=this.actualConfigData[this.currentSalesChannelId];if(!t)return;let a=t[this._getShowPaymentStatusFieldsFieldName(e.name)];e.elements.forEach(n=>{n.name.includes("PaymentStatus")&&(n.hidden=!a)})},emitConfig(){this.config.forEach(e=>this.showPaymentStatusFieldsBasedOnToggle(e)),this.$super("emitConfig")}}});Shopware.Component.register("payone-payment-plugin-icon",()=>Promise.resolve().then(()=>(C(),T)));Shopware.Component.register("payone-ratepay-profile-configurations",()=>Promise.resolve().then(()=>(D(),$)));Shopware.Component.register("payone-ratepay-profiles",()=>Promise.resolve().then(()=>(F(),O)));Shopware.Component.register("payone-settings",()=>Promise.resolve().then(()=>(G(),z)));Shopware.Module.register("payone-payment",{type:"plugin",name:"PayonePayment",title:"payone-payment.general.mainMenuItemGeneral",description:"payone-payment.general.descriptionTextModule",version:"1.0.0",targetVersion:"1.0.0",icon:"regular-cog",snippets:{"de-DE":b,"en-GB":_},routeMiddleware(e,t){e(t)},routes:{index:{component:"payone-settings",path:"index",meta:{parentPath:"sw.settings.index",privilege:"payone:configuration"}}},settingsItem:[{name:"payone-payment",to:"payone.payment.index",label:"payone-payment.general.mainMenuItemGeneral",group:"plugins",iconComponent:"payone-payment-plugin-icon",backgroundEnabled:!1,privilege:"payone:configuration"}]});var Z={payonePayment:{notificationTarget:{module:{title:"Payone Notificationweiterleitungen",buttonTitle:"Notifications"},list:{title:"Notificationweiterleitungen",empty:"Keine Eintr\xE4ge",buttonCreate:"Weiterleitungsziel anlegen"},detail:{headline:"Notificationweiterleitung",placeholder:{url:"Url",username:"Benutzer",password:"Passwort"},label:{url:"Url",isBasicAuth:"Basic Auth",txactions:"txactions",buttonSave:"Speichern",buttonCancel:"Abbrechen",username:"Benutzer",password:"Passwort"}},columns:{url:"Url",isBasicAuth:"Basic Auth",txactions:"txactions"},actions:{requeue:"Erneut senden"},messages:{success:"Die Weiterleitung wurde erfolgreich in Auftrag gegeben."}}}};var W={payonePayment:{notificationTarget:{module:{title:"Payone notification forward",buttonTitle:"Notifications"},list:{title:"Notification forward",empty:"No entries",buttonCreate:"Add new notification target"},detail:{headline:"Notification forward",placeholder:{url:"Url",username:"Username",password:"Password"},label:{url:"Url",isBasicAuth:"Basic Auth",txactions:"txactions",buttonSave:"Save",buttonCancel:"Cancel",username:"Username",password:"Password"}},columns:{url:"Url",isBasicAuth:"Basic Auth",txactions:"txactions"},actions:{requeue:"Requeue"},messages:{success:"The notification forward has been successfully queued."}}}};Shopware.Component.register("payone-notification-target-detail",Promise.resolve().then(()=>(j(),U)));Shopware.Component.register("payone-notification-target-list",Promise.resolve().then(()=>(X(),J)));Shopware.Module.register("payone-notification-target",{type:"plugin",name:"PayoneNotificationTarget",title:"payonePayment.notificationTarget.module.title",description:"payonePayment.notificationTarget.module.title",icon:"regular-cog",snippets:{"de-DE":Z,"en-GB":W},routes:{list:{component:"payone-notification-target-list",path:"list",meta:{privilege:"payone_payment_notification_target:read"}},detail:{component:"payone-notification-target-detail",path:"detail/:id",props:{default(e){return{notificationTargetId:e.params.id}}},meta:{parentPath:"payone.notification.target.list",privilege:"payone_payment_notification_target:read"}},create:{component:"payone-notification-target-detail",path:"create",meta:{parentPath:"payone.notification.target.list",privilege:"payone_payment_notification_target:create"}}}});Shopware.Component.register("payone-capture-button",()=>Promise.resolve().then(()=>(oe(),ie)));Shopware.Component.register("payone-order-items",()=>Promise.resolve().then(()=>(de(),ce)));Shopware.Component.register("payone-payment-management",()=>Promise.resolve().then(()=>(he(),ye)));Shopware.Component.register("payone-payment-order-action-log",()=>Promise.resolve().then(()=>(be(),we)));Shopware.Component.register("payone-payment-webhook-log",()=>Promise.resolve().then(()=>(ve(),Ae)));Shopware.Component.register("payone-refund-button",()=>Promise.resolve().then(()=>(Ee(),Ie)));Shopware.Component.register("sw-order-detail-payone",()=>Promise.resolve().then(()=>(Ne(),Le)));Shopware.Component.override("sw-order-detail",()=>Promise.resolve().then(()=>(Me(),Fe)));Shopware.Module.register("sw-order-detail-tab-payone",{routeMiddleware(e,t){t.name==="sw.order.detail"&&t.children.push({name:"sw.order.detail.payone",path:"payone",component:"sw-order-detail-payone",meta:{parentPath:"sw.order.detail",meta:{parentPath:"sw.order.index",privilege:"order.viewer"}}}),e(t)}});var{Application:qe}=Shopware,p=Shopware.Classes.ApiService,f=class extends p{constructor(t,a,n="payone"){super(t,a,n)}requeueNotificationForward(t){let a=`_action/${this.getApiBasePath()}/requeue-forward`;return this.httpClient.post(a,t,{headers:this.getBasicHeaders()}).then(n=>p.handleResponse(n))}capturePayment(t){let a=`_action/${this.getApiBasePath()}/capture-payment`;return this.httpClient.post(a,t,{headers:this.getBasicHeaders()}).then(n=>p.handleResponse(n))}refundPayment(t){let a=`_action/${this.getApiBasePath()}/refund-payment`;return this.httpClient.post(a,t,{headers:this.getBasicHeaders()}).then(n=>p.handleResponse(n))}};qe.addServiceProvider("PayonePaymentService",e=>{let t=qe.getContainer("init");return new f(t.httpClient,e.loginService)});var{Application:Be}=Shopware,g=Shopware.Classes.ApiService,w=class extends g{constructor(t,a,n="payone_payment"){super(t,a,n)}validateApiCredentials(t){let a=this.getBasicHeaders();return this.httpClient.post(`_action/${this.getApiBasePath()}/validate-api-credentials`,{credentials:t},{headers:a}).then(n=>g.handleResponse(n))}getStateMachineTransitionActions(){let t=this.getBasicHeaders();return this.httpClient.get(`_action/${this.getApiBasePath()}/get-state-machine-transition-actions`,{headers:t}).then(a=>g.handleResponse(a))}hasApplePayCert(){let t=this.getBasicHeaders();return this.httpClient.get(`_action/${this.getApiBasePath()}/check-apple-pay-cert`,{headers:t}).catch(()=>!1).then(a=>!!a)}};Be.addServiceProvider("PayonePaymentSettingsService",e=>{let t=Be.getContainer("init");return new w(t.httpClient,e.loginService)});try{Shopware.Service("privileges").addPrivilegeMappingEntry({category:"additional_permissions",parent:null,key:"Payone",roles:{payone_order_management:{privileges:["payone_order_management","payone_payment_order_transaction_data:read","payone_payment_order_transaction_data:update","payone_payment_order_action_log:read","payone_payment_order_action_log:create","payone_payment_webhook_log:read","payone_payment_notification_forward:read","payone_payment_notification_forward:create"],dependencies:[]},payone_configuration:{privileges:["system_config:read","system_config:create","system_config:update","system_config:delete","currency:read","sales_channel:read","payone:configuration"],dependencies:[]},payone_webhook_forward:{privileges:["payone_payment_notification_target:read","payone_payment_notification_target:create","payone_payment_notification_target:update","payone_payment_notification_target:delete","payone:manage_webhook_forwards"],dependencies:[]},payone_webhook_resend:{privileges:["payone_webhook_resend"],dependencies:[]}}})}catch{}})();