diff --git a/src/Resources/app/administration/src/component/orders-paid/index.js b/src/Resources/app/administration/src/component/orders-paid/index.js index 6da1135..906a4f9 100644 --- a/src/Resources/app/administration/src/component/orders-paid/index.js +++ b/src/Resources/app/administration/src/component/orders-paid/index.js @@ -53,6 +53,10 @@ Component.register('mo-orders-paid', { }, computed: { + totalSelections() { + return this.Selection.reduce((prev, current) => prev + current, 0); + }, + maxAmountToProcess() { return !isNaN(this.maxRefund) ? this.maxRefund : @@ -132,6 +136,10 @@ Component.register('mo-orders-paid', { }); return payload; }, + + transactionDisabled() { + return (this.amountToProcess === 0) && (this.totalSelections === 0); + }, }, methods: { diff --git a/src/Resources/app/administration/src/component/orders-paid/orders-paid.html.twig b/src/Resources/app/administration/src/component/orders-paid/orders-paid.html.twig index bfc6f1d..91b8e64 100644 --- a/src/Resources/app/administration/src/component/orders-paid/orders-paid.html.twig +++ b/src/Resources/app/administration/src/component/orders-paid/orders-paid.html.twig @@ -38,7 +38,7 @@
2&&void 0!==arguments[2]?arguments[2]:"transactions-control";return r(this,u),c.call(this,e,t,n)}return t=u,(n=[{key:"statusCheck",value:function(e){var t=this.getBasicHeaders({});return this.httpClient.post("_action/".concat(this.getApiBasePath(),"/status"),e,{headers:t}).then((function(e){return l.handleResponse(e)}))}},{key:"capture",value:function(e){var t=this.getBasicHeaders({});return this.httpClient.post("_action/".concat(this.getApiBasePath(),"/capture"),e,{headers:t}).then((function(e){return l.handleResponse(e)}))}},{key:"cancel",value:function(e){var t=this.getBasicHeaders({});return this.httpClient.post("_action/".concat(this.getApiBasePath(),"/cancel"),e,{headers:t}).then((function(e){return l.handleResponse(e)}))}},{key:"refund",value:function(e){var t=this.getBasicHeaders({});return this.httpClient.post("_action/".concat(this.getApiBasePath(),"/refund"),e,{headers:t}).then((function(e){return l.handleResponse(e)}))}},{key:"enableButtons",value:function(e){var t=this.getBasicHeaders({});return this.httpClient.post("_action/".concat(this.getApiBasePath(),"/enableButtons"),e,{headers:t}).then((function(e){return l.handleResponse(e)}))}},{key:"getConfig",value:function(e){var t=this.getBasicHeaders({});return this.httpClient.post("_action/".concat(this.getApiBasePath(),"/getConfig"),e,{headers:t}).then((function(e){return l.handleResponse(e)}))}}])&&i(t.prototype,n),s&&i(t,s),Object.defineProperty(t,"prototype",{writable:!1}),u}(l);u.addServiceProvider("transactionsControl",(function(e){var t=u.getContainer("init");return new d(t.httpClient,e.loginService)}))},CLcm:function(e,t,n){var r=n("GTGS");r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n("SZ7m").default)("4f7380c8",r,!0,{})},GTGS:function(e,t,n){},"KgH/":function(e,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:"api-test";return r(this,u),c.call(this,e,t,n)}return t=u,(n=[{key:"check",value:function(e){var t=this.getBasicHeaders({});return this.httpClient.post("_action/".concat(this.getApiBasePath(),"/test-connection"),e,{headers:t}).then((function(e){return l.handleResponse(e)}))}},{key:"savemethod",value:function(e){var t=this.getBasicHeaders({});return this.httpClient.post("_action/".concat(this.getApiBasePath(),"/savemethod"),e,{headers:t}).then((function(e){return l.handleResponse(e)}))}}])&&i(t.prototype,n),s&&i(t,s),Object.defineProperty(t,"prototype",{writable:!1}),u}(l);u.addServiceProvider("apiTest",(function(e){var t=u.getContainer("init");return new d(t.httpClient,e.loginService)}))},Qtgi:function(e){e.exports=JSON.parse('{"worldline":{"api-test-button":{"title":"API Test","success":"Verbindung wurde erfolgreich getestet.","error":"Verbindung konnte nicht hergestellt werden. Bitte prüfe die Zugangsdaten.","button":"Test Verbindung"},"payment-method-button":{"headline":"Zahlungsarten","subline":"Bitte Zahlungsarten für Ihren Checkout auswählen","selectAll":"alle auswählen / abwählen","save":"speichern","request":"Verfügbare Zahlungsarten werden abgerufen...","requestEmpty":"Keine Zahlungsarten zum Anzeigen gefunden","title":"Verfügbare Zahlungsmittel abrufen","error":"Verbindung konnte nicht hergestellt werden. Bitte überprüfen Sie die Zugangsdaten."}}}')},SZ7m:function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},i=0;in.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(i=0;i\n
\n {{ $tc(\'worldline.api-test-button.button\') }}
\n
\n
\n\n',props:["label"],inject:["apiTest"],mixins:[o.getByName("notification")],data:function(){return{isLoading:!1,isSaveSuccessful:!1}},computed:{pluginConfig:function(){for(var e=this.$parent;void 0===e.actualConfigData;)e=e.$parent;return{"сonfigData":e.actualConfigData,salesChannelId:e.currentSalesChannelId}}},methods:{saveFinish:function(){this.isSaveSuccessful=!1},check:function(){var e=this;this.isLoading=!0,this.apiTest.check(this.pluginConfig).then((function(t){t.success?(e.isSaveSuccessful=!0,e.createNotificationSuccess({title:e.$tc("worldline.api-test-button.title"),message:e.$tc("worldline.api-test-button.success")}),document.querySelector(".sw-extension-config__save-action").click()):e.createNotificationError({title:e.$tc("worldline.api-test-button.title"),message:e.$tc("worldline.api-test-button.error")+t.message}),e.isLoading=!1}))}}});n("cHUf");var a=Shopware,s=a.Component,c=a.Mixin;s.register("payment-method-button",{template:'
\n
\n \n
\n
\n
\n

{{ $tc(\'worldline.payment-method-button.subline\') }}

\n

{{ $tc(\'worldline.payment-method-button.selectAll\') }}

\n
\n
\n
\n
\n {{ $tc(\'worldline.payment-method-button.save\') }}\n
\n
\n
\n',props:["label"],inject:["apiTest"],mixins:[c.getByName("notification")],data:function(){return{isLoading:!1,isSaveSuccessful:!1}},computed:{pluginConfig:function(){for(var e=this.$parent;void 0===e.actualConfigData;)e=e.$parent;return{"сonfigData":e.actualConfigData,salesChannelId:e.currentSalesChannelId,responseArray:this.createPaymentMethodsArray()}}},methods:{getSalesChannelId:function(){for(var e=this.$parent;void 0===e.currentSalesChannelId;)e=e.$parent;return e.currentSalesChannelId},selectCheckbox:function(){document.querySelectorAll(".paymentMethod").forEach((function(e,t,n){(0===t||e.checked!=n[0].checked)&&e.click()}))},createPaymentMethodsArray:function(){var e=[];return document.querySelectorAll(".payment-method--container").forEach((function(t){e.push({id:t.children[0].children[0].id,status:t.children[0].children[0].checked,internalId:t.children[0].children[0].getAttribute("internalId")})})),e},saveButton:function(){var e=this;this.apiTest.savemethod({data:this.createPaymentMethodsArray(),salesChannelId:this.getSalesChannelId()}).then((function(t){t.success?(e.isSaveSuccessful=!0,e.createNotificationSuccess({title:e.$tc("worldline.payment-method-button.APITitle"),message:e.$tc("worldline.payment-method-button.success")})):e.createNotificationError({title:e.$tc("worldline.payment-method-button.APITitle"),message:e.$tc("worldline.payment-method-button.errorAPI")+t.message}),e.isLoading=!1}))},display:function(e){document.querySelector(".border-inner").innerHTML=e},renderPaymentMethods:function(e){if(e.length<=5&&(document.querySelector(".select-all").innerHTML=""),0==e.length)this.display('

'.concat(this.$tc("worldline.payment-method-button.requestEmpty"),"

"));else{var t=e.map((function(e){return'
\n \n \n \n
")})).join(" ");this.display(t)}},getPaymentMethods:function(){var e=this;this.display('

'.concat(this.$tc("worldline.payment-method-button.request"),"

")),this.isLoading=!0,this.apiTest.check(this.pluginConfig).then((function(t){t.success?e.renderPaymentMethods(t.paymentMethods):(e.display('

'.concat(e.$tc("worldline.payment-method-button.error"),"

")),e.createNotificationError({title:e.$tc("worldline.payment-method-button.title"),message:e.$tc("worldline.payment-method-button.error")+t.message})),e.isLoading=!1})).catch((function(t){e.display('

'.concat(e.$tc("worldline.payment-method-button.error"),"

"))}))}},mounted:function(){this.getPaymentMethods()}});var l=Shopware,u=l.Component,d=l.Utils,p=l.Mixin,m=d.get;d.format;u.register("mo-orders-unprocessed",{template:'\n \n \n\n \n\n \n\n \n \n\n \n
\n \n
\n {{ $tc(\'worldline.capture-payment-button.button\') }}
\n\n {{ $tc(\'worldline.cancel-payment-button.button\') }}\n\n \n\n
{{ $tc(\'worldline.transaction-control.table.empty\') }}
\n',inject:["transactionsControl"],mixins:[p.getByName("notification")],props:{order:{type:Object,required:!0},transactionId:{type:String,required:!0},paymentStatus:{type:Array,required:!0},maxCapture:{type:Number,required:!0},lockedButton:{type:Boolean,required:!0}},data:function(){return{transactionSuccess:{capture:!1,cancel:!1},Selection:[],isLoading:!1,itemPrices:[],amountToProcess:0}},mounted:function(){for(var e=0;e0}))},hasContent:function(){return this.orderLineItems.length>0},taxStatus:function(){return m(this.order,"taxStatus","")},unitPriceLabel:function(){return this.$tc("worldline.transaction-control.table.unitPrice")},linePriceLabel:function(){return"gross"===this.taxStatus?"sw-order.detailBase.columnTotalPriceGross":"sw-order.detailBase.columnTotalPriceNet"},getLineItemColumns:function(){var e=[{property:"quantity",dataIndex:"unprocessed",label:"sw-order.detailBase.columnQuantity",allowResize:!1,align:"right",width:"100px"},{property:"unprocessed",dataIndex:"unprocessed",label:"worldline.transaction-control.table.selected",allowResize:!1,align:"right",width:"150px"},{property:"label",dataIndex:"label",label:"sw-order.detailBase.columnProductName",allowResize:!1,primary:!0,multiLine:!0},{property:"unitPrice",dataIndex:"unitPrice",label:this.unitPriceLabel,allowResize:!1,align:"right",width:"120px"}];return[].concat(e,[{property:"totalPrice",dataIndex:"totalPrice",label:this.linePriceLabel,allowResize:!1,align:"right",width:"120px"}])},payloadItems:function(){var e=this,t=[];return this.orderLineItems.forEach((function(n,r){t.push({id:n.id,quantity:e.Selection[r]})})),t}},methods:{capture:function(){var e=this,t={transactionId:this.transactionId,amount:this.amountToProcess,items:this.payloadItems};this.transactionsControl.capture(t).then((function(t){t.success?(e.transactionSuccess.capture=!0,setTimeout((function(){location.reload()}),1e3)):e.createNotificationError({title:e.$tc("worldline.capture-payment-button.title"),message:e.$tc("worldline.capture-payment-button.error")+t.message})})).finally((function(){}))},cancel:function(){var e=this;this.isLoading=!0;var t={transactionId:this.transactionId,amount:this.amountToProcess,items:this.payloadItems};this.transactionsControl.cancel(t).then((function(t){t.success?(e.transactionSuccess.refund=!0,setTimeout((function(){location.reload()}),1e3)):e.createNotificationError({title:e.$tc("worldline.refund-payment-button.title"),message:e.$tc("worldline.refund-payment-button.error")+t.message})})).finally((function(){e.isLoading=!1}))},setPriceSum:function(){this.amountToProcess=Math.min(this.itemPrices.reduce((function(e,t){return e+t})),this.maxAmountToProcess)},setLinePrice:function(e,t,n){this.itemPrices[e]=n*t,this.setPriceSum()},setCustomAmount:function(e){this.amountToProcess=e}}});var f=Shopware,h=f.Component,y=f.Utils,g=f.Mixin,b=y.get;y.format;h.register("mo-orders-paid",{template:'\n \n \n\n \n\n \n\n \n \n\n \n
\n \n
\n {{ $tc(\'worldline.refund-payment-button.button\') }}\n\n
\n\n
{{ $tc(\'worldline.transaction-control.table.empty\') }}
\n
',inject:["transactionsControl"],mixins:[g.getByName("notification")],props:{order:{type:Object,required:!0},transactionId:{type:String,required:!0},paymentStatus:{type:Array,required:!0},maxRefund:{type:Number},lockedButton:{type:Boolean,required:!0}},data:function(){return{transactionSuccess:!1,Selection:[],isLoading:!1,itemPrices:[],amountToProcess:0}},mounted:function(){for(var e=0;e0}))},hasContent:function(){return this.orderLineItems.length>0},taxStatus:function(){return b(this.order,"taxStatus","")},unitPriceLabel:function(){return this.$tc("worldline.transaction-control.table.unitPrice")},linePriceLabel:function(){return"gross"===this.taxStatus?"sw-order.detailBase.columnTotalPriceGross":"sw-order.detailBase.columnTotalPriceNet"},getLineItemColumns:function(){var e=[{property:"quantity",dataIndex:"paid",label:"sw-order.detailBase.columnQuantity",allowResize:!1,align:"right",width:"100px"},{property:"refund",dataIndex:"paid",label:"worldline.transaction-control.table.selected",allowResize:!1,align:"right",width:"150px"},{property:"label",dataIndex:"label",label:"sw-order.detailBase.columnProductName",allowResize:!1,primary:!0,multiLine:!0},{property:"unitPrice",dataIndex:"unitPrice",label:this.unitPriceLabel,allowResize:!1,align:"right",width:"120px"}];return[].concat(e,[{property:"totalPrice",dataIndex:"totalPrice",label:this.linePriceLabel,allowResize:!1,align:"right",width:"120px"}])},payloadItems:function(){var e=this,t=[];return this.orderLineItems.forEach((function(n,r){t.push({id:n.id,quantity:e.Selection[r]})})),t}},methods:{refund:function(){var e=this,t={transactionId:this.transactionId,amount:this.amountToProcess,items:this.payloadItems};this.transactionsControl.refund(t).then((function(t){t.success?(e.transactionSuccess=!0,setTimeout((function(){location.reload()}),1e3)):e.createNotificationError({title:e.$tc("worldline.capture-payment-button.title"),message:e.$tc("worldline.capture-payment-button.error")+t.message})})).finally((function(){}))},setPriceSum:function(){this.amountToProcess=Math.min(this.itemPrices.reduce((function(e,t){return e+t})),this.maxAmountToProcess)},setLinePrice:function(e,t,n){this.itemPrices[e]=n*t,this.setPriceSum()},setCustomAmount:function(e){this.amountToProcess=e}}});var v=Shopware,w=v.Component,P=v.Utils,S=P.get;P.format;w.register("mo-orders-refunded",{template:'\n \n \n\n \n\n \n \n\n \n
\n \n
\n\n
{{ $tc(\'worldline.transaction-control.table.empty\') }}
\n
',inject:["transactionsControl"],props:{order:{type:Object,required:!0},paymentStatus:{type:Array,required:!0}},data:function(){return{isLoading:!1,itemPrices:[],totalAmount:0}},mounted:function(){var e=this;this.orderLineItems.forEach((function(t){var n=t.unitPrice*t.refunded;e.itemPrices.push(n),e.totalAmount+=n}))},computed:{orderLineItems:function(){return this.paymentStatus.filter((function(e){return e.refunded>0}))},hasContent:function(){return this.orderLineItems.length>0},taxStatus:function(){return S(this.order,"taxStatus","")},unitPriceLabel:function(){return this.$tc("worldline.transaction-control.table.unitPrice")},linePriceLabel:function(){return"gross"===this.taxStatus?"sw-order.detailBase.columnTotalPriceGross":"sw-order.detailBase.columnTotalPriceNet"},getLineItemColumns:function(){var e=[{property:"quantity",dataIndex:"paid",label:"sw-order.detailBase.columnQuantity",allowResize:!1,align:"right",width:"100px"},{property:"label",dataIndex:"label",label:"sw-order.detailBase.columnProductName",allowResize:!1,primary:!0,multiLine:!0},{property:"unitPrice",dataIndex:"unitPrice",label:this.unitPriceLabel,allowResize:!1,align:"right",width:"120px"}];return[].concat(e,[{property:"totalPrice",dataIndex:"totalPrice",label:this.linePriceLabel,allowResize:!1,align:"right",width:"120px"}])}}});var C=Shopware,x=C.Component,I=C.Utils,L=I.get;I.format;x.register("mo-orders-canceled",{template:'\n \n \n\n \n\n \n \n\n \n
\n \n
\n\n
{{ $tc(\'worldline.transaction-control.table.empty\') }}
\n
',inject:["transactionsControl"],props:{order:{type:Object,required:!0},paymentStatus:{type:Array,required:!0}},data:function(){return{isLoading:!1,itemPrices:[],totalAmount:0}},mounted:function(){var e=this;this.orderLineItems.forEach((function(t){var n=t.unitPrice*t.canceled;e.itemPrices.push(n),e.totalAmount+=n}))},computed:{orderLineItems:function(){return this.paymentStatus.filter((function(e){return e.canceled>0}))},hasContent:function(){return this.orderLineItems.length>0},taxStatus:function(){return L(this.order,"taxStatus","")},unitPriceLabel:function(){return this.$tc("worldline.transaction-control.table.unitPrice")},linePriceLabel:function(){return"gross"===this.taxStatus?"sw-order.detailBase.columnTotalPriceGross":"sw-order.detailBase.columnTotalPriceNet"},getLineItemColumns:function(){var e=[{property:"quantity",dataIndex:"paid",label:"sw-order.detailBase.columnQuantity",allowResize:!1,align:"right",width:"100px"},{property:"label",dataIndex:"label",label:"sw-order.detailBase.columnProductName",allowResize:!1,primary:!0,multiLine:!0},{property:"unitPrice",dataIndex:"unitPrice",label:this.unitPriceLabel,allowResize:!1,align:"right",width:"120px"}];return[].concat(e,[{property:"totalPrice",dataIndex:"totalPrice",label:this.linePriceLabel,allowResize:!1,align:"right",width:"120px"}])}}});n("CLcm");Shopware.Component.override("sw-order-detail-base",{template:'{% block sw_order_detail_base_custom_fields %}\n {% parent() %}\n \n \n \n \n \n \n\n \n \n {{ $tc(\'worldline.check-status-button.button\') }}\n \n\n \n {{ $tc(\'worldline.transaction-control.buttons.adminPay\') }}\n \n \n \n{% endblock %}\n',inject:["transactionsControl"],data:function(){return{activeTab:"unprocessed",tabs:[{name:"unprocessed"},{name:"paid"},{name:"refunded"},{name:"canceled"}],transactionStatus:!1,transactionLogs:"",worldlinePaymentStatus:[],isLoading:!1,unwatchOrder:null,isUnpaidAdminOrder:!1,adminPayFinishUrl:"",adminPayErrorUrl:"",swAccessKey:"",isWorldlineOnlinePayment:!1,lockedButtons:!1,allowedAmounts:null}},created:function(){var e=this;this.unwatchOrder=this.$watch("order",(function(t){var n;null!=t&&null!==(n=t.lineItems)&&void 0!==n&&n.length&&e.initializePanel()}))},computed:{transactionId:function(){var e;return null===(e=this.order.customFields)||void 0===e?void 0:e.payment_transaction_id},paymentMethod:function(){return this.order.transactions.last().paymentMethod.customFields.worldline_payment_method_id},transactionStatusId:function(){var e;return null===(e=this.order.customFields)||void 0===e?void 0:e.payment_transaction_status},getOrderId:function(){return this.order.id},isAdminOrder:function(){return null!==this.order.createdBy},isNoTransactionPresent:function(){return!this.transactionId},isNoCompleteTransactionPresent:function(){return!!this.isNoTransactionPresent||0==this.transactionStatusId}},methods:{setActiveTab:function(e){this.activeTab=e.name},getPanelConfig:function(){var e=this;this.transactionsControl.getConfig({orderId:this.order.id}).then((function(t){e.adminPayFinishUrl=t.adminPayFinishUrl,e.adminPayErrorUrl=t.adminPayErrorUrl,e.isWorldlineOnlinePayment=t.isFullRedirectMethod,e.swAccessKey=t.swAccessKey})).finally((function(){e.isUnpaidAdminOrder=e.isAdminOrder&&e.isWorldlineOnlinePayment&&e.isNoCompleteTransactionPresent,e.statusCheck()}))},setInitialTab:function(){0===this.worldlinePaymentStatus.filter((function(e){return e.unprocessed>0})).length&&(this.worldlinePaymentStatus.filter((function(e){return e.paid>0})).length>0?this.activeTab="paid":this.worldlinePaymentStatus.filter((function(e){return e.refunded>0})).length>0?this.activeTab="refunded":this.worldlinePaymentStatus.filter((function(e){return e.canceled>0})).length>0&&(this.activeTab="canceled"))},initializePanel:function(){this.unwatchOrder(),this.getPanelConfig()},getValues:function(){var e=this;null!==this.transactionId?this.transactionsControl.enableButtons({transactionId:this.transactionId}).then((function(t){t.success?(e.worldlinePaymentStatus=t.worldlinePaymentStatus,e.transactionLogs=t.log,e.allowedAmounts=t.allowedAmounts,e.lockedButtons=t.worldlineLockButtons,e.setInitialTab(),e.transactionStatus=!0):e.createNotificationError({title:e.$tc("worldline.check-status-button.title"),message:e.$tc("worldline.check-status-button.error")+t.message})})).finally((function(){return e.isLoading=!1})):this.isLoading=!1},statusCheck:function(){var e=this;this.isLoading=!0,this.transactionsControl.statusCheck({transactionId:this.transactionId}).then((function(t){t.success?e.getValues():(e.isUnpaidAdminOrder||(e.transactionStatus=!1,e.createNotificationError({title:e.$tc("worldline.check-status-button.title"),message:e.$tc("worldline.check-status-button.error")+t.message})),e.isLoading=!1)}))},payByAdmin:function(){var e=this;this.isLoading=!0;var t={orderId:this.getOrderId,finishUrl:this.adminPayFinishUrl,errorUrl:this.adminPayErrorUrl};fetch("/store-api/handle-payment",{method:"POST",headers:{"Content-Type":"application/json","sw-access-key":this.swAccessKey},body:JSON.stringify(t)}).then((function(t){t.ok?t.json().then((function(e){var t=null,n=null;t=open(e.redirectUrl),n=setInterval((function(){t.closed&&(clearInterval(n),location.reload())}),500)})):(console.error(t),e.createNotificationError({title:e.$tc("worldline.check-status-button.title"),message:e.$tc("worldline.transaction-control.buttons.error")}))})).catch((function(t){console.error(t),e.createNotificationError({title:e.$tc("worldline.check-status-button.title"),message:e.$tc("worldline.check-status-button.error")+t})})).finally((function(){e.isLoading=!1}))}}});var T=n("Qtgi"),A=n("ng4i");Shopware.Locale.extend("de-DE",T),Shopware.Locale.extend("en-GB",A)},cHUf:function(e,t,n){var r=n("ca0y");r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n("SZ7m").default)("61126674",r,!0,{})},ca0y:function(e,t,n){},ng4i:function(e){e.exports=JSON.parse('{"worldline":{"api-test-button":{"title":"API Test","success":"Connection test was successful.","error":"Connection could not be established. Please check the access data.","button":"Test connection"},"check-status-button":{"title":"Status check","success":"Status was successfully updated.","error":"Operation failed.","button":"Check status"},"capture-payment-button":{"title":"Capture payment","success":"Payment was successfully captured.","error":"Operation failed.","button":"Capture payment"},"cancel-payment-button":{"title":"Cancel payment","success":"Payment was successfully canceled.","error":"Operation failed.","button":"Cancel payment"},"refund-payment-button":{"title":"Refund payment","success":"Payment was successfully refunded.","error":"Operation failed.","button":"Refund payment"},"save-payment-card":{"label":"Save payment card","deleteButton":"Delete","deleted":"Card has been deleted."},"forwardToPaymentHandler":"Forwarding to payment handler.","errorWithConfirmRedirect":"Error. Redirecting to confirm page.","buildingOrder":"Building order","started":"Started","captureRequested":"Capture requested","gettingPaymentStatus":"Getting payment status","tryingToCapture":"Trying to capture","unsupportedStatus":"Unsupported status","operationIsNotPossibleDueToCurrentStatus":"Operation is not possible due to current status","maxAmountExceeded":"Maximum amount exceeded.","wrongAmountRequested":"Wrong amount requested.","gettingPaymentDetails":"Getting payment details","paymentOpen":"Payment is open","paymentInProgress":"Payment is in progress","paymentPaid":"Paid","paymentRefunded":"Payment refunded","paymentCanceled":"Payment cancelled","paymentFailed":"Payment failed","refundInProgress":"Refund in progress","cantFindCurrencyOfOrder":"Cannot find currency of order","statusUpdateError":"Status update error","statusUpdateRequestSent":"Status update request sent","noTransactionForThisOrder":"No transaction for this order","success":"Success","failed":"Operation failed.","worldline-order":{"detail":{"cardLabel":"Worldline transaction control","bundleSelectLabel":"Associated bundles","bundleSelectPlaceholder":"Add bundle..."}},"transactionStatus":{"refunded":"Refunded","cancelled":"Cancelled","captured":"Captured","created":"Created","rejected":"Rejected","rejectedCapture":"Capture rejected","cancellationDeclined":"Cancellation declined","redirected":"Redirected","pendingCapture":"Pending capture","authorizationRequested":"Authorization requested","captureRequested":"Capture requested","refundRequested":"Refund requested"},"payment-method-button":{"headline":"Payment Methods","subline":"Please select payment methods for your checkout","selectAll":"select / deselect all","save":"Save","request":"Requesting available payment methods...","requestEmpty":"No payment methods to display","title":"Get available payment methods","error":"Connection could not be established. Please check the access data.","success":"Changes successfully saved","errorAPI":"There was an error on save","APITitle":"Payment method saving"},"configFile":{"merchantId":"Merchant Id","apiKey":"API Key","aspSecret":"API Secret","webhookKey":"Webhook key","webhookSecret":"Webhook secret","liveEndpoint":"Live endpoint","sandboxEndpoint":"Sandbox endpoint","returnUrl":"Return URL","isLiveMode":"Is live mode","logLevel":"Log level","logLevelHint":"Choose the loglevel of non-error messages","logLevelDebug":"DEBUG","logLevelError":"ERROR","logLevelInfo":"INFO","automaticCapture":"Automatic capture","disabled":"Disabled","0_day":"Immediately","1_day":"In 1 day","2_day":"In 2 days","3_day":"In 3 days","4_day":"In 4 days","5_day":"In 5 days"},"composer":{"label":"Worldline Online Payments.","description":"Worldline Online Payments.","extraDescription":"Certified Worldline online payments extension for Shopware 6"},"transaction-control":{"logs":{"label":"Payment log","placeholder":"nothing here..."},"tabs":{"unprocessed":"Unprocessed","paid":"Paid","refunded":"Refunded","canceled":"Canceled"},"table":{"selected":"Selected","unitPrice":"Unit Price","empty":"No items with current status in order"},"buttons":{"adminPay":"Pay for order","error":"Something went wrong"}}}}')}}); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/bundles/moptworldline/",n(n.s="Amj0")}({"7AqV":function(e,t,n){var r=n("nLnJ");r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n("SZ7m").default)("1f6aee34",r,!0,{})},Amj0:function(e,t,n){"use strict";n.r(t);n("dHgz"),n("wXSU");var r=Shopware,i=r.Component,o=r.Mixin;i.register("api-test-button",{template:'
\n
\n {{ $tc(\'worldline.api-test-button.button\') }}\n
\n
\n
\n',props:["label"],inject:["apiTest"],mixins:[o.getByName("notification")],data:function(){return{isLoading:!1,isSaveSuccessful:!1}},computed:{pluginConfig:function(){for(var e=this.$parent;void 0===e.actualConfigData;)e=e.$parent;return{"сonfigData":e.actualConfigData,salesChannelId:e.currentSalesChannelId}}},methods:{saveFinish:function(){this.isSaveSuccessful=!1},check:function(){var e=this;this.isLoading=!0,this.apiTest.check(this.pluginConfig).then((function(t){t.success?(e.isSaveSuccessful=!0,e.createNotificationSuccess({title:e.$tc("worldline.api-test-button.title"),message:e.$tc("worldline.api-test-button.success")}),document.querySelector(".sw-extension-config__save-action").click()):e.createNotificationError({title:e.$tc("worldline.api-test-button.title"),message:e.$tc("worldline.api-test-button.error")+t.message}),e.isLoading=!1}))}}});n("7AqV");var a=Shopware,s=a.Component,c=a.Mixin;s.register("payment-method-button",{template:'
\n
\n \n
\n
\n
\n

{{ $tc(\'worldline.payment-method-button.subline\') }}

\n

{{ $tc(\'worldline.payment-method-button.selectAll\') }}

\n
\n
\n
\n
\n {{ $tc(\'worldline.payment-method-button.save\') }}\n
\n
\n
\n',props:["label"],inject:["apiTest"],mixins:[c.getByName("notification")],data:function(){return{isLoading:!1,isSaveSuccessful:!1}},computed:{pluginConfig:function(){for(var e=this.$parent;void 0===e.actualConfigData;)e=e.$parent;return{"сonfigData":e.actualConfigData,salesChannelId:e.currentSalesChannelId,responseArray:this.createPaymentMethodsArray()}}},methods:{getSalesChannelId:function(){for(var e=this.$parent;void 0===e.currentSalesChannelId;)e=e.$parent;return e.currentSalesChannelId},selectCheckbox:function(){document.querySelectorAll(".paymentMethod").forEach((function(e,t,n){(0===t||e.checked!=n[0].checked)&&e.click()}))},createPaymentMethodsArray:function(){var e=[];return document.querySelectorAll(".payment-method--container").forEach((function(t){e.push({id:t.children[0].children[0].id,status:t.children[0].children[0].checked,internalId:t.children[0].children[0].getAttribute("internalId")})})),e},saveButton:function(){var e=this;this.apiTest.savemethod({data:this.createPaymentMethodsArray(),salesChannelId:this.getSalesChannelId()}).then((function(t){t.success?(e.isSaveSuccessful=!0,e.createNotificationSuccess({title:e.$tc("worldline.payment-method-button.APITitle"),message:e.$tc("worldline.payment-method-button.success")})):e.createNotificationError({title:e.$tc("worldline.payment-method-button.APITitle"),message:e.$tc("worldline.payment-method-button.errorAPI")+t.message}),e.isLoading=!1}))},display:function(e){document.querySelector(".border-inner").innerHTML=e},renderPaymentMethods:function(e){if(e.length<=5&&(document.querySelector(".select-all").innerHTML=""),0==e.length)this.display('

'.concat(this.$tc("worldline.payment-method-button.requestEmpty"),"

"));else{var t=e.map((function(e){return'
\n \n \n \n
")})).join(" ");this.display(t)}},getPaymentMethods:function(){var e=this;this.display('

'.concat(this.$tc("worldline.payment-method-button.request"),"

")),this.isLoading=!0,this.apiTest.check(this.pluginConfig).then((function(t){t.success?e.renderPaymentMethods(t.paymentMethods):(e.display('

'.concat(e.$tc("worldline.payment-method-button.error"),"

")),e.createNotificationError({title:e.$tc("worldline.payment-method-button.title"),message:e.$tc("worldline.payment-method-button.error")+t.message})),e.isLoading=!1})).catch((function(t){e.display('

'.concat(e.$tc("worldline.payment-method-button.error"),"

"))}))}},mounted:function(){this.getPaymentMethods()}});var l=Shopware,u=l.Component,d=l.Utils,p=l.Mixin,m=d.get;d.format;u.register("mo-orders-unprocessed",{template:'\n \n \n\n \n\n \n\n \n \n\n \n
\n \n
\n {{ $tc(\'worldline.capture-payment-button.button\') }}\n\n {{ $tc(\'worldline.cancel-payment-button.button\') }}\n\n
\n\n
{{ $tc(\'worldline.transaction-control.table.empty\') }}
\n
',inject:["transactionsControl"],mixins:[p.getByName("notification")],props:{order:{type:Object,required:!0},transactionId:{type:String,required:!0},paymentStatus:{type:Array,required:!0},maxCapture:{type:Number,required:!0},lockedButton:{type:Boolean,required:!0}},data:function(){return{transactionSuccess:{capture:!1,cancel:!1},Selection:[],isLoading:!1,itemPrices:[],amountToProcess:0}},mounted:function(){for(var e=0;e0}))},hasContent:function(){return this.orderLineItems.length>0},taxStatus:function(){return m(this.order,"taxStatus","")},unitPriceLabel:function(){return this.$tc("worldline.transaction-control.table.unitPrice")},linePriceLabel:function(){return"gross"===this.taxStatus?"sw-order.detailBase.columnTotalPriceGross":"sw-order.detailBase.columnTotalPriceNet"},getLineItemColumns:function(){var e=[{property:"quantity",dataIndex:"unprocessed",label:"sw-order.detailBase.columnQuantity",allowResize:!1,align:"right",width:"100px"},{property:"unprocessed",dataIndex:"unprocessed",label:"worldline.transaction-control.table.selected",allowResize:!1,align:"right",width:"150px"},{property:"label",dataIndex:"label",label:"sw-order.detailBase.columnProductName",allowResize:!1,primary:!0,multiLine:!0},{property:"unitPrice",dataIndex:"unitPrice",label:this.unitPriceLabel,allowResize:!1,align:"right",width:"120px"}];return[].concat(e,[{property:"totalPrice",dataIndex:"totalPrice",label:this.linePriceLabel,allowResize:!1,align:"right",width:"120px"}])},payloadItems:function(){var e=this,t=[];return this.orderLineItems.forEach((function(n,r){t.push({id:n.id,quantity:e.Selection[r]})})),t},transactionDisabled:function(){return 0===this.amountToProcess&&0===this.totalSelections}},methods:{capture:function(){var e=this,t={transactionId:this.transactionId,amount:this.amountToProcess,items:this.payloadItems};this.transactionsControl.capture(t).then((function(t){t.success?(e.transactionSuccess.capture=!0,setTimeout((function(){location.reload()}),1e3)):e.createNotificationError({title:e.$tc("worldline.capture-payment-button.title"),message:e.$tc("worldline.capture-payment-button.error")+t.message})})).finally((function(){}))},cancel:function(){var e=this;this.isLoading=!0;var t={transactionId:this.transactionId,amount:this.amountToProcess,items:this.payloadItems};this.transactionsControl.cancel(t).then((function(t){t.success?(e.transactionSuccess.refund=!0,setTimeout((function(){location.reload()}),1e3)):e.createNotificationError({title:e.$tc("worldline.refund-payment-button.title"),message:e.$tc("worldline.refund-payment-button.error")+t.message})})).finally((function(){e.isLoading=!1}))},setPriceSum:function(){this.amountToProcess=Math.min(this.itemPrices.reduce((function(e,t){return e+t})),this.maxAmountToProcess)},setLinePrice:function(e,t,n){this.itemPrices[e]=n*t,this.setPriceSum()},setCustomAmount:function(e){this.amountToProcess=e}}});var f=Shopware,h=f.Component,y=f.Utils,g=f.Mixin,b=y.get;y.format;h.register("mo-orders-paid",{template:'\n \n \n\n \n\n \n\n \n \n\n \n
\n \n
\n {{ $tc(\'worldline.refund-payment-button.button\') }}\n\n
\n\n
{{ $tc(\'worldline.transaction-control.table.empty\') }}
\n
',inject:["transactionsControl"],mixins:[g.getByName("notification")],props:{order:{type:Object,required:!0},transactionId:{type:String,required:!0},paymentStatus:{type:Array,required:!0},maxRefund:{type:Number},lockedButton:{type:Boolean,required:!0}},data:function(){return{transactionSuccess:!1,Selection:[],isLoading:!1,itemPrices:[],amountToProcess:0}},mounted:function(){for(var e=0;e0}))},hasContent:function(){return this.orderLineItems.length>0},taxStatus:function(){return b(this.order,"taxStatus","")},unitPriceLabel:function(){return this.$tc("worldline.transaction-control.table.unitPrice")},linePriceLabel:function(){return"gross"===this.taxStatus?"sw-order.detailBase.columnTotalPriceGross":"sw-order.detailBase.columnTotalPriceNet"},getLineItemColumns:function(){var e=[{property:"quantity",dataIndex:"paid",label:"sw-order.detailBase.columnQuantity",allowResize:!1,align:"right",width:"100px"},{property:"refund",dataIndex:"paid",label:"worldline.transaction-control.table.selected",allowResize:!1,align:"right",width:"150px"},{property:"label",dataIndex:"label",label:"sw-order.detailBase.columnProductName",allowResize:!1,primary:!0,multiLine:!0},{property:"unitPrice",dataIndex:"unitPrice",label:this.unitPriceLabel,allowResize:!1,align:"right",width:"120px"}];return[].concat(e,[{property:"totalPrice",dataIndex:"totalPrice",label:this.linePriceLabel,allowResize:!1,align:"right",width:"120px"}])},payloadItems:function(){var e=this,t=[];return this.orderLineItems.forEach((function(n,r){t.push({id:n.id,quantity:e.Selection[r]})})),t},transactionDisabled:function(){return 0===this.amountToProcess&&0===this.totalSelections}},methods:{refund:function(){var e=this,t={transactionId:this.transactionId,amount:this.amountToProcess,items:this.payloadItems};this.transactionsControl.refund(t).then((function(t){t.success?(e.transactionSuccess=!0,setTimeout((function(){location.reload()}),1e3)):e.createNotificationError({title:e.$tc("worldline.capture-payment-button.title"),message:e.$tc("worldline.capture-payment-button.error")+t.message})})).finally((function(){}))},setPriceSum:function(){this.amountToProcess=Math.min(this.itemPrices.reduce((function(e,t){return e+t})),this.maxAmountToProcess)},setLinePrice:function(e,t,n){this.itemPrices[e]=n*t,this.setPriceSum()},setCustomAmount:function(e){this.amountToProcess=e}}});var v=Shopware,w=v.Component,P=v.Utils,S=P.get;P.format;w.register("mo-orders-refunded",{template:'\n \n \n\n \n\n \n \n\n \n
\n \n
\n\n
{{ $tc(\'worldline.transaction-control.table.empty\') }}
\n
',inject:["transactionsControl"],props:{order:{type:Object,required:!0},paymentStatus:{type:Array,required:!0}},data:function(){return{isLoading:!1,itemPrices:[],totalAmount:0}},mounted:function(){var e=this;this.orderLineItems.forEach((function(t){var n=t.unitPrice*t.refunded;e.itemPrices.push(n),e.totalAmount+=n}))},computed:{orderLineItems:function(){return this.paymentStatus.filter((function(e){return e.refunded>0}))},hasContent:function(){return this.orderLineItems.length>0},taxStatus:function(){return S(this.order,"taxStatus","")},unitPriceLabel:function(){return this.$tc("worldline.transaction-control.table.unitPrice")},linePriceLabel:function(){return"gross"===this.taxStatus?"sw-order.detailBase.columnTotalPriceGross":"sw-order.detailBase.columnTotalPriceNet"},getLineItemColumns:function(){var e=[{property:"quantity",dataIndex:"paid",label:"sw-order.detailBase.columnQuantity",allowResize:!1,align:"right",width:"100px"},{property:"label",dataIndex:"label",label:"sw-order.detailBase.columnProductName",allowResize:!1,primary:!0,multiLine:!0},{property:"unitPrice",dataIndex:"unitPrice",label:this.unitPriceLabel,allowResize:!1,align:"right",width:"120px"}];return[].concat(e,[{property:"totalPrice",dataIndex:"totalPrice",label:this.linePriceLabel,allowResize:!1,align:"right",width:"120px"}])}}});var C=Shopware,x=C.Component,I=C.Utils,L=I.get;I.format;x.register("mo-orders-canceled",{template:'\n \n \n\n \n\n \n \n\n \n
\n \n
\n\n
{{ $tc(\'worldline.transaction-control.table.empty\') }}
\n
',inject:["transactionsControl"],props:{order:{type:Object,required:!0},paymentStatus:{type:Array,required:!0}},data:function(){return{isLoading:!1,itemPrices:[],totalAmount:0}},mounted:function(){var e=this;this.orderLineItems.forEach((function(t){var n=t.unitPrice*t.canceled;e.itemPrices.push(n),e.totalAmount+=n}))},computed:{orderLineItems:function(){return this.paymentStatus.filter((function(e){return e.canceled>0}))},hasContent:function(){return this.orderLineItems.length>0},taxStatus:function(){return L(this.order,"taxStatus","")},unitPriceLabel:function(){return this.$tc("worldline.transaction-control.table.unitPrice")},linePriceLabel:function(){return"gross"===this.taxStatus?"sw-order.detailBase.columnTotalPriceGross":"sw-order.detailBase.columnTotalPriceNet"},getLineItemColumns:function(){var e=[{property:"quantity",dataIndex:"paid",label:"sw-order.detailBase.columnQuantity",allowResize:!1,align:"right",width:"100px"},{property:"label",dataIndex:"label",label:"sw-order.detailBase.columnProductName",allowResize:!1,primary:!0,multiLine:!0},{property:"unitPrice",dataIndex:"unitPrice",label:this.unitPriceLabel,allowResize:!1,align:"right",width:"120px"}];return[].concat(e,[{property:"totalPrice",dataIndex:"totalPrice",label:this.linePriceLabel,allowResize:!1,align:"right",width:"120px"}])}}});n("XyEW");Shopware.Component.override("sw-order-detail-base",{template:'{% block sw_order_detail_base_custom_fields %}\n {% parent() %}\n \n \n \n \n \n \n\n \n \n {{ $tc(\'worldline.check-status-button.button\') }}\n \n\n \n {{ $tc(\'worldline.transaction-control.buttons.adminPay\') }}\n \n \n \n{% endblock %}\n',inject:["transactionsControl"],data:function(){return{activeTab:"unprocessed",tabs:[{name:"unprocessed"},{name:"paid"},{name:"refunded"},{name:"canceled"}],transactionStatus:!1,transactionLogs:"",worldlinePaymentStatus:[],isLoading:!1,unwatchOrder:null,isUnpaidAdminOrder:!1,adminPayFinishUrl:"",adminPayErrorUrl:"",swAccessKey:"",isWorldlineOnlinePayment:!1,lockedButtons:!1,allowedAmounts:null}},created:function(){var e=this;this.unwatchOrder=this.$watch("order",(function(t){var n;null!=t&&null!==(n=t.lineItems)&&void 0!==n&&n.length&&e.initializePanel()}))},computed:{transactionId:function(){var e;return null===(e=this.order.customFields)||void 0===e?void 0:e.payment_transaction_id},paymentMethod:function(){return this.order.transactions.last().paymentMethod.customFields.worldline_payment_method_id},transactionStatusId:function(){var e;return null===(e=this.order.customFields)||void 0===e?void 0:e.payment_transaction_status},getOrderId:function(){return this.order.id},isAdminOrder:function(){return null!==this.order.createdBy},isNoTransactionPresent:function(){return!this.transactionId},isNoCompleteTransactionPresent:function(){return!!this.isNoTransactionPresent||0==this.transactionStatusId}},methods:{setActiveTab:function(e){this.activeTab=e.name},getPanelConfig:function(){var e=this;this.transactionsControl.getConfig({orderId:this.order.id}).then((function(t){e.adminPayFinishUrl=t.adminPayFinishUrl,e.adminPayErrorUrl=t.adminPayErrorUrl,e.isWorldlineOnlinePayment=t.isFullRedirectMethod,e.swAccessKey=t.swAccessKey})).finally((function(){e.isUnpaidAdminOrder=e.isAdminOrder&&e.isWorldlineOnlinePayment&&e.isNoCompleteTransactionPresent,e.statusCheck()}))},setInitialTab:function(){0===this.worldlinePaymentStatus.filter((function(e){return e.unprocessed>0})).length&&(this.worldlinePaymentStatus.filter((function(e){return e.paid>0})).length>0?this.activeTab="paid":this.worldlinePaymentStatus.filter((function(e){return e.refunded>0})).length>0?this.activeTab="refunded":this.worldlinePaymentStatus.filter((function(e){return e.canceled>0})).length>0&&(this.activeTab="canceled"))},initializePanel:function(){this.unwatchOrder(),this.getPanelConfig()},getValues:function(){var e=this;null!==this.transactionId?this.transactionsControl.enableButtons({transactionId:this.transactionId}).then((function(t){t.success?(e.worldlinePaymentStatus=t.worldlinePaymentStatus,e.transactionLogs=t.log,e.allowedAmounts=t.allowedAmounts,e.lockedButtons=t.worldlineLockButtons,e.setInitialTab(),e.transactionStatus=!0):e.createNotificationError({title:e.$tc("worldline.check-status-button.title"),message:e.$tc("worldline.check-status-button.error")+t.message})})).finally((function(){return e.isLoading=!1})):this.isLoading=!1},statusCheck:function(){var e=this;this.isLoading=!0,this.transactionsControl.statusCheck({transactionId:this.transactionId}).then((function(t){t.success?e.getValues():(e.isUnpaidAdminOrder||(e.transactionStatus=!1,e.createNotificationError({title:e.$tc("worldline.check-status-button.title"),message:e.$tc("worldline.check-status-button.error")+t.message})),e.isLoading=!1)}))},payByAdmin:function(){var e=this;this.isLoading=!0;var t={orderId:this.getOrderId,finishUrl:this.adminPayFinishUrl,errorUrl:this.adminPayErrorUrl};fetch("/store-api/handle-payment",{method:"POST",headers:{"Content-Type":"application/json","sw-access-key":this.swAccessKey},body:JSON.stringify(t)}).then((function(t){t.ok?t.json().then((function(e){var t=null,n=null;t=open(e.redirectUrl),n=setInterval((function(){t.closed&&(clearInterval(n),location.reload())}),500)})):(console.error(t),e.createNotificationError({title:e.$tc("worldline.check-status-button.title"),message:e.$tc("worldline.transaction-control.buttons.error")}))})).catch((function(t){console.error(t),e.createNotificationError({title:e.$tc("worldline.check-status-button.title"),message:e.$tc("worldline.check-status-button.error")+t})})).finally((function(){e.isLoading=!1}))}}});var A=n("rhm/"),T=n("mdsp");Shopware.Locale.extend("de-DE",A),Shopware.Locale.extend("en-GB",T)},SZ7m:function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},i=0;in.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(i=0;i2&&void 0!==arguments[2]?arguments[2]:"api-test";return r(this,u),c.call(this,e,t,n)}return t=u,(n=[{key:"check",value:function(e){var t=this.getBasicHeaders({});return this.httpClient.post("_action/".concat(this.getApiBasePath(),"/test-connection"),e,{headers:t}).then((function(e){return l.handleResponse(e)}))}},{key:"savemethod",value:function(e){var t=this.getBasicHeaders({});return this.httpClient.post("_action/".concat(this.getApiBasePath(),"/savemethod"),e,{headers:t}).then((function(e){return l.handleResponse(e)}))}}])&&i(t.prototype,n),s&&i(t,s),Object.defineProperty(t,"prototype",{writable:!1}),u}(l);u.addServiceProvider("apiTest",(function(e){var t=u.getContainer("init");return new d(t.httpClient,e.loginService)}))},mdsp:function(e){e.exports=JSON.parse('{"worldline":{"api-test-button":{"title":"API Test","success":"Connection test was successful.","error":"Connection could not be established. Please check the access data.","button":"Test connection"},"check-status-button":{"title":"Status check","success":"Status was successfully updated.","error":"Operation failed.","button":"Check status"},"capture-payment-button":{"title":"Capture payment","success":"Payment was successfully captured.","error":"Operation failed.","button":"Capture payment"},"cancel-payment-button":{"title":"Cancel payment","success":"Payment was successfully canceled.","error":"Operation failed.","button":"Cancel payment"},"refund-payment-button":{"title":"Refund payment","success":"Payment was successfully refunded.","error":"Operation failed.","button":"Refund payment"},"save-payment-card":{"label":"Save payment card","deleteButton":"Delete","deleted":"Card has been deleted."},"forwardToPaymentHandler":"Forwarding to payment handler.","errorWithConfirmRedirect":"Error. Redirecting to confirm page.","buildingOrder":"Building order","started":"Started","captureRequested":"Capture requested","gettingPaymentStatus":"Getting payment status","tryingToCapture":"Trying to capture","unsupportedStatus":"Unsupported status","operationIsNotPossibleDueToCurrentStatus":"Operation is not possible due to current status","maxAmountExceeded":"Maximum amount exceeded.","wrongAmountRequested":"Wrong amount requested.","gettingPaymentDetails":"Getting payment details","paymentOpen":"Payment is open","paymentInProgress":"Payment is in progress","paymentPaid":"Paid","paymentRefunded":"Payment refunded","paymentCanceled":"Payment cancelled","paymentFailed":"Payment failed","refundInProgress":"Refund in progress","cantFindCurrencyOfOrder":"Cannot find currency of order","statusUpdateError":"Status update error","statusUpdateRequestSent":"Status update request sent","noTransactionForThisOrder":"No transaction for this order","success":"Success","failed":"Operation failed.","worldline-order":{"detail":{"cardLabel":"Worldline transaction control","bundleSelectLabel":"Associated bundles","bundleSelectPlaceholder":"Add bundle..."}},"transactionStatus":{"refunded":"Refunded","cancelled":"Cancelled","captured":"Captured","created":"Created","rejected":"Rejected","rejectedCapture":"Capture rejected","cancellationDeclined":"Cancellation declined","redirected":"Redirected","pendingCapture":"Pending capture","authorizationRequested":"Authorization requested","captureRequested":"Capture requested","refundRequested":"Refund requested"},"payment-method-button":{"headline":"Payment Methods","subline":"Please select payment methods for your checkout","selectAll":"select / deselect all","save":"Save","request":"Requesting available payment methods...","requestEmpty":"No payment methods to display","title":"Get available payment methods","error":"Connection could not be established. Please check the access data.","success":"Changes successfully saved","errorAPI":"There was an error on save","APITitle":"Payment method saving"},"configFile":{"merchantId":"Merchant Id","apiKey":"API Key","aspSecret":"API Secret","webhookKey":"Webhook key","webhookSecret":"Webhook secret","liveEndpoint":"Live endpoint","sandboxEndpoint":"Sandbox endpoint","returnUrl":"Return URL","isLiveMode":"Is live mode","logLevel":"Log level","logLevelHint":"Choose the loglevel of non-error messages","logLevelDebug":"DEBUG","logLevelError":"ERROR","logLevelInfo":"INFO","automaticCapture":"Automatic capture","disabled":"Disabled","0_day":"Immediately","1_day":"In 1 day","2_day":"In 2 days","3_day":"In 3 days","4_day":"In 4 days","5_day":"In 5 days"},"composer":{"label":"Worldline Online Payments.","description":"Worldline Online Payments.","extraDescription":"Certified Worldline online payments extension for Shopware 6"},"transaction-control":{"logs":{"label":"Payment log","placeholder":"nothing here..."},"tabs":{"unprocessed":"Unprocessed","paid":"Paid","refunded":"Refunded","canceled":"Canceled"},"table":{"selected":"Selected","unitPrice":"Unit Price","empty":"No items with current status in order"},"buttons":{"adminPay":"Pay for order","error":"Something went wrong"}}}}')},n3ac:function(e,t,n){},nLnJ:function(e,t,n){},"rhm/":function(e){e.exports=JSON.parse('{"worldline":{"api-test-button":{"title":"API Test","success":"Verbindung wurde erfolgreich getestet.","error":"Verbindung konnte nicht hergestellt werden. Bitte prüfe die Zugangsdaten.","button":"Test Verbindung"},"payment-method-button":{"headline":"Zahlungsarten","subline":"Bitte Zahlungsarten für Ihren Checkout auswählen","selectAll":"alle auswählen / abwählen","save":"speichern","request":"Verfügbare Zahlungsarten werden abgerufen...","requestEmpty":"Keine Zahlungsarten zum Anzeigen gefunden","title":"Verfügbare Zahlungsmittel abrufen","error":"Verbindung konnte nicht hergestellt werden. Bitte überprüfen Sie die Zugangsdaten."}}}')},wXSU:function(e,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:"transactions-control";return r(this,u),c.call(this,e,t,n)}return t=u,(n=[{key:"statusCheck",value:function(e){var t=this.getBasicHeaders({});return this.httpClient.post("_action/".concat(this.getApiBasePath(),"/status"),e,{headers:t}).then((function(e){return l.handleResponse(e)}))}},{key:"capture",value:function(e){var t=this.getBasicHeaders({});return this.httpClient.post("_action/".concat(this.getApiBasePath(),"/capture"),e,{headers:t}).then((function(e){return l.handleResponse(e)}))}},{key:"cancel",value:function(e){var t=this.getBasicHeaders({});return this.httpClient.post("_action/".concat(this.getApiBasePath(),"/cancel"),e,{headers:t}).then((function(e){return l.handleResponse(e)}))}},{key:"refund",value:function(e){var t=this.getBasicHeaders({});return this.httpClient.post("_action/".concat(this.getApiBasePath(),"/refund"),e,{headers:t}).then((function(e){return l.handleResponse(e)}))}},{key:"enableButtons",value:function(e){var t=this.getBasicHeaders({});return this.httpClient.post("_action/".concat(this.getApiBasePath(),"/enableButtons"),e,{headers:t}).then((function(e){return l.handleResponse(e)}))}},{key:"getConfig",value:function(e){var t=this.getBasicHeaders({});return this.httpClient.post("_action/".concat(this.getApiBasePath(),"/getConfig"),e,{headers:t}).then((function(e){return l.handleResponse(e)}))}}])&&i(t.prototype,n),s&&i(t,s),Object.defineProperty(t,"prototype",{writable:!1}),u}(l);u.addServiceProvider("transactionsControl",(function(e){var t=u.getContainer("init");return new d(t.httpClient,e.loginService)}))}}); \ No newline at end of file