\n {% block unzer_payment_actions_amount_field %}\n \n \n \n
\n {% endblock %}\n \n \n {% block unzer_payment_actions_charge_button %}\n \n {{ $tc(\'unzer-payment.paymentDetails.actions.chargeButton\') }}\n \n {% endblock %}\n\n {% block unzer_payment_actions_cancel_button %}\n \n {{ $tc(\'unzer-payment.paymentDetails.actions.cancelButton\') }}\n \n {% endblock %}\n \n \n {% block unzer_payment_actions_reason_field %}\n \n \n {% endblock %}\n\n {% block unzer_payment_actions_refund_button %}\n \n {{ $tc(\'unzer-payment.paymentDetails.actions.refundButton\') }}\n \n {% endblock %}\n \n {% block unzer_payment_actions_button_container_inner %}{% endblock %}\n
\n \n\n \n {{ $tc(\'unzer-payment.paymentDetails.actions.noActions\') }}\n
\n{% endblock %}',inject:["UnzerPaymentService"],mixins:[t.getByName("notification")],data(){return{isLoading:!1,isSuccessful:!1,transactionAmount:0,reasonCode:null}},props:{transactionResource:{type:Object,required:!0},paymentResource:{type:Object,required:!0},decimalPrecision:{type:Number,required:!0,default:4}},computed:{isChargePossible:function(){return"authorization"===this.transactionResource.type&&"error"!==this.transactionResource.state},isRefundPossible:function(){return"charge"===this.transactionResource.type&&"error"!==this.transactionResource.state&&!(this.transactionResource.isFirst&&"085b64d0028a8bd447294e03c4eb411a"===this.paymentResource.paymentMethodId&&"pending"!==this.paymentResource.state.name&&"partly"!==this.paymentResource.state.name)},maxTransactionAmount(){let e=0,t=this.isRefundPossible&&"085b64d0028a8bd447294e03c4eb411a"===this.paymentResource.paymentMethodId;return this.isRefundPossible&&(e=this.transactionResource.amount),this.isChargePossible&&(e=this.paymentResource.amount.remaining),"remainingAmount"in this.transactionResource&&(e=this.transactionResource.remainingAmount),this.transactionResource.isFirst&&t&&(e=this.paymentResource.amount.remaining),e/10**this.paymentResource.amount.decimalPrecision},reasonCodeSelection(){return[{label:this.$tc("unzer-payment.paymentDetails.actions.reason.cancel"),value:"CANCEL"},{label:this.$tc("unzer-payment.paymentDetails.actions.reason.credit"),value:"CREDIT"},{label:this.$tc("unzer-payment.paymentDetails.actions.reason.return"),value:"RETURN"}]}},created(){this.transactionAmount=this.maxTransactionAmount},methods:{charge(){this.isLoading=!0,this.UnzerPaymentService.chargeTransaction(this.paymentResource.orderTransactionId,this.transactionResource.id,this.transactionAmount).then(()=>{this.createNotificationSuccess({title:this.$tc("unzer-payment.paymentDetails.notifications.chargeSuccessTitle"),message:this.$tc("unzer-payment.paymentDetails.notifications.chargeSuccessMessage")}),this.isSuccessful=!0,this.$emit("reload")}).catch(e=>{let t=e.response.data.errors[0];"generic-error"===t&&(t=this.$tc("unzer-payment.paymentDetails.notifications.genericErrorMessage")),"paylater-invoice-document-required"===t&&(t=this.$tc("unzer-payment.paymentDetails.notifications.paylaterInvoiceDocumentRequiredErrorMessage")),this.createNotificationError({title:this.$tc("unzer-payment.paymentDetails.notifications.chargeErrorTitle"),message:t}),this.isLoading=!1})},refund(){this.isLoading=!0,this.UnzerPaymentService.refundTransaction(this.paymentResource.orderTransactionId,this.transactionResource.id,this.transactionAmount,this.reasonCode).then(()=>{this.createNotificationSuccess({title:this.$tc("unzer-payment.paymentDetails.notifications.refundSuccessTitle"),message:this.$tc("unzer-payment.paymentDetails.notifications.refundSuccessMessage")}),this.isSuccessful=!0,this.$emit("reload")}).catch(e=>{let t=e.response.data.errors[0];"generic-error"===t&&(t=this.$tc("unzer-payment.paymentDetails.notifications.genericErrorMessage")),this.createNotificationError({title:this.$tc("unzer-payment.paymentDetails.notifications.refundErrorTitle"),message:t}),this.isLoading=!1})},startCancel(){this.$emit("cancel",this.transactionAmount)}}});let{Component:a,Mixin:s,Module:i}=Shopware;a.register("unzer-payment-detail",{template:'{% block unzer_payment_detail %}\n \n \n {% block unzer_payment_detail_container %}\n \n {% block unzer_payment_detail_container_left %}\n \n \n {{ $tc(\'unzer-payment.paymentDetails.detail.amountRemaining\') }}\n \n \n {{ formatCurrency(remainingAmount) }}\n \n \n {{ $tc(\'unzer-payment.paymentDetails.detail.amountCancelled\') }}\n \n \n {{ formatCurrency(cancelledAmount) }}\n \n \n {{ $tc(\'unzer-payment.paymentDetails.detail.amountCharged\') }}\n \n \n {{ formatCurrency(chargedAmount) }}\n \n {% block unzer_payment_detail_container_left_inner %}{% endblock %}\n \n {% endblock %}\n\n {% block unzer_payment_detail_container_right %}\n \n \n {{ $tc(\'unzer-payment.paymentDetails.detail.shortId\') }}\n \n {{ paymentResource.shortId }}\n \n {{ $tc(\'unzer-payment.paymentDetails.detail.id\') }}\n \n {{ paymentResource.id }}\n \n {{ $tc(\'unzer-payment.paymentDetails.detail.state\') }}\n \n \n {{ paymentResource.state.name }}\n \n \n \n {{ $tc(\'unzer-payment.paymentDetails.detail.descriptor\') }}\n \n \n {{ paymentResource.descriptor }}\n \n \n {% block unzer_payment_detail_container_right_inner %}{% endblock %}\n \n {% endblock %}\n \n {% endblock %}\n \n {% block unzer_payment_detail_footer %}\n \n {% block unzer_payment_detail_ship_button %}\n \n {{ $tc(\'unzer-payment.paymentDetails.actions.shipButton\') }}\n \n {% endblock %}\n \n {% endblock %}\n \n{% endblock %}',inject:["UnzerPaymentService"],mixins:[s.getByName("notification")],data(){return{isLoading:!1,isSuccessful:!1,paylaterPaymentMethods:["09588ffee8064f168e909ff31889dd7f","12fbfbce271a43a89b3783453b88e9a6","6d6adcd4b7bf40499873c294a85f32ed"]}},props:{paymentResource:{type:Object,required:!0}},computed:{unzerMaxDigits(){let e=i.getModuleRegistry().get("unzer-payment");return e&&e.manifest?e.manifest.maxDigits:4},remainingAmount(){return this.paymentResource&&this.paymentResource.amount?this.formatAmount(this.paymentResource.amount.remaining,this.paymentResource.amount.decimalPrecision):0},cancelledAmount(){return this.paymentResource&&this.paymentResource.amount?this.formatAmount(this.paymentResource.amount.cancelled,this.paymentResource.amount.decimalPrecision):0},chargedAmount(){return this.paymentResource&&this.paymentResource.amount?this.formatAmount(this.paymentResource.amount.charged,this.paymentResource.amount.decimalPrecision):0}},methods:{reloadOrderDetail(){this.$emit("reloadOrderDetails")},ship(){this.isLoading=!0,this.UnzerPaymentService.ship(this.paymentResource.orderTransactionId).then(()=>{this.createNotificationSuccess({title:this.$tc("unzer-payment.paymentDetails.notifications.shipSuccessTitle"),message:this.$tc("unzer-payment.paymentDetails.notifications.shipSuccessMessage")}),this.isSuccessful=!0,this.$emit("reload")}).catch(e=>{let t=e.response.data.errors[0];"generic-error"===t?t=this.$tc("unzer-payment.paymentDetails.notifications.genericErrorMessage"):"invoice-missing-error"===t?t=this.$tc("unzer-payment.paymentDetails.notifications.invoiceNotFoundMessage"):"documentdate-missing-error"===t?t=this.$tc("unzer-payment.paymentDetails.notifications.documentDateMissingError"):"payment-missing-error"===t&&(t=this.$tc("unzer-payment.paymentDetails.notifications.paymentMissingError")),this.createNotificationError({title:this.$tc("unzer-payment.paymentDetails.notifications.shipErrorTitle"),message:t}),this.isLoading=!1})},formatAmount(e,t){return e/10**Math.min(this.unzerMaxDigits,t)},formatCurrency(e){return Shopware.Utils.format.currency(e||0,this.paymentResource.currency)},isPaylaterPaymentMethod(e){return this.paylaterPaymentMethods.indexOf(e)>=0}}});let{Component:r,Module:o,Mixin:c}=Shopware;r.register("unzer-payment-history",{template:'{% block unzer_payment_history %}\n \n {% block unzer_payment_history_container %}\n \n {% block unzer_payment_history_data_grid %}\n \n {% block unzer_payment_history_actions %}\n \n {% block unzer_payment_history_data_grid_item_actions %}\n { openCancelModal(item, cancelAmount) }"\n >\n \n {% endblock %}\n \n {% endblock %}\n\n {% block unzer_payment_history_actions_modals %}\n \n \n \n {{ $t(\'unzer-payment.paymentDetails.actions.confirmCancelModal.text\') }}\n
\n {{ $t(\'unzer-payment.paymentDetails.actions.confirmCancelModal.amountLabel\') }}\n {{ formatCurrency(cancelAmount) }}\n
\n \n {% block sw_confirm_modal_footer_cancel %}\n \n {{ $t(\'unzer-payment.paymentDetails.actions.confirmCancelModal.noButton\') }}\n \n {% endblock %}\n\n {% block sw_confirm_modal_footer_confirm %}\n \n {{ $t(\'unzer-payment.paymentDetails.actions.confirmCancelModal.yesButton\') }}\n \n {% endblock %}\n \n \n \n {% endblock %}\n \n {% endblock %}\n \n {% endblock %}\n \n{% endblock %}',inject:["repositoryFactory","UnzerPaymentService"],mixins:[c.getByName("notification")],data(){return{showCancelModal:!1,isCancelLoading:!1,cancelAmount:0}},props:{paymentResource:{type:Object,required:!0}},computed:{unzerMaxDigits(){let e=o.getModuleRegistry().get("unzer-payment");return e&&e.manifest?e.manifest.maxDigits:4},orderTransactionRepository:function(){return this.repositoryFactory.create("order_transaction")},decimalPrecision(){return this.paymentResource&&this.paymentResource.amount&&this.paymentResource.amount.decimalPrecision?Math.min(this.unzerMaxDigits,this.paymentResource.amount.decimalPrecision):this.unzerMaxDigits},data:function(){let e=[];return Object.values(this.paymentResource.transactions).forEach(t=>{let n=this.formatCurrency(this.formatAmount(parseFloat(t.amount),this.decimalPrecision)),a=Shopware.Filter.getByName("date")(t.date,{hour:"numeric",minute:"numeric",second:"numeric"});e.push({type:this.transactionTypeRenderer(t.type),amount:n,date:a,resource:t})}),e},columns:function(){return[{property:"type",label:this.$tc("unzer-payment.paymentDetails.history.column.type"),rawData:!0},{property:"amount",label:this.$tc("unzer-payment.paymentDetails.history.column.amount"),rawData:!0},{property:"date",label:this.$tc("unzer-payment.paymentDetails.history.column.date"),rawData:!0}]}},methods:{transactionTypeRenderer:function(e){switch(e){case"authorization":return this.$tc("unzer-payment.paymentDetails.history.type.authorization");case"charge":return this.$tc("unzer-payment.paymentDetails.history.type.charge");case"shipment":return this.$tc("unzer-payment.paymentDetails.history.type.shipment");case"refund":return this.$tc("unzer-payment.paymentDetails.history.type.refund");case"cancellation":return this.$tc("unzer-payment.paymentDetails.history.type.cancellation");default:return this.$tc("unzer-payment.paymentDetails.history.type.default")}},reload:function(){this.$emit("reload"),this.$emit("reloadOrderDetails")},formatAmount(e,t){return e/10**t},openCancelModal(e,t){this.showCancelModal=e.resource.id,this.cancelAmount=t},closeCancelModal(){this.showCancelModal=!1,this.cancelAmount=0},cancel(){this.isCancelLoading=!0,this.UnzerPaymentService.cancelTransaction(this.paymentResource.orderTransactionId,this.paymentResource.id,this.cancelAmount).then(()=>{this.createNotificationSuccess({title:this.$tc("unzer-payment.paymentDetails.notifications.cancelSuccessTitle"),message:this.$tc("unzer-payment.paymentDetails.notifications.cancelSuccessMessage")}),this.reload()}).catch(e=>{let t=e.response.data.errors[0];"generic-error"===t&&(t=this.$tc("unzer-payment.paymentDetails.notifications.cancelErrorMessage")),this.createNotificationError({title:this.$tc("unzer-payment.paymentDetails.notifications.cancelErrorTitle"),message:t}),this.isCancelLoading=!1,this.reload()})},formatCurrency(e){return Shopware.Utils.format.currency(e||0,this.paymentResource.currency)}}});let{Component:l}=Shopware;l.register("unzer-payment-metadata",{template:'{% block unzer_payment_metadata %}\n \n \n {% block unzer_payment_metadata_container %}\n \n \n {% endblock %}\n \n \n{% endblock %}',props:{paymentResource:{type:Object,required:!0}},computed:{data:function(){let e=[];return this.paymentResource.metadata.forEach(t=>{e.push({key:t.key,value:t.value})}),e},columns:function(){return[{property:"key",label:this.$tc("unzer-payment.paymentDetails.metadata.column.key"),rawData:!0},{property:"value",label:this.$tc("unzer-payment.paymentDetails.metadata.column.value"),rawData:!0}]}}});let{Component:d}=Shopware;d.register("unzer-payment-basket",{template:'{% block unzer_payment_basket %}\n \n \n {% block unzer_payment_basket_container %}\n \n \n {% endblock %}\n \n \n{% endblock %}',props:{paymentResource:{type:Object,required:!0}},computed:{data:function(){let e=[];return this.paymentResource.basket.basketItems.forEach(t=>{let n=this.formatCurrency(parseFloat(t.amountGross.toFixed(2))),a=this.formatCurrency(parseFloat(t.amountNet.toFixed(2)));t.amountDiscount>0&&(n=this.formatCurrency(-1*parseFloat(t.amountDiscount.toFixed(2))),a=this.formatCurrency(-1*parseFloat((t.amountDiscount-t.amountVat).toFixed(2)))),e.push({quantity:t.quantity,title:t.title,amountGross:n,amountNet:a})}),e},columns:function(){return[{property:"quantity",label:this.$tc("unzer-payment.paymentDetails.basket.column.quantity"),rawData:!0},{property:"title",label:this.$tc("unzer-payment.paymentDetails.basket.column.title"),rawData:!0},{property:"amountGross",label:this.$tc("unzer-payment.paymentDetails.basket.column.amountGross"),rawData:!0},{property:"amountNet",label:this.$tc("unzer-payment.paymentDetails.basket.column.amountNet"),rawData:!0}]}},methods:{formatCurrency(e){return Shopware.Utils.format.currency(e||0,this.paymentResource.currency)}}});let{Criteria:u}=Shopware.Data,m=["bc4c2cbfb5fda0bf549e4807440d0a54","4673044aff79424a938d42e9847693c3","713c7a332b432dcd4092701eda522a7e","5123af5ce94a4a286641973e8de7eb60","17830aa7e6a00b99eab27f0e45ac5e0d","4ebb99451f36ba01f13d5871a30bce2c","d4b90a17af62c1bb2f6c3b1fed339425","4b9f8d08b46a83839fd0eb14fe00efe6","08fb8d9a72ab4ca62b811e74f2eca79f","6cc3b56ce9b0f80bd44039c047282a41","614ad722a03ee96baa2446793143215b","409fe641d6d62a4416edd6307d758791","085b64d0028a8bd447294e03c4eb411a","cd6f59d572e6c90dff77a48ce16b44db","fd96d03535a46d197f5adac17c9f8bac","09588ffee8064f168e909ff31889dd7f"];Shopware.Component.override("sw-order-create-details-footer",{template:'{% block sw_order_create_details_footer_payment_method %}\n \n{% endblock %}',computed:{paymentMethodCriteria(){let e=new u;return this.salesChannelId&&e.addFilter(u.equals("salesChannels.id",this.salesChannelId)),e.addFilter(u.not("AND",[u.equalsAny("id",m)])),e}}});let{Component:h,Context:p}=Shopware,{Criteria:y}=Shopware.Data;h.override("sw-order-detail",{template:"{% block sw_order_detail_content_tabs_general %}\n {% parent() %}\n\n {% block unzer_payment_payment_tab %}\n \n {{ $tc('unzer-payment.tabTitle') }}\n \n {% endblock %}\n{% endblock %}",data(){return{isUnzerPayment:!1}},computed:{showTabs(){return!0}},watch:{orderId:{deep:!0,handler(){if(!this.orderId){this.isUnzerPayment=!1;return}let e=this.repositoryFactory.create("order"),t=new y(1,1);t.addAssociation("transactions"),e.get(this.orderId,p.api,t).then(e=>{e.transactions.forEach(e=>{e.customFields&&(e.customFields.unzer_payment_is_transaction||e.customFields.heidelpay_is_transaction)&&(this.isUnzerPayment=!0)})})},immediate:!0}}}),Shopware.Component.override("sw-order-list",{template:'{% block sw_order_list_grid_columns %}\n {% parent() %}\n\n {% block unzer_payment_column_transaction %}\n \n \n {{ item.transactions.last().id }}\n \n \n {% endblock %}\n{% endblock %}',methods:{getOrderColumns(){let e=this.$super("getOrderColumns");return e.splice(1,0,{property:"unzerPaymentTransactionId",label:"unzer-payment.order-list.transactionId",allowResize:!0}),e}}});let{Component:g,Context:f,Mixin:b}=Shopware,{Criteria:k}=Shopware.Data;g.register("unzer-payment-tab",{template:'{% block unzer_payment_payment_details %}\n \n
\n {% block unzer_payment_payment_details_content %}\n \n \n {% block unzer_payment_payment_details_content_payment_detail %}\n \n \n {% endblock %}\n\n {% block unzer_payment_payment_details_content_payment_history %}\n \n \n {% endblock %}\n\n {% block unzer_payment_payment_details_content_payment_basket %}\n \n \n {% endblock %}\n\n {% block unzer_payment_payment_details_content_payment_metadata %}\n \n \n {% endblock %}\n\n {% block unzer_payment_payment_details_content_inner %}{% endblock %}\n \n \n {% endblock %}\n
\n
\n
\n{% endblock %}',inject:["UnzerPaymentService","repositoryFactory"],mixins:[b.getByName("notification")],data(){return{paymentResources:[],loadedResources:0,isLoading:!0}},created(){this.createdComponent()},computed:{orderRepository(){return this.repositoryFactory.create("order")}},watch:{$route(){this.resetDataAttributes(),this.createdComponent()}},methods:{createdComponent(){this.loadData()},resetDataAttributes(){this.paymentResources=[],this.loadedResources=0,this.isLoading=!0},reloadPaymentDetails(){this.resetDataAttributes(),this.loadData()},loadData(){let e=this.$route.params.id,t=new k;t.getAssociation("transactions").addSorting(k.sort("createdAt","DESC")),this.orderRepository.get(e,f.api,t).then(e=>{this.order=e,e.transactions&&e.transactions.forEach((e,t)=>{if(!e.customFields||!e.customFields.unzer_payment_is_transaction&&!e.customFields.heidelpay_is_transaction){this.loadedResources++;return}this.UnzerPaymentService.fetchPaymentDetails(e.id).then(n=>{this.paymentResources[t]=n,this.paymentResources[t].orderTransactionId=e.id,this.loadedResources++,this.isLoading=this.order.transactions.length!==this.loadedResources}).catch(()=>{this.createNotificationError({title:this.$tc("unzer-payment.paymentDetails.notifications.genericErrorMessage"),message:this.$tc("unzer-payment.paymentDetails.notifications.couldNotRetrieveMessage")}),this.isLoading=!1})})})},reloadOrderDetails(){setTimeout(()=>{this.findOrderDetailComponentAndReInit()},5e3)},async findOrderDetailComponentAndReInit(e=this){let t=e.$parent;return void 0===t?null:"sw-order-detail"!==t.$options.name?this.findOrderDetailComponentAndReInit(t):t.isOrderEditing?null:void t.createdComponent()}}});var w=JSON.parse('{"unzer-payment":{"tabTitle":"Unzer Payment","paymentDetails":{"history":{"cardTitle":"Zahlungsverlauf","column":{"type":"Typ","amount":"Betrag","date":"Datum"},"type":{"authorization":"Reservierung","charge":"Einzug","shipment":"Versandmitteilung","refund":"R\xfcckerstattung","cancellation":"Stornierung","default":""}},"actions":{"reason":{"placeholder":"Grund","cancel":"Abgebrochen","credit":"Gutschrift","return":"R\xfcckgabe"},"chargeButton":"Einziehen","shipButton":"Versandmitteilung","refundButton":"R\xfcckerstatten","defaultButton":"Erledigt","cancelButton":"Stornieren","noActions":"Keine Aktionen m\xf6glich","confirmCancelModal":{"text":"M\xf6chten Sie wirklich die Reservierung \xfcber den angegebenen Betrag stornieren?","amountLabel":"Betrag:","yesButton":"Ja","noButton":"Nein"}},"detail":{"cardTitle":"Zahlungsdetails","shortId":"Short-ID","id":"Zahlungs-ID","state":"Status","amountRemaining":"Betrag (Rest)","amountCancelled":"Betrag (R\xfcckerstattet)","amountCharged":"Betrag (Eingezogen)","descriptor":"Verwendungszweck"},"metadata":{"cardTitle":"Metadaten","column":{"key":"Schl\xfcssel","value":"Wert"}},"basket":{"cardTitle":"Warenkorb","column":{"quantity":"Anzahl","title":"Titel","amountGross":"Betrag (brutto)","amountNet":"Betrag (netto)"}},"notifications":{"genericErrorMessage":"Es ist ein Fehler aufgetreten!","refundSuccessTitle":"R\xfcckerstatten","refundSuccessMessage":"Die R\xfcckerstattung wurde erfolgreich durchgef\xfchrt.","refundErrorTitle":"R\xfcckerstatten","chargeSuccessTitle":"Einziehen","chargeSuccessMessage":"Das Einziehen der Zahlung wurde erfolgreich durchgef\xfchrt.","chargeErrorTitle":"Einziehen","shipSuccessTitle":"Versandmitteilung","shipSuccessMessage":"Die Versandmitteilung wurde erfolgreich gesendet.","shipErrorTitle":"Versandmitteilung","invoiceNotFoundMessage":"Zu dieser Bestellung wurde keine Rechnung gefunden","couldNotRetrieveMessage":"Die Zahlungsdetails konnten nicht abgerufen werden, bitte pr\xfcfen Sie die Logdateien f\xfcr weitere Informationen.","documentDateMissingError":"Das Datum der Rechnung ist leer.","paymentMissingError":"Die Zahlung konnte nicht gefunden werden","paylaterInvoiceDocumentRequiredErrorMessage":"Bitte erstellen oder hinterlegen Sie zun\xe4chst eine Rechnung f\xfcr die Bestellung.","cancelSuccessTitle":"Stornierung","cancelErrorTitle":"Stornierung","cancelSuccessMessage":"Die Stornierung wurde erfolgreich durchgef\xfchrt.","cancelErrorMessage":"Die Stornierung konnte nicht durchgef\xfchrt werden."}},"order-list":{"transactionId":"Unzer Transaktions ID"},"methods":{"paylaterInvoice":{"main":"Rechnungskauf","b2b-eur":"Rechnungskauf B2B EUR","b2b-chf":"Rechnungskauf B2B CHF","b2c-eur":"Rechnungskauf B2C EUR","b2c-chf":"Rechnungskauf B2C CHF"},"paylaterInstallment":{"main":"Ratenkauf","b2c-eur":"Ratenkauf B2C EUR","b2c-chf":"Ratenkauf B2C CHF"},"paylaterDirectDebitSecured":{"main":"Lastschrift","b2c-eur":"Lastschrift B2C EUR"}}},"unzer-payment-settings":{"subheadings":{"paymentSettingsBookingModes":"Buchungsmodus","paymentSettingsSaveDevices":"Zahlungsmittel speichern","paymentSettingsExpressCheckout":"Express Checkout"},"module":{"title":"Unzer Payment","description":"Unzer Payment"},"google-pay":{"gatewayMerchantId":"Gateway H\xe4ndler ID"},"form":{"message":{"success":{"title":"Test erfolgreich","message":"Die angegebenen API-Zugangsdaten sind korrekt!"},"error":{"title":"Test fehlgeschlagen","message":"Die angegebenen API-Zugangsdaten sind nicht korrekt! Bitte korrigieren Sie die Eingabe und versuchen Sie es erneut."}},"testButton":"API Zugangsdaten testen","webhookButton":"Webhooks registrieren","privateKey":"Private Key","publicKey":"Public Key","additionalKeys":"API Keys f\xfcr weitere Zahlungsarten"},"modal":{"close":"Schlie\xdfen","webhook":{"title":"Webhooks","httpsInfo":"Es kann nur eine HTTPS-Domain pro Verkaufskanal registriert werden.","registered":"Webhook ist bereits registriert","placeholder":"Bitte w\xe4hlen Sie eine Domain aus","submit":{"register":"Webhooks registrieren","clear":"Webhooks ausw\xe4hlen | Ausgew\xe4hlten Webhook entfernen | Entferne {count} Webhooks"}}},"webhook":{"messagePrefix":"Domain: ","register":{"done":"Webhook registriert | Webhooks registriert","error":"Der Webhook konnte nicht registriert werden | Die Webhooks konnten nicht registriert werden"},"clear":{"done":"Webhook entfernt | Webhooks entfernt","error":"Der Webhook konnte nicht entfernt werden | Die Webhooks konnten nicht entfernt werden"},"missing":{"fields":"Nicht alle ben\xf6tigten Felder sind vorhanden","context":"Der Kontext konnte nicht aktualisiert werden","selection":"Es wurden keine Domains selektiert"},"notFound":{"salesChannelDomain":"Die spezifizierte Domain wurde nicht gefunden"},"globalError":{"title":"Ein Fehler ist aufgetreten","message":"Bitte kontaktieren sie uns f\xfcr mehr Informationen"},"empty":"F\xfcr diesen Private Key sind keine Webhooks registriert. Bitte pr\xfcfen Sie ob dieser valide ist und ob Konfigurationen f\xfcr dedizierte Verkaufskan\xe4le vorgenommen wurden.","show":"Webhooks anzeigen"}},"sw-payment-card":{"deprecated":"Veraltet"}}'),v=JSON.parse('{"unzer-payment":{"tabTitle":"Unzer Payment","paymentDetails":{"history":{"cardTitle":"Payment History","column":{"type":"Type","amount":"Amount","date":"Date"},"type":{"authorization":"Authorization","charge":"Charging","shipment":"Shipping notification","refund":"Refund","cancellation":"Cancel","default":""}},"actions":{"reason":{"placeholder":"Reason","cancel":"Cancel","credit":"Credit","return":"Return"},"chargeButton":"Charge","shipButton":"Shipping notice","refundButton":"Refund","defaultButton":"Done","cancelButton":"Cancel","noActions":"No actions possible","confirmCancelModal":{"text":"Do you really want to cancel the authorization of the selected amount?","amountLabel":"Amount:","yesButton":"Yes","noButton":"No"}},"detail":{"cardTitle":"Payment Details","shortId":"Short-ID","id":"Payment-ID","state":"State","amountRemaining":"Amount (Remaining)","amountCancelled":"Amount (Cancelled)","amountCharged":"Amount (Charged)","descriptor":"Descriptor"},"metadata":{"cardTitle":"Metadata","column":{"key":"Key","value":"Value"}},"basket":{"cardTitle":"Basket","column":{"quantity":"Quantity","title":"Title","amountGross":"Amount (gross)","amountNet":"Amount (net)"}},"notifications":{"genericErrorMessage":"An error has occurred!","refundSuccessTitle":"Refund","refundSuccessMessage":"The reimbursement was successfully completed.","refundErrorTitle":"Refund","chargeSuccessTitle":"Charge","chargeSuccessMessage":"The collection of the payment was carried out successfully.","chargeErrorTitle":"Charge","shipSuccessTitle":"Shipping notice","shipSuccessMessage":"The shipping notification was successfully sent.","shipErrorTitle":"Shipping notice","invoiceNotFoundMessage":"No invoice was found for this order.","couldNotRetrieveMessage":"The payment details could not be retrieved, please check the log files for more information.","documentDateMissingError":"Document date for invoice is empty.","paymentMissingError":"Payment could not be found","paylaterInvoiceDocumentRequiredErrorMessage":"Please create or upload an invoice for the order first.","cancelSuccessTitle":"Cancel","cancelErrorTitle":"Cancel","cancelSuccessMessage":"The reversal was successfully completed.","cancelErrorMessage":"The reversal could not be performed."}},"order-list":{"transactionId":"Unzer transaction ID"},"methods":{"paylaterInvoice":{"main":"Invoice","b2b-eur":"Invoice B2B EUR","b2b-chf":"Invoice B2B CHF","b2c-eur":"Invoice B2C EUR","b2c-chf":"Invoice B2C CHF"},"paylaterInstallment":{"main":"Installment","b2c-eur":"Installment B2C EUR","b2c-chf":"Installment B2C CHF"},"paylaterDirectDebitSecured":{"main":"Direct Debit","b2c-eur":"Direct Debit B2C EUR"}}},"unzer-payment-settings":{"subheadings":{"paymentSettingsBookingModes":"Booking Modes","paymentSettingsSaveDevices":"Save Payment Details","paymentSettingsExpressCheckout":"Express Checkout"},"module":{"title":"Unzer Payment","description":"Unzer Payment"},"google-pay":{"gatewayMerchantId":"Gateway Merchant ID"},"form":{"message":{"success":{"title":"Test succeeded","message":"The provided credentials are valid!"},"error":{"title":"Test failed","message":"API Credentials are invalid, please correct them and try again!"}},"testButton":"Test API credentials","webhookButton":"Register webhooks","privateKey":"Private Key","publicKey":"Public Key","additionalKeys":"API Keys for additional payment methods"},"modal":{"close":"Close","webhook":{"title":"Webhooks","httpsInfo":"Only one HTTPS domain per sales channel can be registered.","registered":"Webhook is already registered","placeholder":"Please select a domain","submit":{"register":"Register webhooks","clear":"Select items to clear | Clear selected webhook | Clear {count} webhooks"}}},"webhook":{"messagePrefix":"Domain: ","register":{"done":"Webhook registered | Webhooks registered","error":"Webhook could not be registered | Webhooks could not be registered"},"clear":{"done":"Webhook cleared | Webhooks cleared","error":"Webhook could not be cleared | Webhooks could not be cleared"},"missing":{"fields":"Some mandatory fields are missing","context":"The context could not be refreshed","selection":"No domain was selected"},"notFound":{"salesChannelDomain":"The selected domain could not be found"},"globalError":{"title":"An error has occurred!","message":"Please contact us for more information"},"empty":"There are no webhooks registered for this private key. Make sure the private key is valid and check for other specific sales channel configurations.","show":"Show webhooks"}},"sw-payment-card":{"deprecated":"Deprecated"}}');let{Module:z}=Shopware;z.register("unzer-payment",{type:"plugin",name:"UnzerPayment",title:"unzer-payment.general.title",description:"unzer-payment.general.descriptionTextModule",version:"0.0.1",targetVersion:"0.0.1",maxDigits:4,snippets:{"de-DE":w,"en-GB":v},routeMiddleware(e,t){"sw.order.detail"===t.name&&t.children.push({component:"unzer-payment-tab",name:"unzer-payment.payment.detail",path:"/sw/order/detail/:id/unzer-payment",isChildren:!0,meta:{parentPath:"sw.order.index"}}),e(t)}}),n(129);let S=Shopware.Data.Criteria;Shopware.Component.register("unzer-payment-register-webhook",{template:'{% block unzer_payment_payment_register_webhook %}\n \n {% block unzer_payment_payment_register_webhook_button %}\n \n {{ $tc(\'unzer-payment-settings.form.webhookButton\') }}\n \n {% endblock %}\n\n {% block unzer_payment_payment_register_webhook_modal %}\n \n \n \n {{ $tc(\'unzer-payment-settings.modal.webhook.httpsInfo\') }}\n \n \n \n \n \n {{ $tc(\'unzer-payment-settings.modal.webhook.registered\') }}\n \n \n \n \n \n\n \n \n {{ $tc(\'unzer-payment-settings.modal.close\') }}\n \n \n {{ $tc(\'unzer-payment-settings.modal.webhook.submit.register\') }}\n \n \n \n {% endblock %}\n
\n{% endblock %}',mixins:[Shopware.Mixin.getByName("notification")],inject:["repositoryFactory","UnzerPaymentConfigurationService"],props:{webhooks:{type:Array,required:!0},isLoading:{type:Boolean,required:!1},selectedSalesChannelId:{type:String,required:!1},privateKey:{type:String,required:!0},isDisabled:{type:Boolean,required:!1}},computed:{salesChannelRepository(){return this.repositoryFactory.create("sales_channel")}},data(){return{isModalActive:!1,isRegistering:!1,isRegistrationSuccessful:!1,isDataLoading:!1,selection:{},selectedDomain:null,entitySelection:{},salesChannels:{}}},created(){this.createdComponent()},methods:{createdComponent(){this.loadData()},loadData(e,t){let n=this;this.isDataLoading=!0;let a=new S(e,t);a.addAssociation("domains"),this.salesChannelRepository.search(a,Shopware.Context.api).then(e=>{n.salesChannels=e,n.isDataLoading=!1})},onPageChange(e){this.loadData(e.page,e.limit)},openModal(){this.$emit("modal-open"),this.isModalActive=!0},closeModal(){this.isModalActive=!1},registerWebhooks(){let e=this;this.isRegistrationSuccessful=!1,this.isRegistering=!0,this.UnzerPaymentConfigurationService.registerWebhooks({selection:this.entitySelection}).then(t=>{e.isRegistrationSuccessful=!0,void 0!==t&&e.messageGeneration(t),this.$emit("webhook-registered",t)}).catch(()=>{this.createNotificationError({title:this.$tc("unzer-payment-settings.webhook.globalError.title"),message:this.$tc("unzer-payment-settings.webhook.globalError.message")})}).finally(()=>{e.isRegistering=!1})},onRegistrationFinished(){this.isRegistrationSuccessful=!1,this.selection={}},onSelectItem(e,t){t&&(t.privateKey=this.privateKey,this.entitySelection[t.salesChannelId]=t)},messageGeneration(e){let t=e.length;Object.keys(e).forEach(n=>{e[n].success?this.createNotificationSuccess({title:this.$tc(e[n].message,t),message:this.$tc("unzer-payment-settings.webhook.messagePrefix",t)+n}):this.createNotificationError({title:this.$tc(e[n].message,t),message:this.$tc("unzer-payment-settings.webhook.messagePrefix",t)+n})})},isWebhookRegisteredForSalesChannel(e){let t=!1,n=this.getSalesChannelById(e);return!!this.webhooks.length&&(n.domains.forEach(e=>{this.webhooks.forEach(n=>{if(n.url.indexOf(e.url)>-1)return t=!0,!0})}),t)},getSalesChannelById(e){let t=null;return this.salesChannels.forEach(n=>{if(n.id===e)return t=n,!0}),t},getSalesChannelDomainCriteria(e){let t=new S;return t.addFilter(S.prefix("url","https://")),t.addFilter(S.equals("salesChannelId",e)),t}}});let{Component:_,Mixin:C,Context:P}=Shopware;_.register("unzer-webhooks-modal",{template:'\n \n {{ $tc(\'unzer-payment-settings.webhook.empty\') }}\n \n \n \n \n \n {{ $tc(\'unzer-payment-settings.modal.webhook.submit.clear\', webhookSelectionLength, {count: webhookSelectionLength}) }}\n \n
\n',mixins:[C.getByName("notification")],inject:["UnzerPaymentConfigurationService"],props:{keyPair:{type:Array,required:!0},webhooks:{type:Array,required:!0},isLoadingWebhooks:{type:Boolean}},data(){return{isClearing:!1,isClearingSuccessful:!1,webhookSelection:null,webhookSelectionLength:0}},computed:{webhookColumns(){return[{property:"event",dataIndex:"event",label:"Event"},{property:"url",dataIndex:"url",label:"URL"}]}},methods:{clearWebhooks(e){let t=this;this.isClearingSuccessful=!1,this.isClearing=!0,this.isLoading=!0,this.UnzerPaymentConfigurationService.clearWebhooks({privateKey:e,selection:this.webhookSelection}).then(n=>{t.isClearingSuccessful=!0,t.webhookSelection=[],t.webhookSelectionLength=0,t.$refs.webhookDataGrid.resetSelection(),t.$emit("load-webhooks",e),void 0!==n&&t.messageGeneration(n)}).catch(()=>{this.createNotificationError({title:this.$tc("unzer-payment-settings.webhook.globalError.title"),message:this.$tc("unzer-payment-settings.webhook.globalError.message")})}).finally(()=>{t.isLoading=!1,t.isClearing=!1})},onClearingFinished(){this.isClearingSuccessful=!1,this.isClearing=!1},onSelectWebhook(e){this.webhookSelectionLength=Object.keys(e).length,this.webhookSelection=e},messageGeneration(e){let t=e.length;Object.keys(e).forEach(n=>{e[n].success?this.createNotificationSuccess({title:this.$tc(e[n].message,t),message:this.$tc("unzer-payment-settings.webhook.messagePrefix",t)+n}):this.createNotificationError({title:this.$tc(e[n].message,t),message:this.$tc("unzer-payment-settings.webhook.messagePrefix",t)+n})})}}}),n(708),n(337);let{Component:D}=Shopware;D.register("unzer-payment-plugin-icon",{template:'{% block unzer_plugin_icon %}\n
\n{% endblock %}',computed:{assetFilter(){return Shopware.Filter.getByName("asset")}}}),n(425);let{Component:R}=Shopware;R.register("unzer-settings-subheading",{template:'{% block unzer_settings_subheading %}\n {{ label }}
\n{% endblock %}',computed:{label(){let e=this.$attrs.name.split("."),t=e[e.length-1];return this.$tc("unzer-payment-settings.subheadings."+t)}}});let{Component:$}=Shopware;$.override("sw-system-config",{template:"{% block sw_system_config_content_card_field %}\n \n \n \n \n \n {% parent() %}\n \n{% endblock %}",inject:["UnzerPaymentConfigurationService"],data(){return{readOnlyUnzerGooglePayGatewayMerchantId:{}}},watch:{currentSalesChannelId(){this.getUnzerGooglePayGatewayMerchantId(),this.$emit("sales-channel-changed",this.actualConfigData[this.currentSalesChannelId],this.currentSalesChannelId)},isLoading(e){this.$emit("loading-changed",e),!1===e&&this.getUnzerGooglePayGatewayMerchantId()}},computed:{unzerGooglePayGatewayMerchantId(){return this.readOnlyUnzerGooglePayGatewayMerchantId||""}},methods:{async createdComponent(){await this.$super("createdComponent"),this.getUnzerGooglePayGatewayMerchantId()},getUnzerGooglePayGatewayMerchantId(){"UnzerPayment6.settings"===this.domain&&this.UnzerPaymentConfigurationService.getGooglePayGatewayMerchantId(this.currentSalesChannelId).then(e=>{this.readOnlyUnzerGooglePayGatewayMerchantId=e.gatewayMerchantId}).catch(()=>{})}}}),n(345);let{Component:M,Mixin:I,Context:T}=Shopware;M.register("unzer-payment-settings",{template:'{% block unzer_payment_settings %}\n \n {% block unzer_payment_settings_header %}\n \n \n {{ $tc(\'sw-settings.index.title\') }}\n \n {{ $tc(\'unzer-payment-settings.module.title\') }}\n
\n \n {% endblock %}\n\n {% block unzer_payment_settings_actions %}\n \n {% block unzer_payment_settings_actions_save %}\n \n {{ $tc(\'global.default.save\') }}\n \n {% endblock %}\n \n {% endblock %}\n\n {% block unzer_payment_settings_content %}\n \n \n \n \n \n \n {{ $tc(\'unzer-payment-settings.webhook.show\') }}\n \n \n \n \n {{ $tc(\'unzer-payment-settings.form.testButton\') }}\n \n \n \n
\n
\n {{ $tc(\'unzer-payment-settings.form.additionalKeys\') }}\n
\n
\n
\n
\n
\n \n
\n {{ keyPairSettingGroupTitle(keyPairSetting) }}\n
\n
\n \n
\n {{ keyPairSettingTitle(keyPairSetting) }}\n
\n
\n
\n
\n \n {{ $tc(\'unzer-payment-settings.webhook.show\') }}\n \n \n \n \n {{ $tc(\'unzer-payment-settings.form.testButton\') }}\n \n
\n
\n \n
\n
\n \n \n \n \n \n \n \n {% endblock %}\n \n{% endblock %}',mixins:[I.getByName("notification"),I.getByName("sw-inline-snippet")],inject:["repositoryFactory","UnzerPaymentConfigurationService"],data(){return{isLoading:!0,isLoadingWebhooks:!0,isAdditionalKeysExpanded:!1,selectedKeyPairForTesting:!1,isTestSuccessful:!1,isSaveSuccessful:!1,config:{},webhooks:[],loadedWebhooksPrivateKey:!1,selectedSalesChannelId:null,keyPairSettings:[{key:"b2b-eur",group:"paylaterInvoice"},{key:"b2b-chf",group:"paylaterInvoice"},{key:"b2c-eur",group:"paylaterInvoice"},{key:"b2c-chf",group:"paylaterInvoice"},{key:"b2c-eur",group:"paylaterInstallment"},{key:"b2c-chf",group:"paylaterInstallment"},{key:"b2c-eur",group:"paylaterDirectDebitSecured"}],openModalKeyPair:null}},metaInfo(){return{title:"UnzerPayment"}},computed:{paymentMethodRepository(){return this.repositoryFactory.create("payment_method")},arrowIconName(){return T.app.config.version.match(/((\d+)\.?(\d+?)\.?(\d+)?\.?(\d*))-?([A-z]+?\d+)?/i)[3]>=5?"regular-chevron-right-xs":"small-arrow-medium-right"},defaultKeyPair(){return{privateKey:this.getConfigValue("privateKey"),publicKey:this.getConfigValue("publicKey")}}},watch:{openModalKeyPair(e){e&&e.privateKey!==this.loadedWebhooksPrivateKey&&this.loadWebhooks(e.privateKey)}},methods:{getConfigValue(e){if(!this.config||!this.$refs.systemConfig||!this.$refs.systemConfig.actualConfigData||!this.$refs.systemConfig.actualConfigData.null)return"";let t=this.$refs.systemConfig.actualConfigData.null;return this.config[`UnzerPayment6.settings.${e}`]||t[`UnzerPayment6.settings.${e}`]},onValidateCredentials(e){this.isTestSuccessful=!1,this.selectedKeyPairForTesting=e;let t=this.getArrayKeyOfKeyPairSetting(e),n=e;-1!==t&&(n=this.keyPairSettings[t]);let a={publicKey:n.publicKey,privateKey:n.privateKey,salesChannel:this.$refs.systemConfig.currentSalesChannelId};this.UnzerPaymentConfigurationService.validateCredentials(a).then(()=>{this.createNotificationSuccess({title:this.$tc("unzer-payment-settings.form.message.success.title"),message:this.$tc("unzer-payment-settings.form.message.success.message")}),this.isTestSuccessful=!0,this.selectedKeyPairForTesting=!1}).catch(()=>{this.createNotificationError({title:this.$tc("unzer-payment-settings.form.message.error.title"),message:this.$tc("unzer-payment-settings.form.message.error.message")}),this.onTestFinished()})},onTestFinished(){this.selectedKeyPairForTesting=!1,this.isTestSuccessful=!1},setPublicKey(e,t){this.keyPairSettings[this.getArrayKeyOfKeyPairSetting(e)].publicKey=t},setPrivateKey(e,t){this.keyPairSettings[this.getArrayKeyOfKeyPairSetting(e)].privateKey=t},getArrayKeyOfKeyPairSetting(e){return this.keyPairSettings.findIndex(t=>t.key===e.key&&t.group===e.group)},onSave(){this.isLoading=!0,["paylaterInvoice","paylaterInstallment","paylaterDirectDebitSecured"].forEach(e=>{this.config[`UnzerPayment6.settings.${e}`]=[]}),this.keyPairSettings.reduce((e,t)=>(t&&t.privateKey&&t.publicKey&&e[`UnzerPayment6.settings.${t.group}`].push(t),e),this.config),this.$refs.systemConfig.saveAll().then(()=>{this.isSaveSuccessful=!0;let e=this.$tc("sw-plugin-config.messageSaveSuccess");"sw-plugin-config.messageSaveSuccess"===e&&(e=this.$tc("sw-extension-store.component.sw-extension-config.messageSaveSuccess")),this.createNotificationSuccess({title:this.$tc("global.default.success"),message:e}),document.dispatchEvent(new CustomEvent("unzer-settings-saved",{}))}).catch(e=>{this.isSaveSuccessful=!1,this.createNotificationError({title:this.$tc("global.default.error"),message:e}),this.isLoading=!1})},onConfigChange(e){this.config=e,this.isLoading=!1,this.syncKeyPairConfig()},onLoadingChanged(e){this.isLoading=e},onSalesChannelChanged(e,t){e&&this.onConfigChange(e),this.selectedSalesChannelId=t},onWebhookRegistered(e){this.loadWebhooks(e)},loadWebhooks(e){this.isLoadingWebhooks=!0,this.UnzerPaymentConfigurationService.getWebhooks(e).then(t=>{this.webhooks=t,this.webhookSelection=null,this.webhookSelectionLength=0,this.loadedWebhooksPrivateKey=e}).catch(()=>{this.webhooks=[],this.loadedWebhooksPrivateKey=!1}).finally(()=>{this.isLoadingWebhooks=!1,this.isClearingSuccessful=!1})},getBind(e,t){let n;return t!==this.config&&(this.config=t),this.$refs.systemConfig.config.forEach(t=>{t.elements.forEach(t=>{if(t.name===e.name){n=t;return}})}),n||e},keyPairSettingTitle(e){return this.$tc(`unzer-payment.methods.${e.group}.${e.key}`)},keyPairSettingGroupTitle(e){return this.$tc(`unzer-payment.methods.${e.group}.main`)},isShowWebhooksButtonEnabled(e){return e&&e.privateKey&&e.publicKey},isRegisterWebhooksButtonEnabled(e){return!this.isLoading&&e&&e.privateKey},syncKeyPairConfig(){let e=this;["paylaterInvoice","paylaterInstallment","paylaterDirectDebitSecured"].forEach(t=>{this.config[`UnzerPayment6.settings.${t}`]&&this.config[`UnzerPayment6.settings.${t}`].forEach(t=>{e.keyPairSettings.forEach((e,n,a)=>{e.group===t.group&&e.key===t.key&&(a[n]=t)})})})},toggleAdditionalKeys(){this.isAdditionalKeysExpanded=!this.isAdditionalKeysExpanded}}});let{Module:A}=Shopware;A.register("unzer-payment-configuration",{type:"plugin",name:"UnzerPayment",title:"unzer-payment-settings.module.title",description:"unzer-payment-settings.module.description",version:"1.1.0",targetVersion:"1.1.0",snippets:{"de-DE":w,"en-GB":v},routes:{settings:{component:"unzer-payment-settings",path:"settings",meta:{parentPath:"sw.settings.index"}}},settingsItem:{name:"unzer-payment-configuration",to:"unzer.payment.configuration.settings",label:"unzer-payment-settings.module.title",group:"plugins",iconComponent:"unzer-payment-plugin-icon",backgroundEnabled:!1}}),n(748),n(963),Shopware.Component.override("sw-payment-card",{template:'{% block sw_payment_card_description %}\n \n
\n \n {{ $tc(\'sw-payment-card.deprecated\') }}\n \n
\n
\n
\n{% endblock %}',snippets:{"de-DE":w,"en-GB":v}}),n(34)}()}();
\ No newline at end of file
+!function(){var e={296:function(){},906:function(){},836:function(){},325:function(){},299:function(){},963:function(){let{Application:e}=Shopware,t=Shopware.Classes.ApiService;class n extends t{constructor(e,t,n="unzer-payment"){super(e,t,n)}validateCredentials(e){return this.httpClient.post(`_action/${this.getApiBasePath()}/validate-credentials`,e,{headers:this.getBasicHeaders()}).then(e=>t.handleResponse(e))}registerWebhooks(e){return this.httpClient.post(`_action/${this.getApiBasePath()}/register-webhooks`,e,{headers:this.getBasicHeaders()}).then(e=>t.handleResponse(e))}clearWebhooks(e){return this.httpClient.post(`_action/${this.getApiBasePath()}/clear-webhooks`,e,{headers:this.getBasicHeaders()}).then(e=>t.handleResponse(e))}getWebhooks(e){return this.httpClient.post(`_action/${this.getApiBasePath()}/get-webhooks`,{privateKey:e},{headers:this.getBasicHeaders()}).then(e=>t.handleResponse(e))}getGooglePayGatewayMerchantId(e){return this.httpClient.get(`_action/${this.getApiBasePath()}/get-google-pay-gateway-merchant-id?salesChannelId=${e||""}`,{headers:this.getBasicHeaders()}).then(e=>t.handleResponse(e))}}e.addServiceProvider("UnzerPaymentConfigurationService",t=>new n(e.getContainer("init").httpClient,t.loginService))},748:function(){let{Application:e}=Shopware,t=Shopware.Classes.ApiService;class n extends t{constructor(e,t,n="unzer-payment"){super(e,t,n)}fetchPaymentDetails(e){let n=`_action/${this.getApiBasePath()}/transaction/${e}/details`;return this.httpClient.get(n,{headers:this.getBasicHeaders()}).then(e=>t.handleResponse(e))}chargeTransaction(e,n,a){let s=`_action/${this.getApiBasePath()}/transaction/${e}/charge/${a}`;return this.httpClient.get(s,{headers:this.getBasicHeaders()}).then(e=>t.handleResponse(e))}refundTransaction(e,n,a,s=null){let i=`_action/${this.getApiBasePath()}/transaction/${e}/refund/${n}/${a}`;return null!==s&&(i=`${i}/${s}`),this.httpClient.get(i,{headers:this.getBasicHeaders()}).then(e=>t.handleResponse(e))}cancelTransaction(e,n,a){let s=`_action/${this.getApiBasePath()}/transaction/${e}/cancel/${n}/${a}`;return this.httpClient.get(s,{headers:this.getBasicHeaders()}).then(e=>t.handleResponse(e))}ship(e){let n=`_action/${this.getApiBasePath()}/transaction/${e}/ship`;return this.httpClient.get(n,{headers:this.getBasicHeaders()}).then(e=>t.handleResponse(e))}}e.addServiceProvider("UnzerPaymentService",t=>new n(e.getContainer("init").httpClient,t.loginService))},337:function(){let{Component:e}=Shopware,{Criteria:t,EntityCollection:n}=Shopware.Data;e.extend("unzer-entity-multi-select-delivery-status","sw-entity-multi-id-select",{inject:["repositoryFactory"],props:{repository:{type:Object,required:!0,default(){return this.repositoryFactory.create("state_machine_state")}},criteria:{type:Object,required:!1,default(){let e=new t(1,100);return e.addFilter(t.equals("stateMachine.technicalName","order_delivery.state")),e}},entityCollection(){}}})},708:function(){let{Component:e}=Shopware,{Criteria:t}=Shopware.Data;e.extend("unzer-entity-single-select-delivery-status","sw-entity-single-select",{props:{criteria:{type:Object,required:!1,default(){let e=new t(1,100);return e.addFilter(t.equals("stateMachine.technicalName","order_delivery.state")),e}}}})},129:function(e,t,n){var a=n(296);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals),(0,n(534).A)("0620ec53",a,!0,{})},425:function(e,t,n){var a=n(906);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals),(0,n(534).A)("f0afdb6a",a,!0,{})},345:function(e,t,n){var a=n(836);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals),(0,n(534).A)("61f99e4d",a,!0,{})},90:function(e,t,n){var a=n(325);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals),(0,n(534).A)("05921a3e",a,!0,{})},34:function(e,t,n){var a=n(299);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals),(0,n(534).A)("3bbcbade",a,!0,{})},534:function(e,t,n){"use strict";function a(e,t){for(var n=[],a={},s=0;sn.parts.length&&(a.parts.length=n.parts.length)}else{for(var i=[],s=0;s\n {% block unzer_payment_actions_amount_field %}\n \n \n \n
\n {% endblock %}\n \n \n {% block unzer_payment_actions_charge_button %}\n \n {{ $tc(\'unzer-payment.paymentDetails.actions.chargeButton\') }}\n \n {% endblock %}\n\n {% block unzer_payment_actions_cancel_button %}\n \n {{ $tc(\'unzer-payment.paymentDetails.actions.cancelButton\') }}\n \n {% endblock %}\n \n \n {% block unzer_payment_actions_reason_field %}\n \n \n {% endblock %}\n\n {% block unzer_payment_actions_refund_button %}\n \n {{ $tc(\'unzer-payment.paymentDetails.actions.refundButton\') }}\n \n {% endblock %}\n \n {% block unzer_payment_actions_button_container_inner %}{% endblock %}\n
\n \n\n \n {{ $tc(\'unzer-payment.paymentDetails.actions.noActions\') }}\n
\n{% endblock %}',inject:["UnzerPaymentService"],mixins:[t.getByName("notification")],data(){return{isLoading:!1,isSuccessful:!1,transactionAmount:0,reasonCode:null}},props:{transactionResource:{type:Object,required:!0},paymentResource:{type:Object,required:!0},decimalPrecision:{type:Number,required:!0,default:4}},computed:{isChargePossible:function(){return"authorization"===this.transactionResource.type&&"error"!==this.transactionResource.state},isRefundPossible:function(){return"charge"===this.transactionResource.type&&"error"!==this.transactionResource.state&&!(this.transactionResource.isFirst&&"085b64d0028a8bd447294e03c4eb411a"===this.paymentResource.paymentMethodId&&"pending"!==this.paymentResource.state.name&&"partly"!==this.paymentResource.state.name)},maxTransactionAmount(){let e=0,t=this.isRefundPossible&&"085b64d0028a8bd447294e03c4eb411a"===this.paymentResource.paymentMethodId;return this.isRefundPossible&&(e=this.transactionResource.amount),this.isChargePossible&&(e=this.paymentResource.amount.remaining),"remainingAmount"in this.transactionResource&&(e=this.transactionResource.remainingAmount),this.transactionResource.isFirst&&t&&(e=this.paymentResource.amount.remaining),e/10**this.paymentResource.amount.decimalPrecision},reasonCodeSelection(){return[{label:this.$tc("unzer-payment.paymentDetails.actions.reason.cancel"),value:"CANCEL"},{label:this.$tc("unzer-payment.paymentDetails.actions.reason.credit"),value:"CREDIT"},{label:this.$tc("unzer-payment.paymentDetails.actions.reason.return"),value:"RETURN"}]}},created(){this.transactionAmount=this.maxTransactionAmount},methods:{charge(){this.isLoading=!0,this.UnzerPaymentService.chargeTransaction(this.paymentResource.orderTransactionId,this.transactionResource.id,this.transactionAmount).then(()=>{this.createNotificationSuccess({title:this.$tc("unzer-payment.paymentDetails.notifications.chargeSuccessTitle"),message:this.$tc("unzer-payment.paymentDetails.notifications.chargeSuccessMessage")}),this.isSuccessful=!0,this.$emit("reload")}).catch(e=>{let t=e.response.data.errors[0];"generic-error"===t&&(t=this.$tc("unzer-payment.paymentDetails.notifications.genericErrorMessage")),"paylater-invoice-document-required"===t&&(t=this.$tc("unzer-payment.paymentDetails.notifications.paylaterInvoiceDocumentRequiredErrorMessage")),this.createNotificationError({title:this.$tc("unzer-payment.paymentDetails.notifications.chargeErrorTitle"),message:t}),this.isLoading=!1})},refund(){this.isLoading=!0,this.UnzerPaymentService.refundTransaction(this.paymentResource.orderTransactionId,this.transactionResource.id,this.transactionAmount,this.reasonCode).then(()=>{this.createNotificationSuccess({title:this.$tc("unzer-payment.paymentDetails.notifications.refundSuccessTitle"),message:this.$tc("unzer-payment.paymentDetails.notifications.refundSuccessMessage")}),this.isSuccessful=!0,this.$emit("reload")}).catch(e=>{let t=e.response.data.errors[0];"generic-error"===t&&(t=this.$tc("unzer-payment.paymentDetails.notifications.genericErrorMessage")),this.createNotificationError({title:this.$tc("unzer-payment.paymentDetails.notifications.refundErrorTitle"),message:t}),this.isLoading=!1})},startCancel(){this.$emit("cancel",this.transactionAmount)}}});let{Component:a,Mixin:s,Module:i}=Shopware;a.register("unzer-payment-detail",{template:'{% block unzer_payment_detail %}\n \n \n {% block unzer_payment_detail_container %}\n \n {% block unzer_payment_detail_container_left %}\n \n \n {{ $tc(\'unzer-payment.paymentDetails.detail.amountRemaining\') }}\n \n \n {{ formatCurrency(remainingAmount) }}\n \n \n {{ $tc(\'unzer-payment.paymentDetails.detail.amountCancelled\') }}\n \n \n {{ formatCurrency(cancelledAmount) }}\n \n \n {{ $tc(\'unzer-payment.paymentDetails.detail.amountCharged\') }}\n \n \n {{ formatCurrency(chargedAmount) }}\n \n {% block unzer_payment_detail_container_left_inner %}{% endblock %}\n \n {% endblock %}\n\n {% block unzer_payment_detail_container_right %}\n \n \n {{ $tc(\'unzer-payment.paymentDetails.detail.shortId\') }}\n \n {{ paymentResource.shortId }}\n \n {{ $tc(\'unzer-payment.paymentDetails.detail.id\') }}\n \n {{ paymentResource.id }}\n \n {{ $tc(\'unzer-payment.paymentDetails.detail.state\') }}\n \n \n {{ paymentResource.state.name }}\n \n \n \n {{ $tc(\'unzer-payment.paymentDetails.detail.descriptor\') }}\n \n \n {{ paymentResource.descriptor }}\n \n \n {% block unzer_payment_detail_container_right_inner %}{% endblock %}\n \n {% endblock %}\n \n {% endblock %}\n \n {% block unzer_payment_detail_footer %}\n \n {% block unzer_payment_detail_ship_button %}\n \n {{ $tc(\'unzer-payment.paymentDetails.actions.shipButton\') }}\n \n {% endblock %}\n \n {% endblock %}\n \n{% endblock %}',inject:["UnzerPaymentService"],mixins:[s.getByName("notification")],data(){return{isLoading:!1,isSuccessful:!1,paylaterPaymentMethods:["09588ffee8064f168e909ff31889dd7f","12fbfbce271a43a89b3783453b88e9a6","6d6adcd4b7bf40499873c294a85f32ed"]}},props:{paymentResource:{type:Object,required:!0}},computed:{unzerMaxDigits(){let e=i.getModuleRegistry().get("unzer-payment");return e&&e.manifest?e.manifest.maxDigits:4},remainingAmount(){return this.paymentResource&&this.paymentResource.amount?this.formatAmount(this.paymentResource.amount.remaining,this.paymentResource.amount.decimalPrecision):0},cancelledAmount(){return this.paymentResource&&this.paymentResource.amount?this.formatAmount(this.paymentResource.amount.cancelled,this.paymentResource.amount.decimalPrecision):0},chargedAmount(){return this.paymentResource&&this.paymentResource.amount?this.formatAmount(this.paymentResource.amount.charged,this.paymentResource.amount.decimalPrecision):0}},methods:{reloadOrderDetail(){this.$emit("reloadOrderDetails")},ship(){this.isLoading=!0,this.UnzerPaymentService.ship(this.paymentResource.orderTransactionId).then(()=>{this.createNotificationSuccess({title:this.$tc("unzer-payment.paymentDetails.notifications.shipSuccessTitle"),message:this.$tc("unzer-payment.paymentDetails.notifications.shipSuccessMessage")}),this.isSuccessful=!0,this.$emit("reload")}).catch(e=>{let t=e.response.data.errors[0];"generic-error"===t?t=this.$tc("unzer-payment.paymentDetails.notifications.genericErrorMessage"):"invoice-missing-error"===t?t=this.$tc("unzer-payment.paymentDetails.notifications.invoiceNotFoundMessage"):"documentdate-missing-error"===t?t=this.$tc("unzer-payment.paymentDetails.notifications.documentDateMissingError"):"payment-missing-error"===t&&(t=this.$tc("unzer-payment.paymentDetails.notifications.paymentMissingError")),this.createNotificationError({title:this.$tc("unzer-payment.paymentDetails.notifications.shipErrorTitle"),message:t}),this.isLoading=!1})},formatAmount(e,t){return e/10**Math.min(this.unzerMaxDigits,t)},formatCurrency(e){return Shopware.Utils.format.currency(e||0,this.paymentResource.currency)},isPaylaterPaymentMethod(e){return this.paylaterPaymentMethods.indexOf(e)>=0}}});let{Component:r,Module:o,Mixin:c}=Shopware;r.register("unzer-payment-history",{template:'{% block unzer_payment_history %}\n \n {% block unzer_payment_history_container %}\n \n {% block unzer_payment_history_data_grid %}\n \n {% block unzer_payment_history_actions %}\n \n {% block unzer_payment_history_data_grid_item_actions %}\n { openCancelModal(item, cancelAmount) }"\n >\n \n {% endblock %}\n \n {% endblock %}\n\n {% block unzer_payment_history_actions_modals %}\n \n \n \n {{ $t(\'unzer-payment.paymentDetails.actions.confirmCancelModal.text\') }}\n
\n {{ $t(\'unzer-payment.paymentDetails.actions.confirmCancelModal.amountLabel\') }}\n {{ formatCurrency(cancelAmount) }}\n
\n \n {% block sw_confirm_modal_footer_cancel %}\n \n {{ $t(\'unzer-payment.paymentDetails.actions.confirmCancelModal.noButton\') }}\n \n {% endblock %}\n\n {% block sw_confirm_modal_footer_confirm %}\n \n {{ $t(\'unzer-payment.paymentDetails.actions.confirmCancelModal.yesButton\') }}\n \n {% endblock %}\n \n \n \n {% endblock %}\n \n {% endblock %}\n \n {% endblock %}\n \n{% endblock %}',inject:["repositoryFactory","UnzerPaymentService"],mixins:[c.getByName("notification")],data(){return{showCancelModal:!1,isCancelLoading:!1,cancelAmount:0}},props:{paymentResource:{type:Object,required:!0}},computed:{unzerMaxDigits(){let e=o.getModuleRegistry().get("unzer-payment");return e&&e.manifest?e.manifest.maxDigits:4},orderTransactionRepository:function(){return this.repositoryFactory.create("order_transaction")},decimalPrecision(){return this.paymentResource&&this.paymentResource.amount&&this.paymentResource.amount.decimalPrecision?Math.min(this.unzerMaxDigits,this.paymentResource.amount.decimalPrecision):this.unzerMaxDigits},data:function(){let e=[];return Object.values(this.paymentResource.transactions).forEach(t=>{let n=this.formatCurrency(this.formatAmount(parseFloat(t.amount),this.decimalPrecision)),a=Shopware.Filter.getByName("date")(t.date,{hour:"numeric",minute:"numeric",second:"numeric"});e.push({type:this.transactionTypeRenderer(t.type),amount:n,date:a,resource:t})}),e},columns:function(){return[{property:"type",label:this.$tc("unzer-payment.paymentDetails.history.column.type"),rawData:!0},{property:"amount",label:this.$tc("unzer-payment.paymentDetails.history.column.amount"),rawData:!0},{property:"date",label:this.$tc("unzer-payment.paymentDetails.history.column.date"),rawData:!0}]}},methods:{transactionTypeRenderer:function(e){switch(e){case"authorization":return this.$tc("unzer-payment.paymentDetails.history.type.authorization");case"charge":return this.$tc("unzer-payment.paymentDetails.history.type.charge");case"shipment":return this.$tc("unzer-payment.paymentDetails.history.type.shipment");case"refund":return this.$tc("unzer-payment.paymentDetails.history.type.refund");case"cancellation":return this.$tc("unzer-payment.paymentDetails.history.type.cancellation");default:return this.$tc("unzer-payment.paymentDetails.history.type.default")}},reload:function(){this.$emit("reload"),this.$emit("reloadOrderDetails")},formatAmount(e,t){return e/10**t},openCancelModal(e,t){this.showCancelModal=e.resource.id,this.cancelAmount=t},closeCancelModal(){this.showCancelModal=!1,this.cancelAmount=0},cancel(){this.isCancelLoading=!0,this.UnzerPaymentService.cancelTransaction(this.paymentResource.orderTransactionId,this.paymentResource.id,this.cancelAmount).then(()=>{this.createNotificationSuccess({title:this.$tc("unzer-payment.paymentDetails.notifications.cancelSuccessTitle"),message:this.$tc("unzer-payment.paymentDetails.notifications.cancelSuccessMessage")}),this.reload()}).catch(e=>{let t=e.response.data.errors[0];"generic-error"===t&&(t=this.$tc("unzer-payment.paymentDetails.notifications.cancelErrorMessage")),this.createNotificationError({title:this.$tc("unzer-payment.paymentDetails.notifications.cancelErrorTitle"),message:t}),this.isCancelLoading=!1,this.reload()})},formatCurrency(e){return Shopware.Utils.format.currency(e||0,this.paymentResource.currency)}}});let{Component:l}=Shopware;l.register("unzer-payment-metadata",{template:'{% block unzer_payment_metadata %}\n \n \n {% block unzer_payment_metadata_container %}\n \n \n {% endblock %}\n \n \n{% endblock %}',props:{paymentResource:{type:Object,required:!0}},computed:{data:function(){let e=[];return this.paymentResource.metadata.forEach(t=>{e.push({key:t.key,value:t.value})}),e},columns:function(){return[{property:"key",label:this.$tc("unzer-payment.paymentDetails.metadata.column.key"),rawData:!0},{property:"value",label:this.$tc("unzer-payment.paymentDetails.metadata.column.value"),rawData:!0}]}}});let{Component:d}=Shopware;d.register("unzer-payment-basket",{template:'{% block unzer_payment_basket %}\n \n \n {% block unzer_payment_basket_container %}\n \n \n {% endblock %}\n \n \n{% endblock %}',props:{paymentResource:{type:Object,required:!0}},computed:{data:function(){let e=[];return this.paymentResource.basket.basketItems.forEach(t=>{let n=this.formatCurrency(parseFloat(t.amountGross.toFixed(2))),a=this.formatCurrency(parseFloat(t.amountNet.toFixed(2)));t.amountDiscount>0&&(n=this.formatCurrency(-1*parseFloat(t.amountDiscount.toFixed(2))),a=this.formatCurrency(-1*parseFloat((t.amountDiscount-t.amountVat).toFixed(2)))),e.push({quantity:t.quantity,title:t.title,amountGross:n,amountNet:a})}),e},columns:function(){return[{property:"quantity",label:this.$tc("unzer-payment.paymentDetails.basket.column.quantity"),rawData:!0},{property:"title",label:this.$tc("unzer-payment.paymentDetails.basket.column.title"),rawData:!0},{property:"amountGross",label:this.$tc("unzer-payment.paymentDetails.basket.column.amountGross"),rawData:!0},{property:"amountNet",label:this.$tc("unzer-payment.paymentDetails.basket.column.amountNet"),rawData:!0}]}},methods:{formatCurrency(e){return Shopware.Utils.format.currency(e||0,this.paymentResource.currency)}}});let{Criteria:u}=Shopware.Data,m=["bc4c2cbfb5fda0bf549e4807440d0a54","4673044aff79424a938d42e9847693c3","713c7a332b432dcd4092701eda522a7e","5123af5ce94a4a286641973e8de7eb60","17830aa7e6a00b99eab27f0e45ac5e0d","4ebb99451f36ba01f13d5871a30bce2c","d4b90a17af62c1bb2f6c3b1fed339425","4b9f8d08b46a83839fd0eb14fe00efe6","08fb8d9a72ab4ca62b811e74f2eca79f","6cc3b56ce9b0f80bd44039c047282a41","614ad722a03ee96baa2446793143215b","409fe641d6d62a4416edd6307d758791","085b64d0028a8bd447294e03c4eb411a","cd6f59d572e6c90dff77a48ce16b44db","fd96d03535a46d197f5adac17c9f8bac","09588ffee8064f168e909ff31889dd7f"];Shopware.Component.override("sw-order-create-details-footer",{template:'{% block sw_order_create_details_footer_payment_method %}\n \n{% endblock %}',computed:{paymentMethodCriteria(){let e=new u;return this.salesChannelId&&e.addFilter(u.equals("salesChannels.id",this.salesChannelId)),e.addFilter(u.not("AND",[u.equalsAny("id",m)])),e}}});let{Component:h,Context:p}=Shopware,{Criteria:y}=Shopware.Data;h.override("sw-order-detail",{template:"{% block sw_order_detail_content_tabs_general %}\n {% parent() %}\n\n {% block unzer_payment_payment_tab %}\n \n {{ $tc('unzer-payment.tabTitle') }}\n \n {% endblock %}\n{% endblock %}",data(){return{isUnzerPayment:!1}},computed:{showTabs(){return!0}},watch:{orderId:{deep:!0,handler(){if(!this.orderId){this.isUnzerPayment=!1;return}let e=this.repositoryFactory.create("order"),t=new y(1,1);t.addAssociation("transactions"),e.get(this.orderId,p.api,t).then(e=>{e.transactions.forEach(e=>{e.customFields&&(e.customFields.unzer_payment_is_transaction||e.customFields.heidelpay_is_transaction)&&(this.isUnzerPayment=!0)})})},immediate:!0}}}),Shopware.Component.override("sw-order-list",{template:'{% block sw_order_list_grid_columns %}\n {% parent() %}\n\n {% block unzer_payment_column_transaction %}\n \n \n {{ item.transactions.last().id }}\n \n \n {% endblock %}\n{% endblock %}',methods:{getOrderColumns(){let e=this.$super("getOrderColumns");return e.splice(1,0,{property:"unzerPaymentTransactionId",label:"unzer-payment.order-list.transactionId",allowResize:!0}),e}}});let{Component:g,Context:f,Mixin:b}=Shopware,{Criteria:k}=Shopware.Data;g.register("unzer-payment-tab",{template:'{% block unzer_payment_payment_details %}\n \n
\n {% block unzer_payment_payment_details_content %}\n \n \n {% block unzer_payment_payment_details_content_payment_detail %}\n \n \n \n {% endblock %}\n\n {% block unzer_payment_payment_details_content_payment_history %}\n \n \n {% endblock %}\n\n {% block unzer_payment_payment_details_content_payment_basket %}\n \n \n {% endblock %}\n\n {% block unzer_payment_payment_details_content_payment_metadata %}\n \n \n {% endblock %}\n\n {% block unzer_payment_payment_details_content_inner %}{% endblock %}\n \n \n {% endblock %}\n
\n
\n
\n{% endblock %}',inject:["UnzerPaymentService","repositoryFactory"],mixins:[b.getByName("notification")],data(){return{paymentResources:[],loadedResources:0,isLoading:!0,order:null}},created(){this.createdComponent()},computed:{orderRepository(){return this.repositoryFactory.create("order")}},watch:{$route(){this.resetDataAttributes(),this.createdComponent()}},methods:{createdComponent(){this.loadData()},resetDataAttributes(){this.paymentResources=[],this.loadedResources=0,this.isLoading=!0},reloadPaymentDetails(){this.resetDataAttributes(),this.loadData()},loadData(){let e=this.$route.params.id,t=new k;t.addAssociation("currency").addAssociation("lineItems.promotion").getAssociation("transactions").addSorting(k.sort("createdAt","DESC")),this.orderRepository.get(e,f.api,t).then(e=>{this.order=e,e.transactions&&e.transactions.forEach((e,t)=>{if(!e.customFields||!e.customFields.unzer_payment_is_transaction&&!e.customFields.heidelpay_is_transaction){this.loadedResources++;return}this.UnzerPaymentService.fetchPaymentDetails(e.id).then(n=>{this.paymentResources[t]=n,this.paymentResources[t].orderTransactionId=e.id,this.loadedResources++,this.isLoading=this.order.transactions.length!==this.loadedResources}).catch(()=>{this.createNotificationError({title:this.$tc("unzer-payment.paymentDetails.notifications.genericErrorMessage"),message:this.$tc("unzer-payment.paymentDetails.notifications.couldNotRetrieveMessage")}),this.isLoading=!1})})})},reloadOrderDetails(){setTimeout(()=>{this.findOrderDetailComponentAndReInit()},5e3)},async findOrderDetailComponentAndReInit(e=this){let t=e.$parent;return void 0===t?null:"sw-order-detail"!==t.$options.name?this.findOrderDetailComponentAndReInit(t):t.isOrderEditing?null:void t.createdComponent()}}});var w=JSON.parse('{"unzer-payment":{"tabTitle":"Unzer Payment","paymentDetails":{"history":{"cardTitle":"Zahlungsverlauf","column":{"type":"Typ","amount":"Betrag","date":"Datum"},"type":{"authorization":"Reservierung","charge":"Einzug","shipment":"Versandmitteilung","refund":"R\xfcckerstattung","cancellation":"Stornierung","default":""}},"actions":{"reason":{"placeholder":"Grund","cancel":"Abgebrochen","credit":"Gutschrift","return":"R\xfcckgabe"},"chargeButton":"Einziehen","shipButton":"Versandmitteilung","refundButton":"R\xfcckerstatten","defaultButton":"Erledigt","cancelButton":"Stornieren","noActions":"Keine Aktionen m\xf6glich","confirmCancelModal":{"text":"M\xf6chten Sie wirklich die Reservierung \xfcber den angegebenen Betrag stornieren?","amountLabel":"Betrag:","yesButton":"Ja","noButton":"Nein"}},"detail":{"cardTitle":"Zahlungsdetails","shortId":"Short-ID","id":"Zahlungs-ID","state":"Status","amountRemaining":"Betrag (Rest)","amountCancelled":"Betrag (R\xfcckerstattet)","amountCharged":"Betrag (Eingezogen)","descriptor":"Verwendungszweck"},"metadata":{"cardTitle":"Metadaten","column":{"key":"Schl\xfcssel","value":"Wert"}},"basket":{"cardTitle":"Warenkorb","column":{"quantity":"Anzahl","title":"Titel","amountGross":"Betrag (brutto)","amountNet":"Betrag (netto)"}},"notifications":{"genericErrorMessage":"Es ist ein Fehler aufgetreten!","refundSuccessTitle":"R\xfcckerstatten","refundSuccessMessage":"Die R\xfcckerstattung wurde erfolgreich durchgef\xfchrt.","refundErrorTitle":"R\xfcckerstatten","chargeSuccessTitle":"Einziehen","chargeSuccessMessage":"Das Einziehen der Zahlung wurde erfolgreich durchgef\xfchrt.","chargeErrorTitle":"Einziehen","shipSuccessTitle":"Versandmitteilung","shipSuccessMessage":"Die Versandmitteilung wurde erfolgreich gesendet.","shipErrorTitle":"Versandmitteilung","invoiceNotFoundMessage":"Zu dieser Bestellung wurde keine Rechnung gefunden","couldNotRetrieveMessage":"Die Zahlungsdetails konnten nicht abgerufen werden, bitte pr\xfcfen Sie die Logdateien f\xfcr weitere Informationen.","documentDateMissingError":"Das Datum der Rechnung ist leer.","paymentMissingError":"Die Zahlung konnte nicht gefunden werden","paylaterInvoiceDocumentRequiredErrorMessage":"Bitte erstellen oder hinterlegen Sie zun\xe4chst eine Rechnung f\xfcr die Bestellung.","cancelSuccessTitle":"Stornierung","cancelErrorTitle":"Stornierung","cancelSuccessMessage":"Die Stornierung wurde erfolgreich durchgef\xfchrt.","cancelErrorMessage":"Die Stornierung konnte nicht durchgef\xfchrt werden."}},"order-list":{"transactionId":"Unzer Transaktions ID"},"methods":{"paylaterInvoice":{"main":"Rechnungskauf","b2b-eur":"Rechnungskauf B2B EUR","b2b-chf":"Rechnungskauf B2B CHF","b2c-eur":"Rechnungskauf B2C EUR","b2c-chf":"Rechnungskauf B2C CHF"},"paylaterInstallment":{"main":"Ratenkauf","b2c-eur":"Ratenkauf B2C EUR","b2c-chf":"Ratenkauf B2C CHF"},"paylaterDirectDebitSecured":{"main":"Lastschrift","b2c-eur":"Lastschrift B2C EUR"}}},"unzer-payment-settings":{"subheadings":{"paymentSettingsBookingModes":"Buchungsmodus","paymentSettingsSaveDevices":"Zahlungsmittel speichern","paymentSettingsExpressCheckout":"Express Checkout"},"module":{"title":"Unzer Payment","description":"Unzer Payment"},"google-pay":{"gatewayMerchantId":"Gateway H\xe4ndler ID"},"form":{"message":{"success":{"title":"Test erfolgreich","message":"Die angegebenen API-Zugangsdaten sind korrekt!"},"error":{"title":"Test fehlgeschlagen","message":"Die angegebenen API-Zugangsdaten sind nicht korrekt! Bitte korrigieren Sie die Eingabe und versuchen Sie es erneut."}},"testButton":"API Zugangsdaten testen","webhookButton":"Webhooks registrieren","privateKey":"Private Key","publicKey":"Public Key","additionalKeys":"API Keys f\xfcr weitere Zahlungsarten"},"modal":{"close":"Schlie\xdfen","webhook":{"title":"Webhooks","httpsInfo":"Es kann nur eine HTTPS-Domain pro Verkaufskanal registriert werden.","registered":"Webhook ist bereits registriert","placeholder":"Bitte w\xe4hlen Sie eine Domain aus","submit":{"register":"Webhooks registrieren","clear":"Webhooks ausw\xe4hlen | Ausgew\xe4hlten Webhook entfernen | Entferne {count} Webhooks"}}},"webhook":{"messagePrefix":"Domain: ","register":{"done":"Webhook registriert | Webhooks registriert","error":"Der Webhook konnte nicht registriert werden | Die Webhooks konnten nicht registriert werden"},"clear":{"done":"Webhook entfernt | Webhooks entfernt","error":"Der Webhook konnte nicht entfernt werden | Die Webhooks konnten nicht entfernt werden"},"missing":{"fields":"Nicht alle ben\xf6tigten Felder sind vorhanden","context":"Der Kontext konnte nicht aktualisiert werden","selection":"Es wurden keine Domains selektiert"},"notFound":{"salesChannelDomain":"Die spezifizierte Domain wurde nicht gefunden"},"globalError":{"title":"Ein Fehler ist aufgetreten","message":"Bitte kontaktieren sie uns f\xfcr mehr Informationen"},"empty":"F\xfcr diesen Private Key sind keine Webhooks registriert. Bitte pr\xfcfen Sie ob dieser valide ist und ob Konfigurationen f\xfcr dedizierte Verkaufskan\xe4le vorgenommen wurden.","show":"Webhooks anzeigen"}},"sw-payment-card":{"deprecated":"Veraltet"}}'),z=JSON.parse('{"unzer-payment":{"tabTitle":"Unzer Payment","paymentDetails":{"history":{"cardTitle":"Payment History","column":{"type":"Type","amount":"Amount","date":"Date"},"type":{"authorization":"Authorization","charge":"Charging","shipment":"Shipping notification","refund":"Refund","cancellation":"Cancel","default":""}},"actions":{"reason":{"placeholder":"Reason","cancel":"Cancel","credit":"Credit","return":"Return"},"chargeButton":"Charge","shipButton":"Shipping notice","refundButton":"Refund","defaultButton":"Done","cancelButton":"Cancel","noActions":"No actions possible","confirmCancelModal":{"text":"Do you really want to cancel the authorization of the selected amount?","amountLabel":"Amount:","yesButton":"Yes","noButton":"No"}},"detail":{"cardTitle":"Payment Details","shortId":"Short-ID","id":"Payment-ID","state":"State","amountRemaining":"Amount (Remaining)","amountCancelled":"Amount (Cancelled)","amountCharged":"Amount (Charged)","descriptor":"Descriptor"},"metadata":{"cardTitle":"Metadata","column":{"key":"Key","value":"Value"}},"basket":{"cardTitle":"Basket","column":{"quantity":"Quantity","title":"Title","amountGross":"Amount (gross)","amountNet":"Amount (net)"}},"notifications":{"genericErrorMessage":"An error has occurred!","refundSuccessTitle":"Refund","refundSuccessMessage":"The reimbursement was successfully completed.","refundErrorTitle":"Refund","chargeSuccessTitle":"Charge","chargeSuccessMessage":"The collection of the payment was carried out successfully.","chargeErrorTitle":"Charge","shipSuccessTitle":"Shipping notice","shipSuccessMessage":"The shipping notification was successfully sent.","shipErrorTitle":"Shipping notice","invoiceNotFoundMessage":"No invoice was found for this order.","couldNotRetrieveMessage":"The payment details could not be retrieved, please check the log files for more information.","documentDateMissingError":"Document date for invoice is empty.","paymentMissingError":"Payment could not be found","paylaterInvoiceDocumentRequiredErrorMessage":"Please create or upload an invoice for the order first.","cancelSuccessTitle":"Cancel","cancelErrorTitle":"Cancel","cancelSuccessMessage":"The reversal was successfully completed.","cancelErrorMessage":"The reversal could not be performed."}},"order-list":{"transactionId":"Unzer transaction ID"},"methods":{"paylaterInvoice":{"main":"Invoice","b2b-eur":"Invoice B2B EUR","b2b-chf":"Invoice B2B CHF","b2c-eur":"Invoice B2C EUR","b2c-chf":"Invoice B2C CHF"},"paylaterInstallment":{"main":"Installment","b2c-eur":"Installment B2C EUR","b2c-chf":"Installment B2C CHF"},"paylaterDirectDebitSecured":{"main":"Direct Debit","b2c-eur":"Direct Debit B2C EUR"}}},"unzer-payment-settings":{"subheadings":{"paymentSettingsBookingModes":"Booking Modes","paymentSettingsSaveDevices":"Save Payment Details","paymentSettingsExpressCheckout":"Express Checkout"},"module":{"title":"Unzer Payment","description":"Unzer Payment"},"google-pay":{"gatewayMerchantId":"Gateway Merchant ID"},"form":{"message":{"success":{"title":"Test succeeded","message":"The provided credentials are valid!"},"error":{"title":"Test failed","message":"API Credentials are invalid, please correct them and try again!"}},"testButton":"Test API credentials","webhookButton":"Register webhooks","privateKey":"Private Key","publicKey":"Public Key","additionalKeys":"API Keys for additional payment methods"},"modal":{"close":"Close","webhook":{"title":"Webhooks","httpsInfo":"Only one HTTPS domain per sales channel can be registered.","registered":"Webhook is already registered","placeholder":"Please select a domain","submit":{"register":"Register webhooks","clear":"Select items to clear | Clear selected webhook | Clear {count} webhooks"}}},"webhook":{"messagePrefix":"Domain: ","register":{"done":"Webhook registered | Webhooks registered","error":"Webhook could not be registered | Webhooks could not be registered"},"clear":{"done":"Webhook cleared | Webhooks cleared","error":"Webhook could not be cleared | Webhooks could not be cleared"},"missing":{"fields":"Some mandatory fields are missing","context":"The context could not be refreshed","selection":"No domain was selected"},"notFound":{"salesChannelDomain":"The selected domain could not be found"},"globalError":{"title":"An error has occurred!","message":"Please contact us for more information"},"empty":"There are no webhooks registered for this private key. Make sure the private key is valid and check for other specific sales channel configurations.","show":"Show webhooks"}},"sw-payment-card":{"deprecated":"Deprecated"}}');let{Module:v}=Shopware;v.register("unzer-payment",{type:"plugin",name:"UnzerPayment",title:"unzer-payment.general.title",description:"unzer-payment.general.descriptionTextModule",version:"0.0.1",targetVersion:"0.0.1",maxDigits:4,snippets:{"de-DE":w,"en-GB":z},routeMiddleware(e,t){"sw.order.detail"===t.name&&t.children.push({component:"unzer-payment-tab",name:"unzer-payment.payment.detail",path:"/sw/order/detail/:id/unzer-payment",isChildren:!0,meta:{parentPath:"sw.order.index"}}),e(t)}}),n(129);let S=Shopware.Data.Criteria;Shopware.Component.register("unzer-payment-register-webhook",{template:'{% block unzer_payment_payment_register_webhook %}\n \n {% block unzer_payment_payment_register_webhook_button %}\n \n {{ $tc(\'unzer-payment-settings.form.webhookButton\') }}\n \n {% endblock %}\n\n {% block unzer_payment_payment_register_webhook_modal %}\n \n \n \n {{ $tc(\'unzer-payment-settings.modal.webhook.httpsInfo\') }}\n \n \n \n \n \n {{ $tc(\'unzer-payment-settings.modal.webhook.registered\') }}\n \n \n \n \n \n\n \n \n {{ $tc(\'unzer-payment-settings.modal.close\') }}\n \n \n {{ $tc(\'unzer-payment-settings.modal.webhook.submit.register\') }}\n \n \n \n {% endblock %}\n
\n{% endblock %}',mixins:[Shopware.Mixin.getByName("notification")],inject:["repositoryFactory","UnzerPaymentConfigurationService"],props:{webhooks:{type:Array,required:!0},isLoading:{type:Boolean,required:!1},selectedSalesChannelId:{type:String,required:!1},privateKey:{type:String,required:!0},isDisabled:{type:Boolean,required:!1}},computed:{salesChannelRepository(){return this.repositoryFactory.create("sales_channel")}},data(){return{isModalActive:!1,isRegistering:!1,isRegistrationSuccessful:!1,isDataLoading:!1,selection:{},selectedDomain:null,entitySelection:{},salesChannels:{}}},created(){this.createdComponent()},methods:{createdComponent(){this.loadData()},loadData(e,t){let n=this;this.isDataLoading=!0;let a=new S(e,t);a.addAssociation("domains"),this.salesChannelRepository.search(a,Shopware.Context.api).then(e=>{n.salesChannels=e,n.isDataLoading=!1})},onPageChange(e){this.loadData(e.page,e.limit)},openModal(){this.$emit("modal-open"),this.isModalActive=!0},closeModal(){this.isModalActive=!1},registerWebhooks(){let e=this;this.isRegistrationSuccessful=!1,this.isRegistering=!0,this.UnzerPaymentConfigurationService.registerWebhooks({selection:this.entitySelection}).then(t=>{e.isRegistrationSuccessful=!0,void 0!==t&&e.messageGeneration(t),this.$emit("webhook-registered",t)}).catch(()=>{this.createNotificationError({title:this.$tc("unzer-payment-settings.webhook.globalError.title"),message:this.$tc("unzer-payment-settings.webhook.globalError.message")})}).finally(()=>{e.isRegistering=!1})},onRegistrationFinished(){this.isRegistrationSuccessful=!1,this.selection={}},onSelectItem(e,t){t&&(t.privateKey=this.privateKey,this.entitySelection[t.salesChannelId]=t)},messageGeneration(e){let t=e.length;Object.keys(e).forEach(n=>{e[n].success?this.createNotificationSuccess({title:this.$tc(e[n].message,t),message:this.$tc("unzer-payment-settings.webhook.messagePrefix",t)+n}):this.createNotificationError({title:this.$tc(e[n].message,t),message:this.$tc("unzer-payment-settings.webhook.messagePrefix",t)+n})})},isWebhookRegisteredForSalesChannel(e){let t=!1,n=this.getSalesChannelById(e);return!!this.webhooks.length&&(n.domains.forEach(e=>{this.webhooks.forEach(n=>{if(n.url.indexOf(e.url)>-1)return t=!0,!0})}),t)},getSalesChannelById(e){let t=null;return this.salesChannels.forEach(n=>{if(n.id===e)return t=n,!0}),t},getSalesChannelDomainCriteria(e){let t=new S;return t.addFilter(S.prefix("url","https://")),t.addFilter(S.equals("salesChannelId",e)),t}}});let{Component:_,Mixin:C,Context:P}=Shopware;_.register("unzer-webhooks-modal",{template:'\n \n {{ $tc(\'unzer-payment-settings.webhook.empty\') }}\n \n \n \n \n \n {{ $tc(\'unzer-payment-settings.modal.webhook.submit.clear\', webhookSelectionLength, {count: webhookSelectionLength}) }}\n \n
\n',mixins:[C.getByName("notification")],inject:["UnzerPaymentConfigurationService"],props:{keyPair:{type:Array,required:!0},webhooks:{type:Array,required:!0},isLoadingWebhooks:{type:Boolean}},data(){return{isClearing:!1,isClearingSuccessful:!1,webhookSelection:null,webhookSelectionLength:0}},computed:{webhookColumns(){return[{property:"event",dataIndex:"event",label:"Event"},{property:"url",dataIndex:"url",label:"URL"}]}},methods:{clearWebhooks(e){let t=this;this.isClearingSuccessful=!1,this.isClearing=!0,this.isLoading=!0,this.UnzerPaymentConfigurationService.clearWebhooks({privateKey:e,selection:this.webhookSelection}).then(n=>{t.isClearingSuccessful=!0,t.webhookSelection=[],t.webhookSelectionLength=0,t.$refs.webhookDataGrid.resetSelection(),t.$emit("load-webhooks",e),void 0!==n&&t.messageGeneration(n)}).catch(()=>{this.createNotificationError({title:this.$tc("unzer-payment-settings.webhook.globalError.title"),message:this.$tc("unzer-payment-settings.webhook.globalError.message")})}).finally(()=>{t.isLoading=!1,t.isClearing=!1})},onClearingFinished(){this.isClearingSuccessful=!1,this.isClearing=!1},onSelectWebhook(e){this.webhookSelectionLength=Object.keys(e).length,this.webhookSelection=e},messageGeneration(e){let t=e.length;Object.keys(e).forEach(n=>{e[n].success?this.createNotificationSuccess({title:this.$tc(e[n].message,t),message:this.$tc("unzer-payment-settings.webhook.messagePrefix",t)+n}):this.createNotificationError({title:this.$tc(e[n].message,t),message:this.$tc("unzer-payment-settings.webhook.messagePrefix",t)+n})})}}}),n(708),n(337);let{Component:D}=Shopware;D.register("unzer-payment-plugin-icon",{template:'{% block unzer_plugin_icon %}\n
\n{% endblock %}',computed:{assetFilter(){return Shopware.Filter.getByName("asset")}}}),n(425);let{Component:R}=Shopware;R.register("unzer-settings-subheading",{template:'{% block unzer_settings_subheading %}\n {{ label }}
\n{% endblock %}',computed:{label(){let e=this.$attrs.name.split("."),t=e[e.length-1];return this.$tc("unzer-payment-settings.subheadings."+t)}}});let{Component:$}=Shopware;$.override("sw-system-config",{template:"{% block sw_system_config_content_card_field %}\n \n \n \n \n \n {% parent() %}\n \n{% endblock %}",inject:["UnzerPaymentConfigurationService"],data(){return{readOnlyUnzerGooglePayGatewayMerchantId:{}}},watch:{currentSalesChannelId(){this.getUnzerGooglePayGatewayMerchantId(),this.$emit("sales-channel-changed",this.actualConfigData[this.currentSalesChannelId],this.currentSalesChannelId)},isLoading(e){this.$emit("loading-changed",e),!1===e&&this.getUnzerGooglePayGatewayMerchantId()}},computed:{unzerGooglePayGatewayMerchantId(){return this.readOnlyUnzerGooglePayGatewayMerchantId||""}},methods:{async createdComponent(){await this.$super("createdComponent"),this.getUnzerGooglePayGatewayMerchantId()},getUnzerGooglePayGatewayMerchantId(){"UnzerPayment6.settings"===this.domain&&this.UnzerPaymentConfigurationService.getGooglePayGatewayMerchantId(this.currentSalesChannelId).then(e=>{this.readOnlyUnzerGooglePayGatewayMerchantId=e.gatewayMerchantId}).catch(()=>{})}}}),n(345);let{Component:M,Mixin:I,Context:T}=Shopware;M.register("unzer-payment-settings",{template:'{% block unzer_payment_settings %}\n \n {% block unzer_payment_settings_header %}\n \n \n {{ $tc(\'sw-settings.index.title\') }}\n \n {{ $tc(\'unzer-payment-settings.module.title\') }}\n
\n \n {% endblock %}\n\n {% block unzer_payment_settings_actions %}\n \n {% block unzer_payment_settings_actions_save %}\n \n {{ $tc(\'global.default.save\') }}\n \n {% endblock %}\n \n {% endblock %}\n\n {% block unzer_payment_settings_content %}\n \n \n \n \n \n \n {{ $tc(\'unzer-payment-settings.webhook.show\') }}\n \n \n \n \n {{ $tc(\'unzer-payment-settings.form.testButton\') }}\n \n \n \n
\n
\n {{ $tc(\'unzer-payment-settings.form.additionalKeys\') }}\n
\n
\n
\n
\n
\n \n
\n {{ keyPairSettingGroupTitle(keyPairSetting) }}\n
\n
\n \n
\n {{ keyPairSettingTitle(keyPairSetting) }}\n
\n
\n
\n
\n \n {{ $tc(\'unzer-payment-settings.webhook.show\') }}\n \n \n \n \n {{ $tc(\'unzer-payment-settings.form.testButton\') }}\n \n
\n
\n \n
\n
\n \n \n \n \n \n \n \n {% endblock %}\n \n{% endblock %}',mixins:[I.getByName("notification"),I.getByName("sw-inline-snippet")],inject:["repositoryFactory","UnzerPaymentConfigurationService"],data(){return{isLoading:!0,isLoadingWebhooks:!0,isAdditionalKeysExpanded:!1,selectedKeyPairForTesting:!1,isTestSuccessful:!1,isSaveSuccessful:!1,config:{},webhooks:[],loadedWebhooksPrivateKey:!1,selectedSalesChannelId:null,keyPairSettings:[{key:"b2b-eur",group:"paylaterInvoice"},{key:"b2b-chf",group:"paylaterInvoice"},{key:"b2c-eur",group:"paylaterInvoice"},{key:"b2c-chf",group:"paylaterInvoice"},{key:"b2c-eur",group:"paylaterInstallment"},{key:"b2c-chf",group:"paylaterInstallment"},{key:"b2c-eur",group:"paylaterDirectDebitSecured"}],openModalKeyPair:null}},metaInfo(){return{title:"UnzerPayment"}},computed:{paymentMethodRepository(){return this.repositoryFactory.create("payment_method")},arrowIconName(){return T.app.config.version.match(/((\d+)\.?(\d+?)\.?(\d+)?\.?(\d*))-?([A-z]+?\d+)?/i)[3]>=5?"regular-chevron-right-xs":"small-arrow-medium-right"},defaultKeyPair(){return{privateKey:this.getConfigValue("privateKey"),publicKey:this.getConfigValue("publicKey")}}},watch:{openModalKeyPair(e){e&&e.privateKey!==this.loadedWebhooksPrivateKey&&this.loadWebhooks(e.privateKey)}},methods:{getConfigValue(e){if(!this.config||!this.$refs.systemConfig||!this.$refs.systemConfig.actualConfigData||!this.$refs.systemConfig.actualConfigData.null)return"";let t=this.$refs.systemConfig.actualConfigData.null;return this.config[`UnzerPayment6.settings.${e}`]||t[`UnzerPayment6.settings.${e}`]},onValidateCredentials(e){this.isTestSuccessful=!1,this.selectedKeyPairForTesting=e;let t=this.getArrayKeyOfKeyPairSetting(e),n=e;-1!==t&&(n=this.keyPairSettings[t]);let a={publicKey:n.publicKey,privateKey:n.privateKey,salesChannel:this.$refs.systemConfig.currentSalesChannelId};this.UnzerPaymentConfigurationService.validateCredentials(a).then(()=>{this.createNotificationSuccess({title:this.$tc("unzer-payment-settings.form.message.success.title"),message:this.$tc("unzer-payment-settings.form.message.success.message")}),this.isTestSuccessful=!0,this.selectedKeyPairForTesting=!1}).catch(()=>{this.createNotificationError({title:this.$tc("unzer-payment-settings.form.message.error.title"),message:this.$tc("unzer-payment-settings.form.message.error.message")}),this.onTestFinished()})},onTestFinished(){this.selectedKeyPairForTesting=!1,this.isTestSuccessful=!1},setPublicKey(e,t){this.keyPairSettings[this.getArrayKeyOfKeyPairSetting(e)].publicKey=t},setPrivateKey(e,t){this.keyPairSettings[this.getArrayKeyOfKeyPairSetting(e)].privateKey=t},getArrayKeyOfKeyPairSetting(e){return this.keyPairSettings.findIndex(t=>t.key===e.key&&t.group===e.group)},onSave(){this.isLoading=!0,["paylaterInvoice","paylaterInstallment","paylaterDirectDebitSecured"].forEach(e=>{this.config[`UnzerPayment6.settings.${e}`]=[]}),this.keyPairSettings.reduce((e,t)=>(t&&t.privateKey&&t.publicKey&&e[`UnzerPayment6.settings.${t.group}`].push(t),e),this.config),this.$refs.systemConfig.saveAll().then(()=>{this.isSaveSuccessful=!0;let e=this.$tc("sw-plugin-config.messageSaveSuccess");"sw-plugin-config.messageSaveSuccess"===e&&(e=this.$tc("sw-extension-store.component.sw-extension-config.messageSaveSuccess")),this.createNotificationSuccess({title:this.$tc("global.default.success"),message:e}),document.dispatchEvent(new CustomEvent("unzer-settings-saved",{}))}).catch(e=>{this.isSaveSuccessful=!1,this.createNotificationError({title:this.$tc("global.default.error"),message:e}),this.isLoading=!1})},onConfigChange(e){this.config=e,this.isLoading=!1,this.syncKeyPairConfig()},onLoadingChanged(e){this.isLoading=e},onSalesChannelChanged(e,t){e&&this.onConfigChange(e),this.selectedSalesChannelId=t},onWebhookRegistered(e){this.loadWebhooks(e)},loadWebhooks(e){this.isLoadingWebhooks=!0,this.UnzerPaymentConfigurationService.getWebhooks(e).then(t=>{this.webhooks=t,this.webhookSelection=null,this.webhookSelectionLength=0,this.loadedWebhooksPrivateKey=e}).catch(()=>{this.webhooks=[],this.loadedWebhooksPrivateKey=!1}).finally(()=>{this.isLoadingWebhooks=!1,this.isClearingSuccessful=!1})},getBind(e,t){let n;return t!==this.config&&(this.config=t),this.$refs.systemConfig.config.forEach(t=>{t.elements.forEach(t=>{if(t.name===e.name){n=t;return}})}),n||e},keyPairSettingTitle(e){return this.$tc(`unzer-payment.methods.${e.group}.${e.key}`)},keyPairSettingGroupTitle(e){return this.$tc(`unzer-payment.methods.${e.group}.main`)},isShowWebhooksButtonEnabled(e){return e&&e.privateKey&&e.publicKey},isRegisterWebhooksButtonEnabled(e){return!this.isLoading&&e&&e.privateKey},syncKeyPairConfig(){let e=this;["paylaterInvoice","paylaterInstallment","paylaterDirectDebitSecured"].forEach(t=>{this.config[`UnzerPayment6.settings.${t}`]&&this.config[`UnzerPayment6.settings.${t}`].forEach(t=>{e.keyPairSettings.forEach((e,n,a)=>{e.group===t.group&&e.key===t.key&&(a[n]=t)})})})},toggleAdditionalKeys(){this.isAdditionalKeysExpanded=!this.isAdditionalKeysExpanded}}});let{Module:A}=Shopware;A.register("unzer-payment-configuration",{type:"plugin",name:"UnzerPayment",title:"unzer-payment-settings.module.title",description:"unzer-payment-settings.module.description",version:"1.1.0",targetVersion:"1.1.0",snippets:{"de-DE":w,"en-GB":z},routes:{settings:{component:"unzer-payment-settings",path:"settings",meta:{parentPath:"sw.settings.index"}}},settingsItem:{name:"unzer-payment-configuration",to:"unzer.payment.configuration.settings",label:"unzer-payment-settings.module.title",group:"plugins",iconComponent:"unzer-payment-plugin-icon",backgroundEnabled:!1}}),n(748),n(963),Shopware.Component.override("sw-payment-card",{template:'{% block sw_payment_card_description %}\n \n
\n \n {{ $tc(\'sw-payment-card.deprecated\') }}\n \n
\n
\n
\n{% endblock %}',snippets:{"de-DE":w,"en-GB":z}}),n(34)}()}();
\ No newline at end of file
diff --git a/src/Resources/views/storefront/base.html.twig b/src/Resources/views/storefront/base.html.twig
deleted file mode 100644
index ed79a0c6..00000000
--- a/src/Resources/views/storefront/base.html.twig
+++ /dev/null
@@ -1,7 +0,0 @@
-{% sw_extends '@Storefront/storefront/base.html.twig' %}
-{% block base_body_script %}
- {{ parent() }}
-
-
-
-{% endblock %}
\ No newline at end of file
diff --git a/src/Resources/views/storefront/page/checkout/confirm/index.html.twig b/src/Resources/views/storefront/page/checkout/confirm/index.html.twig
index bfe4b959..29f3880b 100755
--- a/src/Resources/views/storefront/page/checkout/confirm/index.html.twig
+++ b/src/Resources/views/storefront/page/checkout/confirm/index.html.twig
@@ -65,7 +65,6 @@
{% endif %}
{% endblock %}
-
{% block page_checkout_confirm_form_submit %}
{{ parent() }}
{% sw_include '@Storefront/storefront/component/unzer/confirm-form-extension.html.twig' %}