From 61f063c72b43c8651c0747962eaec98cf6f6e1f7 Mon Sep 17 00:00:00 2001 From: Edgaras Date: Tue, 29 Mar 2022 12:08:27 +0300 Subject: [PATCH] Release 4.0.29 --- CHANGELOG.md | 4 ++++ CHANGELOG_de-DE.md | 4 ++++ README.md | 2 +- composer.json | 2 +- docs/en/documentation.html | 2 +- src/Core/Util/Payload/TransactionPayload.php | 12 ++++++++++++ .../public/administration/js/wallee-payment.js | 2 +- 7 files changed, 24 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12b32b0..58dee07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 4.0.29 +- Fix to hide birthdate field if it's already provided +- Tested against SW v6.4.9.0 + # 4.0.28 - Added italian translations - Tested against SW v6.4.9.0 diff --git a/CHANGELOG_de-DE.md b/CHANGELOG_de-DE.md index 5286529..c8f4438 100644 --- a/CHANGELOG_de-DE.md +++ b/CHANGELOG_de-DE.md @@ -1,3 +1,7 @@ +# 4.0.29 +- Korrektur zum Ausblenden des Geburtsdatumsfelds, wenn es bereits vorhanden ist +- Getestet mit SW v6.4.9.0 + # 4.0.28 - Italienische Übersetzungen hinzugefügt - Getestet mit SW v6.4.9.0 diff --git a/README.md b/README.md index 23f84d8..0de4260 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ tail -f var/log/wallee_payment*.log ## Documentation -[Documentation](https://plugin-documentation.wallee.com/wallee-payment/shopware-6/4.0.28/docs/en/documentation.html) +[Documentation](https://plugin-documentation.wallee.com/wallee-payment/shopware-6/4.0.29/docs/en/documentation.html) ## License diff --git a/composer.json b/composer.json index 3e3e12c..bc4ed78 100644 --- a/composer.json +++ b/composer.json @@ -62,5 +62,5 @@ "wallee/sdk": "3.0.1" }, "type": "shopware-platform-plugin", - "version": "4.0.28" + "version": "4.0.29" } \ No newline at end of file diff --git a/docs/en/documentation.html b/docs/en/documentation.html index 3608adf..5a12862 100644 --- a/docs/en/documentation.html +++ b/docs/en/documentation.html @@ -22,7 +22,7 @@

Documentation

  • - + Source
  • diff --git a/src/Core/Util/Payload/TransactionPayload.php b/src/Core/Util/Payload/TransactionPayload.php index 33c6cef..441cec7 100644 --- a/src/Core/Util/Payload/TransactionPayload.php +++ b/src/Core/Util/Payload/TransactionPayload.php @@ -514,6 +514,13 @@ protected function getAddressPayload(CustomerEntity $customer, CustomerAddressEn } $salutation = !empty($salutation) ? $this->fixLength($salutation, 20) : null; + $birthday = null; + if (!empty($customer->getBirthday())) { + $birthday = new \DateTime(); + $birthday->setTimestamp($customer->getBirthday()->getTimestamp()); + $birthday = $birthday->format('Y-m-d'); + } + $addressData = [ 'city' => $customerAddressEntity->getCity() ? $this->fixLength($customerAddressEntity->getCity(), 100) : null, 'country' => $customerAddressEntity->getCountry() ? $customerAddressEntity->getCountry()->getIso() : null, @@ -526,6 +533,7 @@ protected function getAddressPayload(CustomerEntity $customer, CustomerAddressEn 'postal_state' => $customerAddressEntity->getCountryState() ? $customerAddressEntity->getCountryState()->getShortCode() : null, 'salutation' => $salutation, 'street' => $customerAddressEntity->getStreet() ? $this->fixLength($customerAddressEntity->getStreet(), 300) : null, + 'birthday' => $birthday ]; $addressPayload = (new AddressCreate()) @@ -541,6 +549,10 @@ protected function getAddressPayload(CustomerEntity $customer, CustomerAddressEn ->setSalutation($addressData['salutation']) ->setStreet($addressData['street']); + if (!empty($addressData['birthday'])) { + $addressPayload->setDateOfBirth($addressData['birthday']); + } + if (!$addressPayload->valid()) { $this->logger->critical('Address payload invalid:', $addressPayload->listInvalidProperties()); throw new InvalidPayloadException('Address payload invalid:' . json_encode($addressPayload->listInvalidProperties())); diff --git a/src/Resources/public/administration/js/wallee-payment.js b/src/Resources/public/administration/js/wallee-payment.js index a076a6d..0eb7da4 100644 --- a/src/Resources/public/administration/js/wallee-payment.js +++ b/src/Resources/public/administration/js/wallee-payment.js @@ -1 +1 @@ -!function(t){var e={};function n(a){if(e[a])return e[a].exports;var o=e[a]={i:a,l:!1,exports:{}};return t[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,a){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(a,o,function(e){return t[e]}.bind(null,o));return a},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/bundles/walleepayment/",n(n.s="LLfH")}({"+wCd":function(t,e){t.exports='{% block wallee_order_action_refund %}\n\n\n\t{% block wallee_order_action_refund_amount %}\n\n\t\t\n\t\t\n\n\t\t
    \n\t\t\t{{ $tc(\'wallee-order.refundAction.maxAvailableItemsToRefund\') }}:\n\t\t\t{{ this.$parent.refundableQuantity }}\n\t\t
    \n\t{% endblock %}\n\n\t{% block wallee_order_action_refund_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n
    \n{% endblock %}\n'},"//CG":function(t,e){t.exports='\n\t\n\t\t
    \n\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
    \n\t
    \n
    \n\n'},"/DdT":function(t,e){t.exports='{% block wallee_order_action_refund_by_amount %}\n\n\n\t{% block wallee_order_action_refund_amount_by_amount %}\n\t\t\n\t\t\n\t{% endblock %}\n\n\t{% block wallee_order_action_refund_confirm_button_by_amount %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n'},"9CUS":function(t,e){t.exports='{% block wallee_settings %}\n\n\n\t{% block wallee_settings_header %}\n\t\n\t{% endblock %}\n\n\t{% block wallee_settings_actions %}\n\t\n\t{% endblock %}\n\n\t{% block wallee_settings_content %}\n\t\n\t{% endblock %}\n\n{% endblock %}'},CFNN:function(t,e,n){},CUwX:function(t,e){t.exports='{% block wallee_settings_icon %}\n \n \n\n\n\n\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\n\n\n\n\n\n \n{% endblock %}\n'},IZ6r:function(t,e){t.exports='{% block wallee_settings_content_card_channel_config_credentials %}\n\t\n\n\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container %}\n\t\t\t\n\n\t\t\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container_settings %}\n\t\t\t\t\t
    \n\n\t\t\t\t\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container_settings_space_id %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container_settings_user_id %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container_settings_application_key %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\t\t\t\t\t
    \n\t\t\t\t{% endblock %}\n\t\t\t
    \n\t\t{% endblock %}\n\t\n\n{% endblock %}\n'},LLfH:function(t,e,n){"use strict";n.r(e);var a=n("Uo3x"),o=n.n(a),r=(n("z7gL"),Shopware),i=r.Component,l=r.Context,s=Shopware.Data.Criteria;i.override("sw-order-detail",{template:o.a,data:function(){return{isWalleePayment:!1}},computed:{isEditable:function(){return!this.isWalleePayment||"wallee.order.detail"!==this.$route.name},showTabs:function(){return!0}},watch:{orderId:{deep:!0,handler:function(){var t=this;if(this.orderId){var e=this.repositoryFactory.create("order"),n=new s(1,1);n.addAssociation("transactions"),e.get(this.orderId,l.api,n).then((function(e){if(e.amountTotal<=0||e.transactions.length<=0||!e.transactions[0].paymentMethodId)t.setIsWalleePayment(null);else{var n=e.transactions[0].paymentMethodId;null!=n&&t.setIsWalleePayment(n)}}))}else this.setIsWalleePayment(null)},immediate:!0}},methods:{setIsWalleePayment:function(t){var e=this;t&&this.repositoryFactory.create("payment_method").get(t,l.api).then((function(t){e.isWalleePayment="handler_walleepayment_walleepaymenthandler"===t.formattedHandlerIdentifier}))}}});var c=n("Wj83"),u=n.n(c),d=Shopware,p=d.Component,f=d.Mixin,m=d.Filter,h=d.Utils;p.register("wallee-order-action-completion",{template:u.a,inject:["WalleeTransactionCompletionService"],mixins:[f.getByName("notification")],props:{transactionData:{type:Object,required:!0}},data:function(){return{isLoading:!0,isCompletion:!1}},computed:{dateFilter:function(){return m.getByName("date")}},created:function(){this.createdComponent()},methods:{createdComponent:function(){this.isLoading=!1},completion:function(){var t=this;this.isCompletion&&(this.isLoading=!0,this.WalleeTransactionCompletionService.createTransactionCompletion(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id).then((function(){t.createNotificationSuccess({title:t.$tc("wallee-order.captureAction.successTitle"),message:t.$tc("wallee-order.captureAction.successMessage")}),t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(h.createId()))}))})).catch((function(e){try{t.createNotificationError({title:e.response.data.errors[0].title,message:e.response.data.errors[0].detail,autoClose:!1})}catch(n){t.createNotificationError({title:e.title,message:e.message,autoClose:!1})}finally{t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(h.createId()))}))}})))}}});var g=n("+wCd"),_=n.n(g),w=Shopware,b=w.Component,y=w.Mixin,I=w.Filter,v=w.Utils;b.register("wallee-order-action-refund",{template:_.a,inject:["WalleeRefundService"],mixins:[y.getByName("notification")],props:{transactionData:{type:Object,required:!0},orderId:{type:String,required:!0}},data:function(){return{refundQuantity:1,transactionData:{},isLoading:!0,currentLineItem:""}},computed:{dateFilter:function(){return I.getByName("date")}},created:function(){this.createdComponent()},methods:{createdComponent:function(){this.isLoading=!1},refund:function(){var t=this;this.isLoading=!0,this.WalleeRefundService.createRefund(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,this.refundQuantity,this.$parent.currentLineItem).then((function(){t.createNotificationSuccess({title:t.$tc("wallee-order.refundAction.successTitle"),message:t.$tc("wallee-order.refundAction.successMessage")}),t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(v.createId()))}))})).catch((function(e){try{t.createNotificationError({title:e.response.data.errors[0].title,message:e.response.data.errors[0].detail,autoClose:!1})}catch(n){t.createNotificationError({title:e.title,message:e.message,autoClose:!1})}finally{t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(v.createId()))}))}}))}}});var C=n("/DdT"),O=n.n(C),E=Shopware,S=E.Component,N=E.Mixin,D=E.Filter,T=E.Utils;S.register("wallee-order-action-refund-by-amount",{template:O.a,inject:["WalleeRefundService"],mixins:[N.getByName("notification")],props:{transactionData:{type:Object,required:!0},orderId:{type:String,required:!0}},data:function(){return{isLoading:!0,currency:this.transactionData.transactions[0].currency,refundAmount:0,refundableAmount:0}},computed:{dateFilter:function(){return D.getByName("date")}},created:function(){this.createdComponent()},methods:{createdComponent:function(){this.isLoading=!1,this.currency=this.transactionData.transactions[0].currency,this.refundAmount=Number(this.transactionData.transactions[0].amountIncludingTax),this.refundableAmount=Number(this.transactionData.transactions[0].amountIncludingTax)},refundByAmount:function(){var t=this;this.isLoading=!0,this.WalleeRefundService.createRefundByAmount(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,this.refundAmount).then((function(){t.createNotificationSuccess({title:t.$tc("wallee-order.refundAction.successTitle"),message:t.$tc("wallee-order.refundAction.successMessage")}),t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(T.createId()))}))})).catch((function(e){try{t.createNotificationError({title:e.response.data.errors[0].title,message:e.response.data.errors[0].detail,autoClose:!1})}catch(n){t.createNotificationError({title:e.title,message:e.message,autoClose:!1})}finally{t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(T.createId()))}))}}))}}});var A=n("iI/S"),F=n.n(A),k=Shopware,P=k.Component,x=k.Mixin,L=k.Filter,R=k.Utils;P.register("wallee-order-action-void",{template:F.a,inject:["WalleeTransactionVoidService"],mixins:[x.getByName("notification")],props:{transactionData:{type:Object,required:!0}},data:function(){return{isLoading:!0,isVoid:!1}},computed:{dateFilter:function(){return L.getByName("date")},lineItemColumns:function(){return[{property:"uniqueId",label:this.$tc("wallee-order.refund.types.uniqueId"),rawData:!1,allowResize:!0,primary:!0,width:"auto"},{property:"name",label:this.$tc("wallee-order.refund.types.name"),rawData:!0,allowResize:!0,sortable:!0,width:"auto"},{property:"quantity",label:this.$tc("wallee-order.refund.types.quantity"),rawData:!0,allowResize:!0,width:"auto"},{property:"amountIncludingTax",label:this.$tc("wallee-order.refund.types.amountIncludingTax"),rawData:!0,allowResize:!0,inlineEdit:"string",width:"auto"},{property:"type",label:this.$tc("wallee-order.refund.types.type"),rawData:!0,allowResize:!0,sortable:!0,width:"auto"},{property:"taxAmount",label:this.$tc("wallee-order.refund.types.taxAmount"),rawData:!0,allowResize:!0,width:"auto"}]}},created:function(){this.createdComponent()},methods:{createdComponent:function(){this.isLoading=!1,this.currency=this.transactionData.transactions[0].currency,this.refundableAmount=this.transactionData.transactions[0].amountIncludingTax,this.refundAmount=this.transactionData.transactions[0].amountIncludingTax},voidPayment:function(){var t=this;this.isVoid&&(this.isLoading=!0,this.WalleeTransactionVoidService.createTransactionVoid(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id).then((function(){t.createNotificationSuccess({title:t.$tc("wallee-order.voidAction.successTitle"),message:t.$tc("wallee-order.voidAction.successMessage")}),t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(R.createId()))}))})).catch((function(e){try{t.createNotificationError({title:e.response.data.errors[0].title,message:e.response.data.errors[0].detail,autoClose:!1})}catch(n){t.createNotificationError({title:e.title,message:e.message,autoClose:!1})}finally{t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(R.createId()))}))}})))}}});var $=n("YvwI"),B=n.n($),j=(n("Uzsf"),Shopware),M=j.Component,G=j.Mixin,W=j.Filter,V=j.Context,q=j.Utils,U=Shopware.Data.Criteria;M.register("wallee-order-detail",{template:B.a,inject:["WalleeTransactionService","WalleeRefundService","repositoryFactory"],mixins:[G.getByName("notification")],data:function(){return{transactionData:{transactions:[],refunds:[]},transaction:{},lineItems:[],refundableQuantity:0,isLoading:!0,orderId:"",currency:"",modalType:"",refundAmount:0,refundableAmount:0,currentLineItem:"",refundLineItem:[]}},metaInfo:function(){return{title:this.$tc("wallee-order.header")}},computed:{dateFilter:function(){return W.getByName("date")},relatedResourceColumns:function(){return[{property:"paymentConnectorConfiguration.name",label:this.$tc("wallee-order.transactionHistory.types.payment_method"),rawData:!0},{property:"state",label:this.$tc("wallee-order.transactionHistory.types.state"),rawData:!0},{property:"currency",label:this.$tc("wallee-order.transactionHistory.types.currency"),rawData:!0},{property:"authorized_amount",label:this.$tc("wallee-order.transactionHistory.types.authorized_amount"),rawData:!0},{property:"id",label:this.$tc("wallee-order.transactionHistory.types.transaction"),rawData:!0},{property:"customerId",label:this.$tc("wallee-order.transactionHistory.types.customer"),rawData:!0}]},lineItemColumns:function(){return[{property:"uniqueId",label:this.$tc("wallee-order.lineItem.types.uniqueId"),rawData:!0,visible:!1,primary:!0},{property:"name",label:this.$tc("wallee-order.lineItem.types.name"),rawData:!0},{property:"quantity",label:this.$tc("wallee-order.lineItem.types.quantity"),rawData:!0},{property:"amountIncludingTax",label:this.$tc("wallee-order.lineItem.types.amountIncludingTax"),rawData:!0},{property:"type",label:this.$tc("wallee-order.lineItem.types.type"),rawData:!0},{property:"taxAmount",label:this.$tc("wallee-order.lineItem.types.taxAmount"),rawData:!0},{property:"refundableQuantity",rawData:!0,visible:!1}]},refundColumns:function(){return[{property:"id",label:this.$tc("wallee-order.refund.types.id"),rawData:!0,visible:!0,primary:!0},{property:"amount",label:this.$tc("wallee-order.refund.types.amount"),rawData:!0},{property:"state",label:this.$tc("wallee-order.refund.types.state"),rawData:!0},{property:"createdOn",label:this.$tc("wallee-order.refund.types.createdOn"),rawData:!0}]}},watch:{$route:function(){this.resetDataAttributes(),this.createdComponent()}},created:function(){this.createdComponent()},methods:{createdComponent:function(){var t=this;this.orderId=this.$route.params.id;var e=this.repositoryFactory.create("order"),n=new U(1,1);n.addAssociation("transactions"),n.getAssociation("transactions").addSorting(U.sort("createdAt","DESC")),e.get(this.orderId,V.api,n).then((function(e){t.order=e,t.isLoading=!1;var n=0,a=0,o=e.transactions[0].customFields.wallee_transaction_id;t.WalleeTransactionService.getTransactionData(e.salesChannelId,o).then((function(e){t.currency=e.transactions[0].currency,e.transactions[0].authorized_amount=q.format.currency(e.transactions[0].authorizationAmount,t.currency),e.refunds.forEach((function(e){a=parseFloat(parseFloat(a)+parseFloat(e.amount)),e.amount=q.format.currency(e.amount,t.currency),e.reductions.forEach((function(e){void 0===t.refundLineItem[e.lineItemUniqueId]?t.refundLineItem[e.lineItemUniqueId]=e.quantityReduction:t.refundLineItem[e.lineItemUniqueId]+=e.quantityReduction}))})),e.transactions[0].lineItems.forEach((function(e){e.amountIncludingTax=q.format.currency(e.amountIncludingTax,t.currency),e.taxAmount=q.format.currency(e.taxAmount,t.currency),n=parseFloat(e.unitPriceIncludingTax*e.quantity),e.refundableQuantity=parseInt(parseInt(e.quantity)-parseInt(t.refundLineItem[e.uniqueId]||0))})),t.lineItems=e.transactions[0].lineItems,t.transactionData=e,t.transaction=t.transactionData.transactions[0],t.refundAmount=Number(t.transactionData.transactions[0].amountIncludingTax),t.refundableAmount=parseFloat(parseFloat(n)-parseFloat(a))})).catch((function(e){try{t.createNotificationError({title:t.$tc("wallee-order.paymentDetails.error.title"),message:e.message,autoClose:!1})}catch(n){t.createNotificationError({title:t.$tc("wallee-order.paymentDetails.error.title"),message:e.message,autoClose:!1})}finally{t.isLoading=!1}}))}))},downloadPackingSlip:function(){window.open(this.WalleeTransactionService.getPackingSlip(this.transaction.metaData.salesChannelId,this.transaction.id),"_blank")},downloadInvoice:function(){window.open(this.WalleeTransactionService.getInvoiceDocument(this.transaction.metaData.salesChannelId,this.transaction.id),"_blank")},resetDataAttributes:function(){this.transactionData={transactions:[],refunds:[]},this.lineItems=[],this.refundLineItem=[],this.isLoading=!0},spawnModal:function(t,e,n){this.modalType=t,this.currentLineItem=e,this.refundableQuantity=n},closeModal:function(){this.modalType=""},lineItemRefund:function(t){var e=this;this.isLoading=!0,this.WalleeRefundService.createRefund(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,0,t).then((function(){e.createNotificationSuccess({title:e.$tc("wallee-order.refundAction.successTitle"),message:e.$tc("wallee-order.refundAction.successMessage")}),e.isLoading=!1,e.$emit("modal-close"),e.$nextTick((function(){e.$router.replace("".concat(e.$route.path,"?hash=").concat(q.createId()))}))})).catch((function(t){try{e.createNotificationError({title:t.response.data.errors[0].title,message:t.response.data.errors[0].detail,autoClose:!1})}catch(n){e.createNotificationError({title:t.title,message:t.message,autoClose:!1})}finally{e.isLoading=!1,e.$emit("modal-close"),e.$nextTick((function(){e.$router.replace("".concat(e.$route.path,"?hash=").concat(q.createId()))}))}}))}}});var z=n("es2S"),H=n("sR6Z"),K=n("u4/5"),Y=n("lowj");Shopware.Module.register("wallee-order",{type:"plugin",name:"Wallee",title:"wallee-order.general.title",description:"wallee-order.general.descriptionTextModule",version:"1.0.0",targetVersion:"1.0.0",color:"#2b52ff",snippets:{"de-DE":z,"en-GB":H,"fr-FR":K,"it-IT":Y},routeMiddleware:function(t,e){"sw.order.detail"===e.name&&e.children.push({component:"wallee-order-detail",name:"wallee.order.detail",isChildren:!0,path:"/sw/order/wallee/detail/:id"}),t(e)}});n("pJF3");var Q=n("9CUS"),Z=n.n(Q),J="WalleePayment.config",X={CONFIG_DOMAIN:J,CONFIG_APPLICATION_KEY:"WalleePayment.config.applicationKey",CONFIG_EMAIL_ENABLED:"WalleePayment.config.emailEnabled",CONFIG_INTEGRATION:"WalleePayment.config.integration",CONFIG_LINE_ITEM_CONSISTENCY_ENABLED:"WalleePayment.config.lineItemConsistencyEnabled",CONFIG_SPACE_ID:"WalleePayment.config.spaceId",CONFIG_SPACE_VIEW_ID:"WalleePayment.config.spaceViewId",CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED:"WalleePayment.config.storefrontInvoiceDownloadEnabled",CONFIG_USER_ID:"WalleePayment.config.userId",CONFIG_IS_SHOWCASE:"WalleePayment.config.isShowcase",CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED:"WalleePayment.config.storefrontWebhooksUpdateEnabled",CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED:"WalleePayment.config.storefrontPaymentsUpdateEnabled"};function tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function et(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var nt=Shopware,at=nt.Component,ot=nt.Mixin;at.register("wallee-settings",{template:Z.a,inject:["WalleeConfigurationService"],mixins:[ot.getByName("notification")],data:function(){return function(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:"wallee";return Rt(this,r),o.call(this,t,e,n)}return e=r,(n=[{key:"registerWebHooks",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.getBasicHeaders(),n="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/configuration/register-web-hooks");return this.httpClient.post(n,{salesChannelId:t},{headers:e}).then((function(t){return Wt.handleResponse(t)}))}},{key:"setWalleeAsSalesChannelPaymentDefault",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.getBasicHeaders(),n="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/configuration/set-wallee-as-sales-channel-payment-default");return this.httpClient.post(n,{salesChannelId:t},{headers:e}).then((function(t){return Wt.handleResponse(t)}))}},{key:"synchronizePaymentMethodConfiguration",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.getBasicHeaders(),n="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/configuration/synchronize-payment-method-configuration");return this.httpClient.post(n,{salesChannelId:t},{headers:e}).then((function(t){return Wt.handleResponse(t)}))}},{key:"installOrderDeliveryStates",value:function(){var t=this.getBasicHeaders(),e="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/configuration/install-order-delivery-states");return this.httpClient.post(e,{},{headers:t}).then((function(t){return Wt.handleResponse(t)}))}}])&&$t(e.prototype,n),a&&$t(e,a),r}(Wt);function qt(t){return(qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ut(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zt(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"wallee";return Ut(this,r),o.call(this,t,e,n)}return e=r,(n=[{key:"createRefund",value:function(t,e,n,a){var o=this.getBasicHeaders(),r="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/refund/create-refund/");return this.httpClient.post(r,{salesChannelId:t,transactionId:e,quantity:n,lineItemId:a},{headers:o}).then((function(t){return Zt.handleResponse(t)}))}},{key:"createRefundByAmount",value:function(t,e,n){var a=this.getBasicHeaders(),o="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/refund/create-refund-by-amount/");return this.httpClient.post(o,{salesChannelId:t,transactionId:e,refundableAmount:n},{headers:a}).then((function(t){return Zt.handleResponse(t)}))}}])&&zt(e.prototype,n),a&&zt(e,a),r}(Zt);function Xt(t){return(Xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function te(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ee(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"wallee";return te(this,r),o.call(this,t,e,n)}return e=r,(n=[{key:"getTransactionData",value:function(t,e){var n=this.getBasicHeaders(),a="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction/get-transaction-data/");return this.httpClient.post(a,{salesChannelId:t,transactionId:e},{headers:n}).then((function(t){return ie.handleResponse(t)}))}},{key:"getInvoiceDocument",value:function(t,e){return"".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction/get-invoice-document/").concat(t,"/").concat(e)}},{key:"getPackingSlip",value:function(t,e){return"".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction/get-packing-slip/").concat(t,"/").concat(e)}}])&&ee(e.prototype,n),a&&ee(e,a),r}(ie);function se(t){return(se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ce(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ue(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"wallee";return ce(this,r),o.call(this,t,e,n)}return e=r,(n=[{key:"createTransactionCompletion",value:function(t,e){var n=this.getBasicHeaders(),a="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction-completion/create-transaction-completion/");return this.httpClient.post(a,{salesChannelId:t,transactionId:e},{headers:n}).then((function(t){return he.handleResponse(t)}))}}])&&ue(e.prototype,n),a&&ue(e,a),r}(he);function _e(t){return(_e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function we(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function be(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"wallee";return we(this,r),o.call(this,t,e,n)}return e=r,(n=[{key:"createTransactionVoid",value:function(t,e){var n=this.getBasicHeaders(),a="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction-void/create-transaction-void/");return this.httpClient.post(a,{salesChannelId:t,transactionId:e},{headers:n}).then((function(t){return Oe.handleResponse(t)}))}}])&&be(e.prototype,n),a&&be(e,a),r}(Oe),Se=Shopware.Application;Se.addServiceProvider("WalleeConfigurationService",(function(t){var e=Se.getContainer("init");return new Vt(e.httpClient,t.loginService)})),Se.addServiceProvider("WalleeRefundService",(function(t){var e=Se.getContainer("init");return new Jt(e.httpClient,t.loginService)})),Se.addServiceProvider("WalleeTransactionService",(function(t){var e=Se.getContainer("init");return new le(e.httpClient,t.loginService)})),Se.addServiceProvider("WalleeTransactionCompletionService",(function(t){var e=Se.getContainer("init");return new ge(e.httpClient,t.loginService)})),Se.addServiceProvider("WalleeTransactionVoidService",(function(t){var e=Se.getContainer("init");return new Ee(e.httpClient,t.loginService)}))},OAGG:function(t,e,n){},SZ7m:function(t,e,n){"use strict";function a(t,e){for(var n=[],a={},o=0;on.parts.length&&(a.parts.length=n.parts.length)}else{var i=[];for(o=0;o\n\t{{ $tc(\'wallee-order.header\') }}\n\n{% endblock %}\n\n{% block sw_order_detail_actions_slot_smart_bar_actions %}\n\n{% endblock %}\n'},Uzsf:function(t,e,n){var a=n("CFNN");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);(0,n("SZ7m").default)("2a06b658",a,!0,{})},Wj83:function(t,e){t.exports='{% block wallee_order_action_completion %}\n\n\n\t{% block wallee_order_action_completion_amount %}\n\t\t\n\t{% endblock %}\n\n\t{% block wallee_order_action_completion_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n'},"Yq/t":function(t,e){t.exports='\n\t\n\t\t
    \n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
    \n\t
    \n
    \n\n'},YvwI:function(t,e){t.exports='{% block wallee_order_detail %}\n
    \n\t
    \n\t\t\n\t\t\t\n\t\t\n\t\t{% block wallee_order_transaction_history_card %}\n\t\t\n\t\t\t\n\n\t\t\n\t\t{% endblock %}\n\t\t{% block wallee_order_transaction_line_items_card %}\n\t\t\n\t\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block wallee_order_transaction_refunds_card %}\n\t\t\n\t\t\t\n\n\t\t\n\t\t{% endblock %}\n\t\t{% block wallee_order_actions_modal_refund %}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block wallee_order_actions_modal_refund_by_amount %}\n\t\t\t\n\t\t\t\n\t\t{% endblock %}\n\t\t{% block wallee_order_actions_modal_completion%}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block wallee_order_actions_modal_void %}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t
    \n\t\n
    \n{% endblock %}\n'},ZTd1:function(t,e){t.exports='{% block wallee_settings_content_card_channel_config_options %}\n\t\n\n\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container %}\n\t\t\t\n\n\t\t\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container_settings %}\n\t\t\t\t\t
    \n\n\t\t\t\t\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container_settings_space_view_id %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container_settings_integration %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container_settings_line_item_consistency_enabled %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container_settings_email_enabled %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\t\t\t\t\t
    \n\t\t\t\t{% endblock %}\n\t\t\t
    \n\t\t{% endblock %}\n\t
    \n\n{% endblock %}\n'},es2S:function(t){t.exports=JSON.parse('{"wallee-order":{"buttons":{"label":{"completion":"Abschluss","download-invoice":"Rechnung herunterladen","download-packing-slip":"Packzettel herunterladen","refund":"Eine neue Rückerstattung erstellen","void":"Genehmigung annullieren","refund-whole-line-item":"Gesamte Werbebuchung erstatten","refund-line-item-by-quantity":"Rückerstattung nach Menge"}},"captureAction":{"button":{"text":"Zahlung erfassen"},"currentAmount":"Betrag","isFinal":"Dies ist die endgültige Verbuchung","maxAmount":"Maximaler Betrag","successMessage":"Ihre Verbuchung war erfolgreich","successTitle":"Erfolg"},"general":{"title":"Bestellungen"},"header":"Wallee Payment","lineItem":{"cardTitle":"Einzelposten","types":{"amountIncludingTax":"Betrag","name":"Name","quantity":"Anzahl","taxAmount":"Steuern","type":"Typ","uniqueId":"Eindeutige ID"}},"modal":{"title":{"capture":"Erfassen","refund":"Neue Gutschrift","void":"Autorisierung aufheben"}},"paymentDetails":{"cardTitle":"Zahlung","error":{"title":"Fehler beim Abrufen von Zahlungsdetails von Wallee"}},"refund":{"cardTitle":"Gutschriften","refundAmount":{"label":"Gutschriftsbetrag"},"refundQuantity":{"label":"Refund Menge"},"types":{"amount":"Betrag","createdOn":"Erstellt am","id":"ID","state":"Staat"}},"refundAction":{"confirmButton":{"text":"Ausführen"},"refundAmount":{"label":"Betrag","placeholder":"Einen Betrag eingeben"},"successMessage":"Ihre Rückerstattung war erfolgreich","successTitle":"Erfolg","maxAvailableItemsToRefund":"Maximal Verfügbare Artikel zum Erstatten"},"transactionHistory":{"cardTitle":"Einzelheiten","types":{"authorized_amount":"Autorisierter Betrag","currency":"Währung","customer":"Kunde","payment_method":"Zahlungsweise","state":"Staat","transaction":"Transaktion"}},"voidAction":{"confirm":{"button":{"cancel":"Nein","confirm":"Autorisierung aufheben"},"message":"Wollen Sie diese Zahlung wirklich stornieren?"},"successMessage":"Die Zahlung wurde erfolgreich annulliert","successTitle":"Erfolg"}}}')},"iI/S":function(t,e){t.exports='{% block wallee_order_action_void %}\n\n\n\t{% block wallee_order_action_void_amount %}\n\t\t\n\t{% endblock %}\n\n\t{% block wallee_order_action_void_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n'},lowj:function(t){t.exports=JSON.parse('{"wallee-order":{"buttons":{"label":{"completion":"Completato","download-invoice":"Scarica fattura","download-packing-slip":"Scarica distinta di imballaggio","refund":"Crea un nuovo rimborso","void":"Annulla autorizzazione","refund-whole-line-item":"Rimborso intera riga","refund-line-item-by-quantity":"Rimborso per quantità"}},"captureAction":{"button":{"text":"Cattura pagamento"},"currentAmount":"Importo","isFinal":"Questa è la cattura finale","maxAmount":"Importo massimo","successMessage":"La tua cattura ha avuto successo.","successTitle":"Successo"},"general":{"title":"Ordini"},"header":"Pagamento Wallee","lineItem":{"cardTitle":"Articoli di linea","types":{"amountIncludingTax":"Importo","name":"Nome","quantity":"Quantità","taxAmount":"Tasse","type":"Tipo","uniqueId":"ID unico"}},"modal":{"title":{"capture":"Cattura","refund":"Nuovo rimborso","void":"Annulla autorizzazione"}},"paymentDetails":{"cardTitle":"Pagamento","error":{"title":"Errore nel recupero dei dettagli del pagamento da Wallee"}},"refund":{"cardTitle":"Rimborsi","refundAmount":{"label":"Importo del rimborso"},"refundQuantity":{"label":"Quantità di rimborso"},"types":{"amount":"Importo","createdOn":"Creato il","id":"ID","state":"Stato"}},"refundAction":{"confirmButton":{"text":"Esegui"},"refundAmount":{"label":"Importo","placeholder":"Inserisci un importo"},"successMessage":"Il tuo rimborso è andato a buon fine.","successTitle":"Successo","maxAvailableItemsToRefund":"Numero massimo di articoli disponibili da rimborsare"},"transactionHistory":{"cardTitle":"Dettagli","types":{"authorized_amount":"Importo autorizzato","currency":"Valuta","customer":"Cliente","payment_method":"Metodo di pagamento","state":"Stato","transaction":"Transazione"}},"voidAction":{"confirm":{"button":{"cancel":"No","confirm":"Annulla autorizzazione"},"message":"Vuoi davvero annullare questo pagamento?"},"successMessage":"Il pagamento è stato annullato con successo.","successTitle":"Successo"}}}')},pJF3:function(t,e){Shopware.Service("privileges").addPrivilegeMappingEntry({category:"permissions",parent:"wallee",key:"wallee",roles:{viewer:{privileges:["sales_channel:read","sales_channel_payment_method:read","system_config:read"],dependencies:[]},editor:{privileges:["sales_channel:update","sales_channel_payment_method:create","sales_channel_payment_method:update","system_config:update","system_config:create","system_config:delete"],dependencies:["wallee.viewer"]}}}),Shopware.Service("privileges").addPrivilegeMappingEntry({category:"permissions",parent:null,key:"sales_channel",roles:{viewer:{privileges:["sales_channel_payment_method:read"]},editor:{privileges:["payment_method:update"]},creator:{privileges:["payment_method:create","shipping_method:create","delivery_time:create"]},deleter:{privileges:["payment_method:delete"]}}})},sR6Z:function(t){t.exports=JSON.parse('{"wallee-order":{"buttons":{"label":{"completion":"Complete","download-invoice":"Download Invoice","download-packing-slip":"Download Packing Slip","refund":"Create a new refund","void":"Cancel authorization","refund-whole-line-item":"Refund whole line item","refund-line-item-by-quantity":"Refund by quantity"}},"captureAction":{"button":{"text":"Capture payment"},"currentAmount":"Amount","isFinal":"This is final capture","maxAmount":"Maximum amount","successMessage":"Your capture was successful.","successTitle":"Success"},"general":{"title":"Orders"},"header":"Wallee Payment","lineItem":{"cardTitle":"Line Items","types":{"amountIncludingTax":"Amount","name":"Name","quantity":"Quantity","taxAmount":"Taxes","type":"Type","uniqueId":"Unique ID"}},"modal":{"title":{"capture":"Capture","refund":"New refund","void":"Cancel authorization"}},"paymentDetails":{"cardTitle":"Payment","error":{"title":"Error fetching payment details from Wallee"}},"refund":{"cardTitle":"Refunds","refundAmount":{"label":"Refund Amount"},"refundQuantity":{"label":"Refund Quantity"},"types":{"amount":"Amount","createdOn":"Created On","id":"ID","state":"State"}},"refundAction":{"confirmButton":{"text":"Execute"},"refundAmount":{"label":"Amount","placeholder":"Enter a amount"},"successMessage":"Your refund was successful.","successTitle":"Success","maxAvailableItemsToRefund":"Maximum available items to refund"},"transactionHistory":{"cardTitle":"Details","types":{"authorized_amount":"Authorized Amount","currency":"Currency","customer":"Customer","payment_method":"Payment Method","state":"State","transaction":"Transaction"}},"voidAction":{"confirm":{"button":{"cancel":"No","confirm":"Cancel authorization"},"message":"Do you really want to cancel this payment?"},"successMessage":"The payment was successfully voided.","successTitle":"Success"}}}')},"u4/5":function(t){t.exports=JSON.parse('{"wallee-order":{"buttons":{"label":{"completion":"Terminée","download-invoice":"Télécharger la facture","download-packing-slip":"Télécharger le bordereau d\'expédition","refund":"Créer un nouveau remboursement","void":"Annulez l\'autorisation","refund-whole-line-item":"Remboursement de la ligne entière","refund-line-item-by-quantity":"Remboursement par quantité"}},"captureAction":{"button":{"text":"Capture du paiement"},"currentAmount":"Montant","isFinal":"C\'est la capture finale","maxAmount":"Montant maximal","successMessage":"Votre capture a été réussie.","successTitle":"Succès"},"general":{"title":"Commandes"},"header":"Wallee Paiement","lineItem":{"cardTitle":"Articles de ligne","types":{"amountIncludingTax":"Montant","name":"Nom","quantity":"Quantité","taxAmount":"Taxes","type":"Type","uniqueId":"ID unique"}},"modal":{"title":{"capture":"Capture","refund":"Nouveau remboursement","void":"Annulez l\'autorisation"}},"paymentDetails":{"cardTitle":"Paiement","error":{"title":"Erreur dans la récupération des détails du paiement à partir de Wallee"}},"refund":{"cardTitle":"Remboursements","refundAmount":{"label":"Montant du remboursement"},"refundQuantity":{"label":"Quantité à rembourser"},"types":{"amount":"Montant","createdOn":"Créé le","id":"ID","state":"État"}},"refundAction":{"confirmButton":{"text":"Exécutez"},"refundAmount":{"label":"Montant","placeholder":"Entrez un montant"},"successMessage":"Votre remboursement a été effectué avec succès.","successTitle":"Succès","maxAvailableItemsToRefund":"Nombre maximum d\'articles disponibles pour le remboursement"},"transactionHistory":{"cardTitle":"Détails","types":{"authorized_amount":"Montant autorisé","currency":"Monnaie","customer":"Client","payment_method":"Mode de paiement","state":"État","transaction":"Transaction"}},"voidAction":{"confirm":{"button":{"cancel":"Non","confirm":"Annulez l\'autorisation"},"message":"Voulez-vous vraiment annuler ce paiement?"},"successMessage":"Le paiement a été annulé avec succès.","successTitle":"Succès"}}}')},z7gL:function(t,e,n){var a=n("OAGG");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);(0,n("SZ7m").default)("3ec54862",a,!0,{})}}); \ No newline at end of file +!function(t){var e={};function n(a){if(e[a])return e[a].exports;var o=e[a]={i:a,l:!1,exports:{}};return t[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,a){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(a,o,function(e){return t[e]}.bind(null,o));return a},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/bundles/administration/",n(n.s="LLfH")}({"+wCd":function(t,e){t.exports='{% block wallee_order_action_refund %}\n\n\n\t{% block wallee_order_action_refund_amount %}\n\n\t\t\n\t\t\n\n\t\t
    \n\t\t\t{{ $tc(\'wallee-order.refundAction.maxAvailableItemsToRefund\') }}:\n\t\t\t{{ this.$parent.refundableQuantity }}\n\t\t
    \n\t{% endblock %}\n\n\t{% block wallee_order_action_refund_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n
    \n{% endblock %}\n'},"//CG":function(t,e){t.exports='\n\t\n\t\t
    \n\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
    \n\t
    \n
    \n\n'},"/DdT":function(t,e){t.exports='{% block wallee_order_action_refund_by_amount %}\n\n\n\t{% block wallee_order_action_refund_amount_by_amount %}\n\t\t\n\t\t\n\t{% endblock %}\n\n\t{% block wallee_order_action_refund_confirm_button_by_amount %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n'},"9CUS":function(t,e){t.exports='{% block wallee_settings %}\n\n\n\t{% block wallee_settings_header %}\n\t\n\t{% endblock %}\n\n\t{% block wallee_settings_actions %}\n\t\n\t{% endblock %}\n\n\t{% block wallee_settings_content %}\n\t\n\t{% endblock %}\n\n{% endblock %}'},CFNN:function(t,e,n){},CUwX:function(t,e){t.exports='{% block wallee_settings_icon %}\n \n \n\n\n\n\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\n\n\n\n\n\n \n{% endblock %}\n'},IZ6r:function(t,e){t.exports='{% block wallee_settings_content_card_channel_config_credentials %}\n\t\n\n\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container %}\n\t\t\t\n\n\t\t\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container_settings %}\n\t\t\t\t\t
    \n\n\t\t\t\t\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container_settings_space_id %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container_settings_user_id %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container_settings_application_key %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\t\t\t\t\t
    \n\t\t\t\t{% endblock %}\n\t\t\t
    \n\t\t{% endblock %}\n\t\n\n{% endblock %}\n'},LLfH:function(t,e,n){"use strict";n.r(e);var a=n("Uo3x"),o=n.n(a),r=(n("z7gL"),Shopware),i=r.Component,l=r.Context,s=Shopware.Data.Criteria;i.override("sw-order-detail",{template:o.a,data:function(){return{isWalleePayment:!1}},computed:{isEditable:function(){return!this.isWalleePayment||"wallee.order.detail"!==this.$route.name},showTabs:function(){return!0}},watch:{orderId:{deep:!0,handler:function(){var t=this;if(this.orderId){var e=this.repositoryFactory.create("order"),n=new s(1,1);n.addAssociation("transactions"),e.get(this.orderId,l.api,n).then((function(e){if(e.amountTotal<=0||e.transactions.length<=0||!e.transactions[0].paymentMethodId)t.setIsWalleePayment(null);else{var n=e.transactions[0].paymentMethodId;null!=n&&t.setIsWalleePayment(n)}}))}else this.setIsWalleePayment(null)},immediate:!0}},methods:{setIsWalleePayment:function(t){var e=this;t&&this.repositoryFactory.create("payment_method").get(t,l.api).then((function(t){e.isWalleePayment="handler_walleepayment_walleepaymenthandler"===t.formattedHandlerIdentifier}))}}});var c=n("Wj83"),u=n.n(c),d=Shopware,p=d.Component,f=d.Mixin,m=d.Filter,h=d.Utils;p.register("wallee-order-action-completion",{template:u.a,inject:["WalleeTransactionCompletionService"],mixins:[f.getByName("notification")],props:{transactionData:{type:Object,required:!0}},data:function(){return{isLoading:!0,isCompletion:!1}},computed:{dateFilter:function(){return m.getByName("date")}},created:function(){this.createdComponent()},methods:{createdComponent:function(){this.isLoading=!1},completion:function(){var t=this;this.isCompletion&&(this.isLoading=!0,this.WalleeTransactionCompletionService.createTransactionCompletion(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id).then((function(){t.createNotificationSuccess({title:t.$tc("wallee-order.captureAction.successTitle"),message:t.$tc("wallee-order.captureAction.successMessage")}),t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(h.createId()))}))})).catch((function(e){try{t.createNotificationError({title:e.response.data.errors[0].title,message:e.response.data.errors[0].detail,autoClose:!1})}catch(n){t.createNotificationError({title:e.title,message:e.message,autoClose:!1})}finally{t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(h.createId()))}))}})))}}});var g=n("+wCd"),_=n.n(g),w=Shopware,b=w.Component,y=w.Mixin,I=w.Filter,v=w.Utils;b.register("wallee-order-action-refund",{template:_.a,inject:["WalleeRefundService"],mixins:[y.getByName("notification")],props:{transactionData:{type:Object,required:!0},orderId:{type:String,required:!0}},data:function(){return{refundQuantity:1,transactionData:{},isLoading:!0,currentLineItem:""}},computed:{dateFilter:function(){return I.getByName("date")}},created:function(){this.createdComponent()},methods:{createdComponent:function(){this.isLoading=!1},refund:function(){var t=this;this.isLoading=!0,this.WalleeRefundService.createRefund(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,this.refundQuantity,this.$parent.currentLineItem).then((function(){t.createNotificationSuccess({title:t.$tc("wallee-order.refundAction.successTitle"),message:t.$tc("wallee-order.refundAction.successMessage")}),t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(v.createId()))}))})).catch((function(e){try{t.createNotificationError({title:e.response.data.errors[0].title,message:e.response.data.errors[0].detail,autoClose:!1})}catch(n){t.createNotificationError({title:e.title,message:e.message,autoClose:!1})}finally{t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(v.createId()))}))}}))}}});var C=n("/DdT"),O=n.n(C),E=Shopware,S=E.Component,N=E.Mixin,D=E.Filter,T=E.Utils;S.register("wallee-order-action-refund-by-amount",{template:O.a,inject:["WalleeRefundService"],mixins:[N.getByName("notification")],props:{transactionData:{type:Object,required:!0},orderId:{type:String,required:!0}},data:function(){return{isLoading:!0,currency:this.transactionData.transactions[0].currency,refundAmount:0,refundableAmount:0}},computed:{dateFilter:function(){return D.getByName("date")}},created:function(){this.createdComponent()},methods:{createdComponent:function(){this.isLoading=!1,this.currency=this.transactionData.transactions[0].currency,this.refundAmount=Number(this.transactionData.transactions[0].amountIncludingTax),this.refundableAmount=Number(this.transactionData.transactions[0].amountIncludingTax)},refundByAmount:function(){var t=this;this.isLoading=!0,this.WalleeRefundService.createRefundByAmount(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,this.refundAmount).then((function(){t.createNotificationSuccess({title:t.$tc("wallee-order.refundAction.successTitle"),message:t.$tc("wallee-order.refundAction.successMessage")}),t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(T.createId()))}))})).catch((function(e){try{t.createNotificationError({title:e.response.data.errors[0].title,message:e.response.data.errors[0].detail,autoClose:!1})}catch(n){t.createNotificationError({title:e.title,message:e.message,autoClose:!1})}finally{t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(T.createId()))}))}}))}}});var A=n("iI/S"),F=n.n(A),k=Shopware,P=k.Component,x=k.Mixin,L=k.Filter,R=k.Utils;P.register("wallee-order-action-void",{template:F.a,inject:["WalleeTransactionVoidService"],mixins:[x.getByName("notification")],props:{transactionData:{type:Object,required:!0}},data:function(){return{isLoading:!0,isVoid:!1}},computed:{dateFilter:function(){return L.getByName("date")},lineItemColumns:function(){return[{property:"uniqueId",label:this.$tc("wallee-order.refund.types.uniqueId"),rawData:!1,allowResize:!0,primary:!0,width:"auto"},{property:"name",label:this.$tc("wallee-order.refund.types.name"),rawData:!0,allowResize:!0,sortable:!0,width:"auto"},{property:"quantity",label:this.$tc("wallee-order.refund.types.quantity"),rawData:!0,allowResize:!0,width:"auto"},{property:"amountIncludingTax",label:this.$tc("wallee-order.refund.types.amountIncludingTax"),rawData:!0,allowResize:!0,inlineEdit:"string",width:"auto"},{property:"type",label:this.$tc("wallee-order.refund.types.type"),rawData:!0,allowResize:!0,sortable:!0,width:"auto"},{property:"taxAmount",label:this.$tc("wallee-order.refund.types.taxAmount"),rawData:!0,allowResize:!0,width:"auto"}]}},created:function(){this.createdComponent()},methods:{createdComponent:function(){this.isLoading=!1,this.currency=this.transactionData.transactions[0].currency,this.refundableAmount=this.transactionData.transactions[0].amountIncludingTax,this.refundAmount=this.transactionData.transactions[0].amountIncludingTax},voidPayment:function(){var t=this;this.isVoid&&(this.isLoading=!0,this.WalleeTransactionVoidService.createTransactionVoid(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id).then((function(){t.createNotificationSuccess({title:t.$tc("wallee-order.voidAction.successTitle"),message:t.$tc("wallee-order.voidAction.successMessage")}),t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(R.createId()))}))})).catch((function(e){try{t.createNotificationError({title:e.response.data.errors[0].title,message:e.response.data.errors[0].detail,autoClose:!1})}catch(n){t.createNotificationError({title:e.title,message:e.message,autoClose:!1})}finally{t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(R.createId()))}))}})))}}});var $=n("YvwI"),B=n.n($),j=(n("Uzsf"),Shopware),M=j.Component,G=j.Mixin,W=j.Filter,V=j.Context,q=j.Utils,U=Shopware.Data.Criteria;M.register("wallee-order-detail",{template:B.a,inject:["WalleeTransactionService","WalleeRefundService","repositoryFactory"],mixins:[G.getByName("notification")],data:function(){return{transactionData:{transactions:[],refunds:[]},transaction:{},lineItems:[],refundableQuantity:0,isLoading:!0,orderId:"",currency:"",modalType:"",refundAmount:0,refundableAmount:0,currentLineItem:"",refundLineItem:[]}},metaInfo:function(){return{title:this.$tc("wallee-order.header")}},computed:{dateFilter:function(){return W.getByName("date")},relatedResourceColumns:function(){return[{property:"paymentConnectorConfiguration.name",label:this.$tc("wallee-order.transactionHistory.types.payment_method"),rawData:!0},{property:"state",label:this.$tc("wallee-order.transactionHistory.types.state"),rawData:!0},{property:"currency",label:this.$tc("wallee-order.transactionHistory.types.currency"),rawData:!0},{property:"authorized_amount",label:this.$tc("wallee-order.transactionHistory.types.authorized_amount"),rawData:!0},{property:"id",label:this.$tc("wallee-order.transactionHistory.types.transaction"),rawData:!0},{property:"customerId",label:this.$tc("wallee-order.transactionHistory.types.customer"),rawData:!0}]},lineItemColumns:function(){return[{property:"uniqueId",label:this.$tc("wallee-order.lineItem.types.uniqueId"),rawData:!0,visible:!1,primary:!0},{property:"name",label:this.$tc("wallee-order.lineItem.types.name"),rawData:!0},{property:"quantity",label:this.$tc("wallee-order.lineItem.types.quantity"),rawData:!0},{property:"amountIncludingTax",label:this.$tc("wallee-order.lineItem.types.amountIncludingTax"),rawData:!0},{property:"type",label:this.$tc("wallee-order.lineItem.types.type"),rawData:!0},{property:"taxAmount",label:this.$tc("wallee-order.lineItem.types.taxAmount"),rawData:!0},{property:"refundableQuantity",rawData:!0,visible:!1}]},refundColumns:function(){return[{property:"id",label:this.$tc("wallee-order.refund.types.id"),rawData:!0,visible:!0,primary:!0},{property:"amount",label:this.$tc("wallee-order.refund.types.amount"),rawData:!0},{property:"state",label:this.$tc("wallee-order.refund.types.state"),rawData:!0},{property:"createdOn",label:this.$tc("wallee-order.refund.types.createdOn"),rawData:!0}]}},watch:{$route:function(){this.resetDataAttributes(),this.createdComponent()}},created:function(){this.createdComponent()},methods:{createdComponent:function(){var t=this;this.orderId=this.$route.params.id;var e=this.repositoryFactory.create("order"),n=new U(1,1);n.addAssociation("transactions"),n.getAssociation("transactions").addSorting(U.sort("createdAt","DESC")),e.get(this.orderId,V.api,n).then((function(e){t.order=e,t.isLoading=!1;var n=0,a=0,o=e.transactions[0].customFields.wallee_transaction_id;t.WalleeTransactionService.getTransactionData(e.salesChannelId,o).then((function(e){t.currency=e.transactions[0].currency,e.transactions[0].authorized_amount=q.format.currency(e.transactions[0].authorizationAmount,t.currency),e.refunds.forEach((function(e){a=parseFloat(parseFloat(a)+parseFloat(e.amount)),e.amount=q.format.currency(e.amount,t.currency),e.reductions.forEach((function(e){void 0===t.refundLineItem[e.lineItemUniqueId]?t.refundLineItem[e.lineItemUniqueId]=e.quantityReduction:t.refundLineItem[e.lineItemUniqueId]+=e.quantityReduction}))})),e.transactions[0].lineItems.forEach((function(e){e.amountIncludingTax=q.format.currency(e.amountIncludingTax,t.currency),e.taxAmount=q.format.currency(e.taxAmount,t.currency),n=parseFloat(e.unitPriceIncludingTax*e.quantity),e.refundableQuantity=parseInt(parseInt(e.quantity)-parseInt(t.refundLineItem[e.uniqueId]||0))})),t.lineItems=e.transactions[0].lineItems,t.transactionData=e,t.transaction=t.transactionData.transactions[0],t.refundAmount=Number(t.transactionData.transactions[0].amountIncludingTax),t.refundableAmount=parseFloat(parseFloat(n)-parseFloat(a))})).catch((function(e){try{t.createNotificationError({title:t.$tc("wallee-order.paymentDetails.error.title"),message:e.message,autoClose:!1})}catch(n){t.createNotificationError({title:t.$tc("wallee-order.paymentDetails.error.title"),message:e.message,autoClose:!1})}finally{t.isLoading=!1}}))}))},downloadPackingSlip:function(){window.open(this.WalleeTransactionService.getPackingSlip(this.transaction.metaData.salesChannelId,this.transaction.id),"_blank")},downloadInvoice:function(){window.open(this.WalleeTransactionService.getInvoiceDocument(this.transaction.metaData.salesChannelId,this.transaction.id),"_blank")},resetDataAttributes:function(){this.transactionData={transactions:[],refunds:[]},this.lineItems=[],this.refundLineItem=[],this.isLoading=!0},spawnModal:function(t,e,n){this.modalType=t,this.currentLineItem=e,this.refundableQuantity=n},closeModal:function(){this.modalType=""},lineItemRefund:function(t){var e=this;this.isLoading=!0,this.WalleeRefundService.createRefund(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,0,t).then((function(){e.createNotificationSuccess({title:e.$tc("wallee-order.refundAction.successTitle"),message:e.$tc("wallee-order.refundAction.successMessage")}),e.isLoading=!1,e.$emit("modal-close"),e.$nextTick((function(){e.$router.replace("".concat(e.$route.path,"?hash=").concat(q.createId()))}))})).catch((function(t){try{e.createNotificationError({title:t.response.data.errors[0].title,message:t.response.data.errors[0].detail,autoClose:!1})}catch(n){e.createNotificationError({title:t.title,message:t.message,autoClose:!1})}finally{e.isLoading=!1,e.$emit("modal-close"),e.$nextTick((function(){e.$router.replace("".concat(e.$route.path,"?hash=").concat(q.createId()))}))}}))}}});var z=n("es2S"),H=n("sR6Z"),K=n("u4/5"),Y=n("lowj");Shopware.Module.register("wallee-order",{type:"plugin",name:"Wallee",title:"wallee-order.general.title",description:"wallee-order.general.descriptionTextModule",version:"1.0.0",targetVersion:"1.0.0",color:"#2b52ff",snippets:{"de-DE":z,"en-GB":H,"fr-FR":K,"it-IT":Y},routeMiddleware:function(t,e){"sw.order.detail"===e.name&&e.children.push({component:"wallee-order-detail",name:"wallee.order.detail",isChildren:!0,path:"/sw/order/wallee/detail/:id"}),t(e)}});n("pJF3");var Q=n("9CUS"),Z=n.n(Q),J="WalleePayment.config",X={CONFIG_DOMAIN:J,CONFIG_APPLICATION_KEY:"WalleePayment.config.applicationKey",CONFIG_EMAIL_ENABLED:"WalleePayment.config.emailEnabled",CONFIG_INTEGRATION:"WalleePayment.config.integration",CONFIG_LINE_ITEM_CONSISTENCY_ENABLED:"WalleePayment.config.lineItemConsistencyEnabled",CONFIG_SPACE_ID:"WalleePayment.config.spaceId",CONFIG_SPACE_VIEW_ID:"WalleePayment.config.spaceViewId",CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED:"WalleePayment.config.storefrontInvoiceDownloadEnabled",CONFIG_USER_ID:"WalleePayment.config.userId",CONFIG_IS_SHOWCASE:"WalleePayment.config.isShowcase",CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED:"WalleePayment.config.storefrontWebhooksUpdateEnabled",CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED:"WalleePayment.config.storefrontPaymentsUpdateEnabled"};function tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function et(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var nt=Shopware,at=nt.Component,ot=nt.Mixin;at.register("wallee-settings",{template:Z.a,inject:["WalleeConfigurationService"],mixins:[ot.getByName("notification")],data:function(){return function(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:"wallee";return Rt(this,r),o.call(this,t,e,n)}return e=r,(n=[{key:"registerWebHooks",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.getBasicHeaders(),n="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/configuration/register-web-hooks");return this.httpClient.post(n,{salesChannelId:t},{headers:e}).then((function(t){return Wt.handleResponse(t)}))}},{key:"setWalleeAsSalesChannelPaymentDefault",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.getBasicHeaders(),n="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/configuration/set-wallee-as-sales-channel-payment-default");return this.httpClient.post(n,{salesChannelId:t},{headers:e}).then((function(t){return Wt.handleResponse(t)}))}},{key:"synchronizePaymentMethodConfiguration",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.getBasicHeaders(),n="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/configuration/synchronize-payment-method-configuration");return this.httpClient.post(n,{salesChannelId:t},{headers:e}).then((function(t){return Wt.handleResponse(t)}))}},{key:"installOrderDeliveryStates",value:function(){var t=this.getBasicHeaders(),e="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/configuration/install-order-delivery-states");return this.httpClient.post(e,{},{headers:t}).then((function(t){return Wt.handleResponse(t)}))}}])&&$t(e.prototype,n),a&&$t(e,a),r}(Wt);function qt(t){return(qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ut(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zt(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"wallee";return Ut(this,r),o.call(this,t,e,n)}return e=r,(n=[{key:"createRefund",value:function(t,e,n,a){var o=this.getBasicHeaders(),r="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/refund/create-refund/");return this.httpClient.post(r,{salesChannelId:t,transactionId:e,quantity:n,lineItemId:a},{headers:o}).then((function(t){return Zt.handleResponse(t)}))}},{key:"createRefundByAmount",value:function(t,e,n){var a=this.getBasicHeaders(),o="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/refund/create-refund-by-amount/");return this.httpClient.post(o,{salesChannelId:t,transactionId:e,refundableAmount:n},{headers:a}).then((function(t){return Zt.handleResponse(t)}))}}])&&zt(e.prototype,n),a&&zt(e,a),r}(Zt);function Xt(t){return(Xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function te(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ee(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"wallee";return te(this,r),o.call(this,t,e,n)}return e=r,(n=[{key:"getTransactionData",value:function(t,e){var n=this.getBasicHeaders(),a="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction/get-transaction-data/");return this.httpClient.post(a,{salesChannelId:t,transactionId:e},{headers:n}).then((function(t){return ie.handleResponse(t)}))}},{key:"getInvoiceDocument",value:function(t,e){return"".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction/get-invoice-document/").concat(t,"/").concat(e)}},{key:"getPackingSlip",value:function(t,e){return"".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction/get-packing-slip/").concat(t,"/").concat(e)}}])&&ee(e.prototype,n),a&&ee(e,a),r}(ie);function se(t){return(se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ce(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ue(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"wallee";return ce(this,r),o.call(this,t,e,n)}return e=r,(n=[{key:"createTransactionCompletion",value:function(t,e){var n=this.getBasicHeaders(),a="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction-completion/create-transaction-completion/");return this.httpClient.post(a,{salesChannelId:t,transactionId:e},{headers:n}).then((function(t){return he.handleResponse(t)}))}}])&&ue(e.prototype,n),a&&ue(e,a),r}(he);function _e(t){return(_e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function we(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function be(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"wallee";return we(this,r),o.call(this,t,e,n)}return e=r,(n=[{key:"createTransactionVoid",value:function(t,e){var n=this.getBasicHeaders(),a="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction-void/create-transaction-void/");return this.httpClient.post(a,{salesChannelId:t,transactionId:e},{headers:n}).then((function(t){return Oe.handleResponse(t)}))}}])&&be(e.prototype,n),a&&be(e,a),r}(Oe),Se=Shopware.Application;Se.addServiceProvider("WalleeConfigurationService",(function(t){var e=Se.getContainer("init");return new Vt(e.httpClient,t.loginService)})),Se.addServiceProvider("WalleeRefundService",(function(t){var e=Se.getContainer("init");return new Jt(e.httpClient,t.loginService)})),Se.addServiceProvider("WalleeTransactionService",(function(t){var e=Se.getContainer("init");return new le(e.httpClient,t.loginService)})),Se.addServiceProvider("WalleeTransactionCompletionService",(function(t){var e=Se.getContainer("init");return new ge(e.httpClient,t.loginService)})),Se.addServiceProvider("WalleeTransactionVoidService",(function(t){var e=Se.getContainer("init");return new Ee(e.httpClient,t.loginService)}))},OAGG:function(t,e,n){},SZ7m:function(t,e,n){"use strict";function a(t,e){for(var n=[],a={},o=0;on.parts.length&&(a.parts.length=n.parts.length)}else{var i=[];for(o=0;o\n\t{{ $tc(\'wallee-order.header\') }}\n\n{% endblock %}\n\n{% block sw_order_detail_actions_slot_smart_bar_actions %}\n\n{% endblock %}\n'},Uzsf:function(t,e,n){var a=n("CFNN");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);(0,n("SZ7m").default)("2a06b658",a,!0,{})},Wj83:function(t,e){t.exports='{% block wallee_order_action_completion %}\n\n\n\t{% block wallee_order_action_completion_amount %}\n\t\t\n\t{% endblock %}\n\n\t{% block wallee_order_action_completion_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n'},"Yq/t":function(t,e){t.exports='\n\t\n\t\t
    \n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
    \n\t
    \n
    \n\n'},YvwI:function(t,e){t.exports='{% block wallee_order_detail %}\n
    \n\t
    \n\t\t\n\t\t\t\n\t\t\n\t\t{% block wallee_order_transaction_history_card %}\n\t\t\n\t\t\t\n\n\t\t\n\t\t{% endblock %}\n\t\t{% block wallee_order_transaction_line_items_card %}\n\t\t\n\t\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block wallee_order_transaction_refunds_card %}\n\t\t\n\t\t\t\n\n\t\t\n\t\t{% endblock %}\n\t\t{% block wallee_order_actions_modal_refund %}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block wallee_order_actions_modal_refund_by_amount %}\n\t\t\t\n\t\t\t\n\t\t{% endblock %}\n\t\t{% block wallee_order_actions_modal_completion%}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block wallee_order_actions_modal_void %}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t
    \n\t\n
    \n{% endblock %}\n'},ZTd1:function(t,e){t.exports='{% block wallee_settings_content_card_channel_config_options %}\n\t\n\n\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container %}\n\t\t\t\n\n\t\t\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container_settings %}\n\t\t\t\t\t
    \n\n\t\t\t\t\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container_settings_space_view_id %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container_settings_integration %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container_settings_line_item_consistency_enabled %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block wallee_settings_content_card_channel_config_credentials_card_container_settings_email_enabled %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\t\t\t\t\t
    \n\t\t\t\t{% endblock %}\n\t\t\t
    \n\t\t{% endblock %}\n\t
    \n\n{% endblock %}\n'},es2S:function(t){t.exports=JSON.parse('{"wallee-order":{"buttons":{"label":{"completion":"Abschluss","download-invoice":"Rechnung herunterladen","download-packing-slip":"Packzettel herunterladen","refund":"Eine neue Rückerstattung erstellen","void":"Genehmigung annullieren","refund-whole-line-item":"Gesamte Werbebuchung erstatten","refund-line-item-by-quantity":"Rückerstattung nach Menge"}},"captureAction":{"button":{"text":"Zahlung erfassen"},"currentAmount":"Betrag","isFinal":"Dies ist die endgültige Verbuchung","maxAmount":"Maximaler Betrag","successMessage":"Ihre Verbuchung war erfolgreich","successTitle":"Erfolg"},"general":{"title":"Bestellungen"},"header":"Wallee Payment","lineItem":{"cardTitle":"Einzelposten","types":{"amountIncludingTax":"Betrag","name":"Name","quantity":"Anzahl","taxAmount":"Steuern","type":"Typ","uniqueId":"Eindeutige ID"}},"modal":{"title":{"capture":"Erfassen","refund":"Neue Gutschrift","void":"Autorisierung aufheben"}},"paymentDetails":{"cardTitle":"Zahlung","error":{"title":"Fehler beim Abrufen von Zahlungsdetails von Wallee"}},"refund":{"cardTitle":"Gutschriften","refundAmount":{"label":"Gutschriftsbetrag"},"refundQuantity":{"label":"Refund Menge"},"types":{"amount":"Betrag","createdOn":"Erstellt am","id":"ID","state":"Staat"}},"refundAction":{"confirmButton":{"text":"Ausführen"},"refundAmount":{"label":"Betrag","placeholder":"Einen Betrag eingeben"},"successMessage":"Ihre Rückerstattung war erfolgreich","successTitle":"Erfolg","maxAvailableItemsToRefund":"Maximal Verfügbare Artikel zum Erstatten"},"transactionHistory":{"cardTitle":"Einzelheiten","types":{"authorized_amount":"Autorisierter Betrag","currency":"Währung","customer":"Kunde","payment_method":"Zahlungsweise","state":"Staat","transaction":"Transaktion"}},"voidAction":{"confirm":{"button":{"cancel":"Nein","confirm":"Autorisierung aufheben"},"message":"Wollen Sie diese Zahlung wirklich stornieren?"},"successMessage":"Die Zahlung wurde erfolgreich annulliert","successTitle":"Erfolg"}}}')},"iI/S":function(t,e){t.exports='{% block wallee_order_action_void %}\n\n\n\t{% block wallee_order_action_void_amount %}\n\t\t\n\t{% endblock %}\n\n\t{% block wallee_order_action_void_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n'},lowj:function(t){t.exports=JSON.parse('{"wallee-order":{"buttons":{"label":{"completion":"Completato","download-invoice":"Scarica fattura","download-packing-slip":"Scarica distinta di imballaggio","refund":"Crea un nuovo rimborso","void":"Annulla autorizzazione","refund-whole-line-item":"Rimborso intera riga","refund-line-item-by-quantity":"Rimborso per quantità"}},"captureAction":{"button":{"text":"Cattura pagamento"},"currentAmount":"Importo","isFinal":"Questa è la cattura finale","maxAmount":"Importo massimo","successMessage":"La tua cattura ha avuto successo.","successTitle":"Successo"},"general":{"title":"Ordini"},"header":"Pagamento Wallee","lineItem":{"cardTitle":"Articoli di linea","types":{"amountIncludingTax":"Importo","name":"Nome","quantity":"Quantità","taxAmount":"Tasse","type":"Tipo","uniqueId":"ID unico"}},"modal":{"title":{"capture":"Cattura","refund":"Nuovo rimborso","void":"Annulla autorizzazione"}},"paymentDetails":{"cardTitle":"Pagamento","error":{"title":"Errore nel recupero dei dettagli del pagamento da Wallee"}},"refund":{"cardTitle":"Rimborsi","refundAmount":{"label":"Importo del rimborso"},"refundQuantity":{"label":"Quantità di rimborso"},"types":{"amount":"Importo","createdOn":"Creato il","id":"ID","state":"Stato"}},"refundAction":{"confirmButton":{"text":"Esegui"},"refundAmount":{"label":"Importo","placeholder":"Inserisci un importo"},"successMessage":"Il tuo rimborso è andato a buon fine.","successTitle":"Successo","maxAvailableItemsToRefund":"Numero massimo di articoli disponibili da rimborsare"},"transactionHistory":{"cardTitle":"Dettagli","types":{"authorized_amount":"Importo autorizzato","currency":"Valuta","customer":"Cliente","payment_method":"Metodo di pagamento","state":"Stato","transaction":"Transazione"}},"voidAction":{"confirm":{"button":{"cancel":"No","confirm":"Annulla autorizzazione"},"message":"Vuoi davvero annullare questo pagamento?"},"successMessage":"Il pagamento è stato annullato con successo.","successTitle":"Successo"}}}')},pJF3:function(t,e){Shopware.Service("privileges").addPrivilegeMappingEntry({category:"permissions",parent:"wallee",key:"wallee",roles:{viewer:{privileges:["sales_channel:read","sales_channel_payment_method:read","system_config:read"],dependencies:[]},editor:{privileges:["sales_channel:update","sales_channel_payment_method:create","sales_channel_payment_method:update","system_config:update","system_config:create","system_config:delete"],dependencies:["wallee.viewer"]}}}),Shopware.Service("privileges").addPrivilegeMappingEntry({category:"permissions",parent:null,key:"sales_channel",roles:{viewer:{privileges:["sales_channel_payment_method:read"]},editor:{privileges:["payment_method:update"]},creator:{privileges:["payment_method:create","shipping_method:create","delivery_time:create"]},deleter:{privileges:["payment_method:delete"]}}})},sR6Z:function(t){t.exports=JSON.parse('{"wallee-order":{"buttons":{"label":{"completion":"Complete","download-invoice":"Download Invoice","download-packing-slip":"Download Packing Slip","refund":"Create a new refund","void":"Cancel authorization","refund-whole-line-item":"Refund whole line item","refund-line-item-by-quantity":"Refund by quantity"}},"captureAction":{"button":{"text":"Capture payment"},"currentAmount":"Amount","isFinal":"This is final capture","maxAmount":"Maximum amount","successMessage":"Your capture was successful.","successTitle":"Success"},"general":{"title":"Orders"},"header":"Wallee Payment","lineItem":{"cardTitle":"Line Items","types":{"amountIncludingTax":"Amount","name":"Name","quantity":"Quantity","taxAmount":"Taxes","type":"Type","uniqueId":"Unique ID"}},"modal":{"title":{"capture":"Capture","refund":"New refund","void":"Cancel authorization"}},"paymentDetails":{"cardTitle":"Payment","error":{"title":"Error fetching payment details from Wallee"}},"refund":{"cardTitle":"Refunds","refundAmount":{"label":"Refund Amount"},"refundQuantity":{"label":"Refund Quantity"},"types":{"amount":"Amount","createdOn":"Created On","id":"ID","state":"State"}},"refundAction":{"confirmButton":{"text":"Execute"},"refundAmount":{"label":"Amount","placeholder":"Enter a amount"},"successMessage":"Your refund was successful.","successTitle":"Success","maxAvailableItemsToRefund":"Maximum available items to refund"},"transactionHistory":{"cardTitle":"Details","types":{"authorized_amount":"Authorized Amount","currency":"Currency","customer":"Customer","payment_method":"Payment Method","state":"State","transaction":"Transaction"}},"voidAction":{"confirm":{"button":{"cancel":"No","confirm":"Cancel authorization"},"message":"Do you really want to cancel this payment?"},"successMessage":"The payment was successfully voided.","successTitle":"Success"}}}')},"u4/5":function(t){t.exports=JSON.parse('{"wallee-order":{"buttons":{"label":{"completion":"Terminée","download-invoice":"Télécharger la facture","download-packing-slip":"Télécharger le bordereau d\'expédition","refund":"Créer un nouveau remboursement","void":"Annulez l\'autorisation","refund-whole-line-item":"Remboursement de la ligne entière","refund-line-item-by-quantity":"Remboursement par quantité"}},"captureAction":{"button":{"text":"Capture du paiement"},"currentAmount":"Montant","isFinal":"C\'est la capture finale","maxAmount":"Montant maximal","successMessage":"Votre capture a été réussie.","successTitle":"Succès"},"general":{"title":"Commandes"},"header":"Wallee Paiement","lineItem":{"cardTitle":"Articles de ligne","types":{"amountIncludingTax":"Montant","name":"Nom","quantity":"Quantité","taxAmount":"Taxes","type":"Type","uniqueId":"ID unique"}},"modal":{"title":{"capture":"Capture","refund":"Nouveau remboursement","void":"Annulez l\'autorisation"}},"paymentDetails":{"cardTitle":"Paiement","error":{"title":"Erreur dans la récupération des détails du paiement à partir de Wallee"}},"refund":{"cardTitle":"Remboursements","refundAmount":{"label":"Montant du remboursement"},"refundQuantity":{"label":"Quantité à rembourser"},"types":{"amount":"Montant","createdOn":"Créé le","id":"ID","state":"État"}},"refundAction":{"confirmButton":{"text":"Exécutez"},"refundAmount":{"label":"Montant","placeholder":"Entrez un montant"},"successMessage":"Votre remboursement a été effectué avec succès.","successTitle":"Succès","maxAvailableItemsToRefund":"Nombre maximum d\'articles disponibles pour le remboursement"},"transactionHistory":{"cardTitle":"Détails","types":{"authorized_amount":"Montant autorisé","currency":"Monnaie","customer":"Client","payment_method":"Mode de paiement","state":"État","transaction":"Transaction"}},"voidAction":{"confirm":{"button":{"cancel":"Non","confirm":"Annulez l\'autorisation"},"message":"Voulez-vous vraiment annuler ce paiement?"},"successMessage":"Le paiement a été annulé avec succès.","successTitle":"Succès"}}}')},z7gL:function(t,e,n){var a=n("OAGG");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);(0,n("SZ7m").default)("3ec54862",a,!0,{})}}); \ No newline at end of file