diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c4895f..6e21b2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ -# 6.1 +# 6.1.1 +- Fixed deprecated OrderNotFoundException + +# 6.1.0 - Fixed checkout issues after deactivating/activating plugin - Fixed plugin uninstall action - Fixed invoice payment method email function when order is shipped diff --git a/CHANGELOG_de-DE.md b/CHANGELOG_de-DE.md index a000e82..88c854d 100644 --- a/CHANGELOG_de-DE.md +++ b/CHANGELOG_de-DE.md @@ -1,4 +1,7 @@ -# 6.1 +# 6.1.1 +- Fixed deprecated OrderNotFoundException + +# 6.1.0 - Checkout-Probleme nach dem Deaktivieren/Aktivieren des Plugins behoben - Plugin-Deinstallationsaktion behoben - Die E-Mail-Funktion für die Rechnungszahlungsmethode beim Versand der Bestellung wurde korrigiert diff --git a/README.md b/README.md index 7eb7a57..3065d64 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ tail -f var/log/wallee_payment*.log ## Documentation -[Documentation](https://plugin-documentation.wallee.com/wallee-payment/shopware-6/master/docs/en/documentation.html) +[Documentation](https://plugin-documentation.wallee.com/wallee-payment/shopware-6/6.1.1/docs/en/documentation.html) ## License diff --git a/bin/release.php b/bin/release.php new file mode 100644 index 0000000..872edbe --- /dev/null +++ b/bin/release.php @@ -0,0 +1,47 @@ +pushHandler((new StreamHandler('php://stdout'))->setFormatter($formatter)); + +$composerJsonData = json_decode(file_get_contents(COMPOSER_JSON_DEST), true); +$composerJsonData['require']['shopware/core'] = SHOPWARE_VERSIONS; +$composerJsonData['require']['shopware/storefront'] = SHOPWARE_VERSIONS; + +switch ($release_env) { + case RELEASE_GIT_ENV: + exec('composer require wallee/sdk 4.0.2 -d /var/www/shopware.local'); + $composerJsonData['require']['wallee/sdk'] = '4.0.2'; + break; + case RELEASE_SW_ENV: + exec('composer require wallee/sdk 4.0.2 -d /var/www/shopware.local/custom/plugins/WalleePayment'); + break; +} + +$composerJsonData['version'] = '6.1.1'; + +$logger->info('Adding shopware/core and shopware/storefront to the composer.json.'); +file_put_contents( + TMP_DIR . '/composer.json', + json_encode($composerJsonData, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) +); +chdir(TMP_DIR); +exec('rm -fr composer.lock'); +exec('rm -fr bin'); \ No newline at end of file diff --git a/docs/en/documentation.html b/docs/en/documentation.html index 3187b9c..25b05bf 100644 --- a/docs/en/documentation.html +++ b/docs/en/documentation.html @@ -5,7 +5,7 @@ - + wallee Shopware 6 Documentation @@ -23,7 +23,7 @@

Documentation

  • - + Source
  • diff --git a/src/Core/Api/Transaction/Service/OrderMailService.php b/src/Core/Api/Transaction/Service/OrderMailService.php index 655b770..556c7f5 100644 --- a/src/Core/Api/Transaction/Service/OrderMailService.php +++ b/src/Core/Api/Transaction/Service/OrderMailService.php @@ -6,7 +6,7 @@ use Psr\Log\LoggerInterface; use Shopware\Core\{ Checkout\Cart\Event\CheckoutOrderPlacedEvent, - Checkout\Cart\Exception\OrderNotFoundException, + Checkout\Cart\CartException, Checkout\Order\OrderEntity, Content\MailTemplate\MailTemplateEntity, Content\Mail\Service\AbstractMailService, @@ -128,8 +128,8 @@ public function send(string $orderId, Context $context): void protected function getTransactionEntityByOrderId(string $orderId, Context $context): TransactionEntity { return $this->container->get(TransactionEntityDefinition::ENTITY_NAME . '.repository') - ->search(new Criteria([$orderId]), $context) - ->get($orderId); + ->search(new Criteria([$orderId]), $context) + ->get($orderId); } /** @@ -165,7 +165,7 @@ protected function getOrder(string $orderId, Context $context): OrderEntity /** @var OrderEntity|null $order */ $order = $this->container->get('order.repository')->search($orderCriteria, $context)->first(); if (is_null($order)) { - throw new OrderNotFoundException($orderId); + throw CartException::orderNotFound($orderId); } return $order; } @@ -258,4 +258,4 @@ protected function markTransactionEntityConfirmationEmailAsSent(string $orderId, { $this->container->get(TransactionEntityDefinition::ENTITY_NAME . '.repository')->upsert([['id' => $orderId, 'confirmationEmailSent' => true]], $context); } -} \ No newline at end of file +} diff --git a/src/Core/Api/Transaction/Service/TransactionService.php b/src/Core/Api/Transaction/Service/TransactionService.php index 34d0cf2..8fac0ba 100644 --- a/src/Core/Api/Transaction/Service/TransactionService.php +++ b/src/Core/Api/Transaction/Service/TransactionService.php @@ -4,7 +4,8 @@ use Psr\Container\ContainerInterface; use Psr\Log\LoggerInterface; -use Shopware\Core\{Checkout\Cart\Exception\OrderNotFoundException, +use Shopware\Core\{ + Checkout\Cart\CartException, Checkout\Cart\LineItem\LineItem, Checkout\Order\OrderEntity, Checkout\Payment\Cart\AsyncPaymentTransactionStruct, @@ -15,7 +16,8 @@ }; use Shopware\Storefront\Page\Checkout\Confirm\CheckoutConfirmPageLoadedEvent; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Wallee\Sdk\{Model\AddressCreate, +use Wallee\Sdk\{ + Model\AddressCreate, Model\ChargeAttempt, Model\CreationEntityState, Model\CriteriaOperator, @@ -29,7 +31,8 @@ Model\TransactionCreate, Model\TransactionPending }; -use WalleePayment\Core\{Api\OrderDeliveryState\Handler\OrderDeliveryStateHandler, +use WalleePayment\Core\{ + Api\OrderDeliveryState\Handler\OrderDeliveryStateHandler, Api\Refund\Entity\RefundEntityCollection, Api\Refund\Entity\RefundEntityDefinition, Api\Transaction\Entity\TransactionEntity, @@ -338,11 +341,11 @@ private function getOrderEntity(string $orderId, Context $context): OrderEntity $context )->first(); if (is_null($order)) { - throw new OrderNotFoundException($orderId); + throw CartException::orderNotFound($orderId); } return $order; } catch (\Exception $e) { - throw new OrderNotFoundException($orderId); + throw CartException::orderNotFound($orderId); } } diff --git a/src/Core/Api/WebHooks/Controller/WebHookController.php b/src/Core/Api/WebHooks/Controller/WebHookController.php index fcd6b4e..323590c 100644 --- a/src/Core/Api/WebHooks/Controller/WebHookController.php +++ b/src/Core/Api/WebHooks/Controller/WebHookController.php @@ -7,7 +7,7 @@ TransactionIsolationLevel}; use Psr\Log\LoggerInterface; use Shopware\Core\{ - Checkout\Cart\Exception\OrderNotFoundException, + Checkout\Cart\CartException, Checkout\Order\Aggregate\OrderDelivery\OrderDeliveryEntity, Checkout\Order\Aggregate\OrderTransaction\OrderTransactionEntity, Checkout\Order\Aggregate\OrderTransaction\OrderTransactionStateHandler, @@ -23,7 +23,8 @@ use Shopware\Core\Checkout\Order\OrderStates; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Shopware\Core\Framework\Log\Package; -use Symfony\Component\{HttpFoundation\JsonResponse, +use Symfony\Component\{ + HttpFoundation\JsonResponse, HttpFoundation\ParameterBag, HttpFoundation\Request, HttpFoundation\Response, @@ -312,7 +313,7 @@ public function updateRefund(WebHookRequest $callBackData, Context $context): Re } $status = Response::HTTP_OK; - } catch (OrderNotFoundException $exception) { + } catch (CartException $exception) { $status = Response::HTTP_OK; $this->logger->info(__CLASS__ . ' : ' . __FUNCTION__ . ' : ' . $exception->getMessage(), $callBackData->jsonSerialize()); } catch (IllegalTransitionException $exception) { @@ -363,7 +364,7 @@ private function executeLocked(string $orderId, Context $context, callable $oper $order = $this->container->get('order.repository')->search(new Criteria([$orderId]), $context)->first(); if(empty($order)){ - throw new OrderNotFoundException($orderId); + throw CartException::orderNotFound($orderId); } $this->container->get('order.repository')->upsert([$data], $context); @@ -411,10 +412,10 @@ private function getOrderEntity(string $orderId, Context $context): OrderEntity $context )->first(); if (is_null($this->orderEntity)) { - throw new OrderNotFoundException($orderId); + throw CartException::orderNotFound($orderId); } } catch (\Exception $e) { - throw new OrderNotFoundException($orderId); + throw CartException::orderNotFound($orderId); } } @@ -478,7 +479,7 @@ private function updateTransaction(WebHookRequest $callBackData, Context $contex }); } $status = Response::HTTP_OK; - } catch (OrderNotFoundException $exception) { + } catch (CartException $exception) { $status = Response::HTTP_OK; $this->logger->info(__CLASS__ . ' : ' . __FUNCTION__ . ' : ' . $exception->getMessage(), $callBackData->jsonSerialize()); } catch (IllegalTransitionException $exception) { @@ -556,7 +557,7 @@ public function updateTransactionInvoice(WebHookRequest $callBackData, Context $ }); } $status = Response::HTTP_OK; - } catch (OrderNotFoundException $exception) { + } catch (CartException $exception) { $status = Response::HTTP_OK; $this->logger->info(__CLASS__ . ' : ' . __FUNCTION__ . ' : ' . $exception->getMessage(), $callBackData->jsonSerialize()); } catch (IllegalTransitionException $exception) { diff --git a/src/Core/Storefront/Checkout/Controller/CheckoutController.php b/src/Core/Storefront/Checkout/Controller/CheckoutController.php index 368975e..4ddcbb4 100644 --- a/src/Core/Storefront/Checkout/Controller/CheckoutController.php +++ b/src/Core/Storefront/Checkout/Controller/CheckoutController.php @@ -5,8 +5,7 @@ use Psr\Log\LoggerInterface; use Shopware\Core\{ Checkout\Cart\Cart, - Checkout\Cart\Exception\CustomerNotLoggedInException, - Checkout\Cart\Exception\OrderNotFoundException, + Checkout\Cart\CartException, Checkout\Cart\LineItemFactoryRegistry, Checkout\Cart\SalesChannel\CartService, Checkout\Order\Aggregate\OrderLineItem\OrderLineItemCollection, @@ -320,14 +319,14 @@ private function getOrder(Request $request, SalesChannelContext $salesChannelCon ->load(new Request(), $salesChannelContext, $criteria) ->getOrders(); } catch (InvalidUuidException $e) { - throw new OrderNotFoundException($orderId); + throw CartException::orderNotFound($orderId); } /** @var OrderEntity|null $order */ $order = $searchResult->get($orderId); if (!$order) { - throw new OrderNotFoundException($orderId); + throw CartException::orderNotFound($orderId); } return $order; diff --git a/src/Resources/public/administration/css/wallee-payment.css b/src/Resources/public/administration/css/wallee-payment.css deleted file mode 100644 index 6b27f04..0000000 --- a/src/Resources/public/administration/css/wallee-payment.css +++ /dev/null @@ -1 +0,0 @@ -.sw-order-detail .sw-tabs{margin-top:40px}.sw-order-detail .sw-order-detail-base .sw-card-view__content{overflow-x:visible;overflow-y:visible}.wallee-order-detail__data{display:grid}.wallee-order-detail__heading{padding-top:15px} \ No newline at end of file diff --git a/src/Resources/public/administration/js/wallee-payment.js b/src/Resources/public/administration/js/wallee-payment.js deleted file mode 100644 index 54ff1aa..0000000 --- a/src/Resources/public/administration/js/wallee-payment.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(t){var e={};function n(a){if(e[a])return e[a].exports;var r=e[a]={i:a,l:!1,exports:{}};return t[a].call(r.exports,r,r.exports,n),r.l=!0,r.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 r in t)n.d(a,r,function(e){return t[e]}.bind(null,r));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=(window.__sw__.assetPath + '/bundles/walleepayment/'),n(n.s="KexP")}({"9im/":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"},"customerId":"Customer ID","customerName":"Customer Name","creditCardHolder":"Kreditkarteninhaber","paymentMethod":"Zahlungsart","paymentMethodBrand":"Marke der Zahlungsmethode","PseudoCreditCardNumber":"Pseudo-Kreditkartennummer","CardExpire":"Karte verfällt"},"voidAction":{"confirm":{"button":{"cancel":"Nein","confirm":"Autorisierung aufheben"},"message":"Wollen Sie diese Zahlung wirklich stornieren?"},"successMessage":"Die Zahlung wurde erfolgreich annulliert","successTitle":"Erfolg"}}}')},Gbpi: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"},"customerId":"Customer ID","customerName":"Customer Name","creditCardHolder":"Proprietario della carta di credito","paymentMethod":"Metodo di pagamento","paymentMethodBrand":"Metodo di pagamento Marca","PseudoCreditCardNumber":"Numero di carta di credito pseudo","CardExpire":"La carta scade"},"voidAction":{"confirm":{"button":{"cancel":"No","confirm":"Annulla autorizzazione"},"message":"Vuoi davvero annullare questo pagamento?"},"successMessage":"Il pagamento è stato annullato con successo.","successTitle":"Successo"}}}')},KexP:function(t,e,n){"use strict";n.r(e);n("wkJ+");var a=Shopware,r=a.Component,o=a.Context,i=Shopware.Data.Criteria;r.override("sw-order-detail",{template:'{% block sw_order_detail_content_tabs_general %}\n {% parent %}\n\n\n\t{{ $tc(\'wallee-order.header\') }}\n\n{% endblock %}\n\n{% block sw_order_detail_actions_slot_smart_bar_actions %}\n\n{% endblock %}\n',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 i(1,1);n.addAssociation("transactions"),e.get(this.orderId,o.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,o.api).then((function(t){e.isWalleePayment="handler_walleepayment_walleepaymenthandler"===t.formattedHandlerIdentifier}))}}});var l=Shopware,s=l.Component,c=l.Mixin,u=l.Filter,d=l.Utils;s.register("wallee-order-action-completion",{template:'{% 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',inject:["WalleeTransactionCompletionService"],mixins:[c.getByName("notification")],props:{transactionData:{type:Object,required:!0}},data:function(){return{isLoading:!0,isCompletion:!1}},computed:{dateFilter:function(){return u.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(d.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(d.createId()))}))}})))}}});var p=Shopware,f=p.Component,m=p.Mixin,h=p.Filter,g=p.Utils;f.register("wallee-order-action-refund",{template:'{% 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',inject:["WalleeRefundService"],mixins:[m.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 h.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(g.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(g.createId()))}))}}))}}});var y=Shopware,b=y.Component,w=y.Mixin,_=y.Filter,v=y.Utils;b.register("wallee-order-action-refund-by-amount",{template:'{% 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',inject:["WalleeRefundService"],mixins:[w.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 _.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(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 I=Shopware,C=I.Component,O=I.Mixin,S=I.Filter,E=I.Utils;C.register("wallee-order-action-void",{template:'{% 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',inject:["WalleeTransactionVoidService"],mixins:[O.getByName("notification")],props:{transactionData:{type:Object,required:!0}},data:function(){return{isLoading:!0,isVoid:!1}},computed:{dateFilter:function(){return S.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(E.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(E.createId()))}))}})))}}});n("KgPH");var N=Shopware,T=N.Component,D=N.Mixin,A=N.Filter,P=N.Context,k=N.Utils,F=Shopware.Data.Criteria;T.register("wallee-order-detail",{template:'{% 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',inject:["WalleeTransactionService","WalleeRefundService","repositoryFactory"],mixins:[D.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 A.getByName("date")},relatedResourceColumns:function(){return[{property:"paymentMethodName",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 F(1,1);n.addAssociation("transactions"),n.getAssociation("transactions").addSorting(F.sort("createdAt","DESC")),e.get(this.orderId,P.api,n).then((function(e){t.order=e,t.isLoading=!1;var n=0,a=0,r=e.transactions[0].customFields.wallee_transaction_id;t.WalleeTransactionService.getTransactionData(e.salesChannelId,r).then((function(e){t.currency=e.transactions[0].currency,e.transactions[0].authorized_amount=k.format.currency(e.transactions[0].authorizationAmount,t.currency),e.refunds.forEach((function(e){a=parseFloat(parseFloat(a)+parseFloat(e.amount)),e.amount=k.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=k.format.currency(e.amountIncludingTax,t.currency),e.taxAmount=k.format.currency(e.taxAmount,t.currency),n=parseFloat(parseFloat(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(k.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(k.createId()))}))}}))}}});var x=n("9im/"),L=n("SCVZ"),$=n("XHyG"),R=n("Gbpi");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":x,"en-GB":L,"fr-FR":$,"it-IT":R},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("p0/N");var j="WalleePayment.config",B={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 M(t){return(M="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 G(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 W(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==M(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var a=n.call(t,e||"default");if("object"!==M(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===M(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var V=Shopware,q=V.Component,U=V.Mixin;q.register("wallee-settings",{template:'{% 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 %}',inject:["WalleeConfigurationService"],mixins:[U.getByName("notification")],data:function(){return function(t){for(var e=1;e\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\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{{ $tc(\'wallee-settings.settingForm.credentials.button.label\') }}\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t
    \n\t\t{% endblock %}\n\t\n\n{% endblock %}\n',name:"WalleeCredentials",mixins:[Z.getByName("notification")],props:{actualConfigData:{type:Object,required:!0},allConfigs:{type:Object,required:!0},selectedSalesChannelId:{required:!0},spaceIdFilled:{type:Boolean,required:!0},spaceIdErrorState:{required:!0},userIdFilled:{type:Boolean,required:!0},userIdErrorState:{required:!0},applicationKeyFilled:{type:Boolean,required:!0},applicationKeyErrorState:{required:!0},isLoading:{type:Boolean,required:!0},isTesting:{type:Boolean,required:!1},isShowcase:{type:Boolean,required:!0}},data:function(){return function(t){for(var e=1;e\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',name:"WalleeOptions",mixins:[at.getByName("notification")],props:{actualConfigData:{type:Object,required:!0},allConfigs:{type:Object,required:!0},selectedSalesChannelId:{required:!0},isLoading:{type:Boolean,required:!0}},data:function(){return function(t){for(var e=1;e\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'});function rt(t){return(rt="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 ot(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 it(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==rt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var a=n.call(t,e||"default");if("object"!==rt(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===rt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var lt=Shopware,st=lt.Component,ct=lt.Mixin;st.register("sw-wallee-storefront-options",{template:'\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',name:"WalleeStorefrontOptions",mixins:[ct.getByName("notification")],props:{actualConfigData:{type:Object,required:!0},allConfigs:{type:Object,required:!0},selectedSalesChannelId:{required:!0},isLoading:{type:Boolean,required:!0}},data:function(){return function(t){for(var e=1;e\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',name:"WalleeAdvancedOptions",mixins:[ht.getByName("notification")],props:{actualConfigData:{type:Object,required:!0},allConfigs:{type:Object,required:!0},selectedSalesChannelId:{required:!0},isLoading:{type:Boolean,required:!0}},data:function(){return function(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:"wallee";return yt(this,o),r.call(this,t,e,n)}return e=o,(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 Ct.handleResponse(t)}))}},{key:"checkApiConnection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.getBasicHeaders(),r="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/configuration/check-api-connection");return this.httpClient.post(r,{spaceId:t,userId:e,applicationId:n},{headers:a}).then((function(t){return Ct.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 Ct.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 Ct.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 Ct.handleResponse(t)}))}}])&&bt(e.prototype,n),a&&bt(e,a),Object.defineProperty(e,"prototype",{writable:!1}),o}(Ct);function St(t){return(St="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 Et(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nt(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"wallee";return Et(this,o),r.call(this,t,e,n)}return e=o,(n=[{key:"createRefund",value:function(t,e,n,a){var r=this.getBasicHeaders(),o="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/refund/create-refund/");return this.httpClient.post(o,{salesChannelId:t,transactionId:e,quantity:n,lineItemId:a},{headers:r}).then((function(t){return kt.handleResponse(t)}))}},{key:"createRefundByAmount",value:function(t,e,n){var a=this.getBasicHeaders(),r="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/refund/create-refund-by-amount/");return this.httpClient.post(r,{salesChannelId:t,transactionId:e,refundableAmount:n},{headers:a}).then((function(t){return kt.handleResponse(t)}))}}])&&Nt(e.prototype,n),a&&Nt(e,a),Object.defineProperty(e,"prototype",{writable:!1}),o}(kt);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 Lt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"wallee";return Lt(this,o),r.call(this,t,e,n)}return e=o,(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 Gt.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)}}])&&$t(e.prototype,n),a&&$t(e,a),Object.defineProperty(e,"prototype",{writable:!1}),o}(Gt);function Vt(t){return(Vt="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 qt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ut(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"wallee";return qt(this,o),r.call(this,t,e,n)}return e=o,(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 Qt.handleResponse(t)}))}}])&&Ut(e.prototype,n),a&&Ut(e,a),Object.defineProperty(e,"prototype",{writable:!1}),o}(Qt);function Jt(t){return(Jt="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 Xt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function te(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"wallee";return Xt(this,o),r.call(this,t,e,n)}return e=o,(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)}))}}])&&te(e.prototype,n),a&&te(e,a),Object.defineProperty(e,"prototype",{writable:!1}),o}(oe),le=Shopware.Application;le.addServiceProvider("WalleeConfigurationService",(function(t){var e=le.getContainer("init");return new Ot(e.httpClient,t.loginService)})),le.addServiceProvider("WalleeRefundService",(function(t){var e=le.getContainer("init");return new Ft(e.httpClient,t.loginService)})),le.addServiceProvider("WalleeTransactionService",(function(t){var e=le.getContainer("init");return new Wt(e.httpClient,t.loginService)})),le.addServiceProvider("WalleeTransactionCompletionService",(function(t){var e=le.getContainer("init");return new Zt(e.httpClient,t.loginService)})),le.addServiceProvider("WalleeTransactionVoidService",(function(t){var e=le.getContainer("init");return new ie(e.httpClient,t.loginService)}))},KgPH:function(t,e,n){var a=n("y2WZ");a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);(0,n("P8hj").default)("171b434e",a,!0,{})},P8hj:function(t,e,n){"use strict";function a(t,e){for(var n=[],a={},r=0;rn.parts.length&&(a.parts.length=n.parts.length)}else{var i=[];for(r=0;r\\n\\t{{ $tc('wallee-order.header') }}\\n\\n{% endblock %}\\n\\n{% block sw_order_detail_actions_slot_smart_bar_actions %}\\n\\n{% endblock %}\\n\";","/* global Shopware */\n\nimport template from './sw-order.html.twig';\nimport './sw-order.scss';\n\nconst {Component, Context} = Shopware;\nconst Criteria = Shopware.Data.Criteria;\n\nconst walleeFormattedHandlerIdentifier = 'handler_walleepayment_walleepaymenthandler';\n\nComponent.override('sw-order-detail', {\n\ttemplate,\n\n\tdata() {\n\t\treturn {\n\t\t\tisWalleePayment: false\n\t\t};\n\t},\n\n\tcomputed: {\n\t\tisEditable() {\n\t\t\treturn !this.isWalleePayment || this.$route.name !== 'wallee.order.detail';\n\t\t},\n\t\tshowTabs() {\n\t\t\treturn true;\n\t\t}\n\t},\n\n\twatch: {\n\t\torderId: {\n\t\t\tdeep: true,\n\t\t\thandler() {\n\t\t\t\tif (!this.orderId) {\n\t\t\t\t\tthis.setIsWalleePayment(null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst orderRepository = this.repositoryFactory.create('order');\n\t\t\t\tconst orderCriteria = new Criteria(1, 1);\n\t\t\t\torderCriteria.addAssociation('transactions');\n\n\t\t\t\torderRepository.get(this.orderId, Context.api, orderCriteria).then((order) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\t(order.amountTotal <= 0) ||\n\t\t\t\t\t\t(order.transactions.length <= 0) ||\n\t\t\t\t\t\t!order.transactions[0].paymentMethodId\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.setIsWalleePayment(null);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst paymentMethodId = order.transactions[0].paymentMethodId;\n\t\t\t\t\tif (paymentMethodId !== undefined && paymentMethodId !== null) {\n\t\t\t\t\t\tthis.setIsWalleePayment(paymentMethodId);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t\timmediate: true\n\t\t}\n\t},\n\n\tmethods: {\n\t\tsetIsWalleePayment(paymentMethodId) {\n\t\t\tif (!paymentMethodId) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst paymentMethodRepository = this.repositoryFactory.create('payment_method');\n\t\t\tpaymentMethodRepository.get(paymentMethodId, Context.api).then(\n\t\t\t\t(paymentMethod) => {\n\t\t\t\t\tthis.isWalleePayment = (paymentMethod.formattedHandlerIdentifier === walleeFormattedHandlerIdentifier);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n});\n","export default \"{% 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\";","/* global Shopware */\n\nimport template from './index.html.twig';\n\nconst {Component, Mixin, Filter, Utils} = Shopware;\n\nComponent.register('wallee-order-action-completion', {\n\n\ttemplate: template,\n\n\tinject: ['WalleeTransactionCompletionService'],\n\n\tmixins: [\n\t\tMixin.getByName('notification')\n\t],\n\n\tprops: {\n\t\ttransactionData: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tisLoading: true,\n\t\t\tisCompletion: false\n\t\t};\n\t},\n\n\tcomputed: {\n\t\tdateFilter() {\n\t\t\treturn Filter.getByName('date');\n\t\t}\n\t},\n\n\tcreated() {\n\t\tthis.createdComponent();\n\t},\n\n\tmethods: {\n\t\tcreatedComponent() {\n\t\t\tthis.isLoading = false;\n\t\t},\n\n\t\tcompletion() {\n\t\t\tif (this.isCompletion) {\n\t\t\t\tthis.isLoading = true;\n\t\t\t\tthis.WalleeTransactionCompletionService.createTransactionCompletion(\n\t\t\t\t\tthis.transactionData.transactions[0].metaData.salesChannelId,\n\t\t\t\t\tthis.transactionData.transactions[0].id\n\t\t\t\t).then(() => {\n\t\t\t\t\tthis.createNotificationSuccess({\n\t\t\t\t\t\ttitle: this.$tc('wallee-order.captureAction.successTitle'),\n\t\t\t\t\t\tmessage: this.$tc('wallee-order.captureAction.successMessage')\n\t\t\t\t\t});\n\t\t\t\t\tthis.isLoading = false;\n\t\t\t\t\tthis.$emit('modal-close');\n\t\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t\tthis.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n\t\t\t\t\t});\n\t\t\t\t}).catch((errorResponse) => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\ttitle: errorResponse.response.data.errors[0].title,\n\t\t\t\t\t\t\tmessage: errorResponse.response.data.errors[0].detail,\n\t\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\ttitle: errorResponse.title,\n\t\t\t\t\t\t\tmessage: errorResponse.message,\n\t\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t\t});\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tthis.isLoading = false;\n\t\t\t\t\t\tthis.$emit('modal-close');\n\t\t\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t\t\tthis.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n});\n","export default \"{% 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\";","/* global Shopware */\n\nimport template from './index.html.twig';\n\nconst {Component, Mixin, Filter, Utils} = Shopware;\n\nComponent.register('wallee-order-action-refund', {\n\ttemplate,\n\n\tinject: ['WalleeRefundService'],\n\n\tmixins: [\n\t\tMixin.getByName('notification')\n\t],\n\n\tprops: {\n\t\ttransactionData: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\n\t\torderId: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\trefundQuantity: 1,\n\t\t\ttransactionData: {},\n\t\t\tisLoading: true,\n\t\t\tcurrentLineItem: '',\n\t\t};\n\t},\n\n\tcomputed: {\n\t\tdateFilter() {\n\t\t\treturn Filter.getByName('date');\n\t\t}\n\t},\n\n\tcreated() {\n\t\tthis.createdComponent();\n\t},\n\n\tmethods: {\n\t\tcreatedComponent() {\n\t\t\tthis.isLoading = false;\n\t\t},\n\n\t\trefund() {\n\t\t\tthis.isLoading = true;\n\t\t\tthis.WalleeRefundService.createRefund(\n\t\t\t\tthis.transactionData.transactions[0].metaData.salesChannelId,\n\t\t\t\tthis.transactionData.transactions[0].id,\n\t\t\t\tthis.refundQuantity,\n\t\t\t\tthis.$parent.currentLineItem\n\t\t\t).then(() => {\n\t\t\t\tthis.createNotificationSuccess({\n\t\t\t\t\ttitle: this.$tc('wallee-order.refundAction.successTitle'),\n\t\t\t\t\tmessage: this.$tc('wallee-order.refundAction.successMessage')\n\t\t\t\t});\n\t\t\t\tthis.isLoading = false;\n\t\t\t\tthis.$emit('modal-close');\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\tthis.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n\t\t\t\t});\n\t\t\t}).catch((errorResponse) => {\n\t\t\t\ttry {\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\ttitle: errorResponse.response.data.errors[0].title,\n\t\t\t\t\t\tmessage: errorResponse.response.data.errors[0].detail,\n\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t});\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\ttitle: errorResponse.title,\n\t\t\t\t\t\tmessage: errorResponse.message,\n\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t});\n\t\t\t\t} finally {\n\t\t\t\t\tthis.isLoading = false;\n\t\t\t\t\tthis.$emit('modal-close');\n\t\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t\tthis.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n});\n","export default \"{% 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\";","/* global Shopware */\n\nimport template from './index.html.twig';\n\nconst {Component, Mixin, Filter, Utils} = Shopware;\n\nComponent.register('wallee-order-action-refund-by-amount', {\n\ttemplate,\n\n\tinject: ['WalleeRefundService'],\n\n\tmixins: [\n\t\tMixin.getByName('notification')\n\t],\n\n\tprops: {\n\t\ttransactionData: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\n\t\torderId: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tisLoading: true,\n\t\t\tcurrency: this.transactionData.transactions[0].currency,\n\t\t\trefundAmount: 0,\n\t\t\trefundableAmount: 0,\n\t\t};\n\t},\n\n\tcomputed: {\n\t\tdateFilter() {\n\t\t\treturn Filter.getByName('date');\n\t\t}\n\t},\n\n\tcreated() {\n\t\tthis.createdComponent();\n\t},\n\n\tmethods: {\n\t\tcreatedComponent() {\n\t\t\tthis.isLoading = false;\n\t\t\tthis.currency = this.transactionData.transactions[0].currency;\n\t\t\tthis.refundAmount = Number(this.transactionData.transactions[0].amountIncludingTax);\n\t\t\tthis.refundableAmount = Number(this.transactionData.transactions[0].amountIncludingTax);\n\t\t},\n\n\t\trefundByAmount() {\n\t\t\tthis.isLoading = true;\n\t\t\tthis.WalleeRefundService.createRefundByAmount(\n\t\t\t\tthis.transactionData.transactions[0].metaData.salesChannelId,\n\t\t\t\tthis.transactionData.transactions[0].id,\n\t\t\t\tthis.refundAmount\n\t\t\t).then(() => {\n\t\t\t\tthis.createNotificationSuccess({\n\t\t\t\t\ttitle: this.$tc('wallee-order.refundAction.successTitle'),\n\t\t\t\t\tmessage: this.$tc('wallee-order.refundAction.successMessage')\n\t\t\t\t});\n\t\t\t\tthis.isLoading = false;\n\t\t\t\tthis.$emit('modal-close');\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\tthis.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n\t\t\t\t});\n\t\t\t}).catch((errorResponse) => {\n\t\t\t\ttry {\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\ttitle: errorResponse.response.data.errors[0].title,\n\t\t\t\t\t\tmessage: errorResponse.response.data.errors[0].detail,\n\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t});\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\ttitle: errorResponse.title,\n\t\t\t\t\t\tmessage: errorResponse.message,\n\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t});\n\t\t\t\t} finally {\n\t\t\t\t\tthis.isLoading = false;\n\t\t\t\t\tthis.$emit('modal-close');\n\t\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t\tthis.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n});\n","export default \"{% 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\";","/* global Shopware */\n\nimport template from './index.html.twig';\n\nconst {Component, Mixin, Filter, Utils} = Shopware;\n\nComponent.register('wallee-order-action-void', {\n\ttemplate,\n\n\tinject: ['WalleeTransactionVoidService'],\n\n\tmixins: [\n\t\tMixin.getByName('notification')\n\t],\n\n\tprops: {\n\t\ttransactionData: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tisLoading: true,\n\t\t\tisVoid: false\n\t\t};\n\t},\n\n\tcomputed: {\n\t\tdateFilter() {\n\t\t\treturn Filter.getByName('date');\n\t\t},\n\t\tlineItemColumns() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tproperty: 'uniqueId',\n\t\t\t\t\tlabel: this.$tc('wallee-order.refund.types.uniqueId'),\n\t\t\t\t\trawData: false,\n\t\t\t\t\tallowResize: true,\n\t\t\t\t\tprimary: true,\n\t\t\t\t\twidth: 'auto'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'name',\n\t\t\t\t\tlabel: this.$tc('wallee-order.refund.types.name'),\n\t\t\t\t\trawData: true,\n\t\t\t\t\tallowResize: true,\n\t\t\t\t\tsortable: true,\n\t\t\t\t\twidth: 'auto'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'quantity',\n\t\t\t\t\tlabel: this.$tc('wallee-order.refund.types.quantity'),\n\t\t\t\t\trawData: true,\n\t\t\t\t\tallowResize: true,\n\t\t\t\t\twidth: 'auto'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'amountIncludingTax',\n\t\t\t\t\tlabel: this.$tc('wallee-order.refund.types.amountIncludingTax'),\n\t\t\t\t\trawData: true,\n\t\t\t\t\tallowResize: true,\n\t\t\t\t\tinlineEdit: 'string',\n\t\t\t\t\twidth: 'auto'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'type',\n\t\t\t\t\tlabel: this.$tc('wallee-order.refund.types.type'),\n\t\t\t\t\trawData: true,\n\t\t\t\t\tallowResize: true,\n\t\t\t\t\tsortable: true,\n\t\t\t\t\twidth: 'auto'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'taxAmount',\n\t\t\t\t\tlabel: this.$tc('wallee-order.refund.types.taxAmount'),\n\t\t\t\t\trawData: true,\n\t\t\t\t\tallowResize: true,\n\t\t\t\t\twidth: 'auto'\n\t\t\t\t}\n\t\t\t];\n\t\t}\n\t},\n\n\tcreated() {\n\t\tthis.createdComponent();\n\t},\n\n\tmethods: {\n\t\tcreatedComponent() {\n\t\t\tthis.isLoading = false;\n\t\t\tthis.currency = this.transactionData.transactions[0].currency;\n\t\t\tthis.refundableAmount = this.transactionData.transactions[0].amountIncludingTax;\n\t\t\tthis.refundAmount = this.transactionData.transactions[0].amountIncludingTax;\n\t\t},\n\n\t\tvoidPayment() {\n\t\t\tif (this.isVoid) {\n\t\t\t\tthis.isLoading = true;\n\t\t\t\tthis.WalleeTransactionVoidService.createTransactionVoid(\n\t\t\t\t\tthis.transactionData.transactions[0].metaData.salesChannelId,\n\t\t\t\t\tthis.transactionData.transactions[0].id\n\t\t\t\t).then(() => {\n\t\t\t\t\tthis.createNotificationSuccess({\n\t\t\t\t\t\ttitle: this.$tc('wallee-order.voidAction.successTitle'),\n\t\t\t\t\t\tmessage: this.$tc('wallee-order.voidAction.successMessage')\n\t\t\t\t\t});\n\t\t\t\t\tthis.isLoading = false;\n\t\t\t\t\tthis.$emit('modal-close');\n\t\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t\tthis.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n\t\t\t\t\t});\n\t\t\t\t}).catch((errorResponse) => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\ttitle: errorResponse.response.data.errors[0].title,\n\t\t\t\t\t\t\tmessage: errorResponse.response.data.errors[0].detail,\n\t\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\ttitle: errorResponse.title,\n\t\t\t\t\t\t\tmessage: errorResponse.message,\n\t\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t\t});\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tthis.isLoading = false;\n\t\t\t\t\t\tthis.$emit('modal-close');\n\t\t\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t\t\tthis.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n});\n","export default \"{% 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 0\\\">\\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\";","/* global Shopware */\n\nimport '../../component/wallee-order-action-completion';\nimport '../../component/wallee-order-action-refund';\nimport '../../component/wallee-order-action-refund-by-amount';\nimport '../../component/wallee-order-action-void';\nimport template from './index.html.twig';\nimport './index.scss';\n\nconst {Component, Mixin, Filter, Context, Utils} = Shopware;\nconst Criteria = Shopware.Data.Criteria;\n\nComponent.register('wallee-order-detail', {\n\ttemplate,\n\n\tinject: [\n\t\t'WalleeTransactionService',\n\t\t'WalleeRefundService',\n\t\t'repositoryFactory'\n\t],\n\n\tmixins: [\n\t\tMixin.getByName('notification')\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\ttransactionData: {\n\t\t\t\ttransactions: [],\n\t\t\t\trefunds: []\n\t\t\t},\n\t\t\ttransaction: {},\n\t\t\tlineItems: [],\n\t\t\trefundableQuantity: 0,\n\t\t\tisLoading: true,\n\t\t\torderId: '',\n\t\t\tcurrency: '',\n\t\t\tmodalType: '',\n\t\t\trefundAmount: 0,\n\t\t\trefundableAmount: 0,\n\t\t\tcurrentLineItem: '',\n\t\t\trefundLineItem: []\n\t\t};\n\t},\n\n\tmetaInfo() {\n\t\treturn {\n\t\t\ttitle: this.$tc('wallee-order.header')\n\t\t};\n\t},\n\n\n\tcomputed: {\n\t\tdateFilter() {\n\t\t\treturn Filter.getByName('date');\n\t\t},\n\n\t\trelatedResourceColumns() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tproperty: 'paymentMethodName',\n\t\t\t\t\tlabel: this.$tc('wallee-order.transactionHistory.types.payment_method'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'state',\n\t\t\t\t\tlabel: this.$tc('wallee-order.transactionHistory.types.state'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'currency',\n\t\t\t\t\tlabel: this.$tc('wallee-order.transactionHistory.types.currency'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'authorized_amount',\n\t\t\t\t\tlabel: this.$tc('wallee-order.transactionHistory.types.authorized_amount'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'id',\n\t\t\t\t\tlabel: this.$tc('wallee-order.transactionHistory.types.transaction'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'customerId',\n\t\t\t\t\tlabel: this.$tc('wallee-order.transactionHistory.types.customer'),\n\t\t\t\t\trawData: true\n\t\t\t\t}\n\t\t\t];\n\t\t},\n\n\t\tlineItemColumns() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tproperty: 'uniqueId',\n\t\t\t\t\tlabel: this.$tc('wallee-order.lineItem.types.uniqueId'),\n\t\t\t\t\trawData: true,\n\t\t\t\t\tvisible: false,\n\t\t\t\t\tprimary: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'name',\n\t\t\t\t\tlabel: this.$tc('wallee-order.lineItem.types.name'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'quantity',\n\t\t\t\t\tlabel: this.$tc('wallee-order.lineItem.types.quantity'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'amountIncludingTax',\n\t\t\t\t\tlabel: this.$tc('wallee-order.lineItem.types.amountIncludingTax'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'type',\n\t\t\t\t\tlabel: this.$tc('wallee-order.lineItem.types.type'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'taxAmount',\n\t\t\t\t\tlabel: this.$tc('wallee-order.lineItem.types.taxAmount'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'refundableQuantity',\n\t\t\t\t\trawData: true,\n\t\t\t\t\tvisible: false,\n\t\t\t\t},\n\t\t\t];\n\t\t},\n\n\t\trefundColumns() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tproperty: 'id',\n\t\t\t\t\tlabel: this.$tc('wallee-order.refund.types.id'),\n\t\t\t\t\trawData: true,\n\t\t\t\t\tvisible: true,\n\t\t\t\t\tprimary: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'amount',\n\t\t\t\t\tlabel: this.$tc('wallee-order.refund.types.amount'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'state',\n\t\t\t\t\tlabel: this.$tc('wallee-order.refund.types.state'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'createdOn',\n\t\t\t\t\tlabel: this.$tc('wallee-order.refund.types.createdOn'),\n\t\t\t\t\trawData: true\n\t\t\t\t}\n\t\t\t];\n\t\t}\n\t},\n\n\twatch: {\n\t\t'$route'() {\n\t\t\tthis.resetDataAttributes();\n\t\t\tthis.createdComponent();\n\t\t}\n\t},\n\n\tcreated() {\n\t\tthis.createdComponent();\n\t},\n\n\tmethods: {\n\t\tcreatedComponent() {\n\t\t\tthis.orderId = this.$route.params.id;\n\t\t\tconst orderRepository = this.repositoryFactory.create('order');\n\t\t\tconst orderCriteria = new Criteria(1, 1);\n\t\t\torderCriteria.addAssociation('transactions');\n\t\t\torderCriteria.getAssociation('transactions').addSorting(Criteria.sort('createdAt', 'DESC'));\n\n\t\t\torderRepository.get(this.orderId, Context.api, orderCriteria).then((order) => {\n\t\t\t\tthis.order = order;\n\t\t\t\tthis.isLoading = false;\n\t\t\t\tvar totalAmountTemp = 0;\n\t\t\t\tvar refundsAmountTemp = 0;\n\t\t\t\tconst walleeTransactionId = order.transactions[0].customFields.wallee_transaction_id;\n\t\t\t\tthis.WalleeTransactionService.getTransactionData(order.salesChannelId, walleeTransactionId)\n\t\t\t\t\t.then((WalleeTransaction) => {\n\t\t\t\t\t\tthis.currency = WalleeTransaction.transactions[0].currency;\n\n\t\t\t\t\t\tWalleeTransaction.transactions[0].authorized_amount = Utils.format.currency(\n\t\t\t\t\t\t\tWalleeTransaction.transactions[0].authorizationAmount,\n\t\t\t\t\t\t\tthis.currency\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tWalleeTransaction.refunds.forEach((refund) => {\n\t\t\t\t\t\t\trefundsAmountTemp = parseFloat(parseFloat(refundsAmountTemp) + parseFloat(refund.amount));\n\t\t\t\t\t\t\trefund.amount = Utils.format.currency(\n\t\t\t\t\t\t\t\trefund.amount,\n\t\t\t\t\t\t\t\tthis.currency\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\trefund.reductions.forEach((reduction) => {\n\t\t\t\t\t\t\t\tif (this.refundLineItem[reduction.lineItemUniqueId] === undefined) {\n\t\t\t\t\t\t\t\t\tthis.refundLineItem[reduction.lineItemUniqueId] = reduction.quantityReduction;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthis.refundLineItem[reduction.lineItemUniqueId] += reduction.quantityReduction;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tWalleeTransaction.transactions[0].lineItems.forEach((lineItem) => {\n\n\t\t\t\t\t\t\tlineItem.amountIncludingTax = Utils.format.currency(\n\t\t\t\t\t\t\t\tlineItem.amountIncludingTax,\n\t\t\t\t\t\t\t\tthis.currency\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tlineItem.taxAmount = Utils.format.currency(\n\t\t\t\t\t\t\t\tlineItem.taxAmount,\n\t\t\t\t\t\t\t\tthis.currency\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\ttotalAmountTemp = parseFloat(parseFloat(totalAmountTemp) + parseFloat(lineItem.unitPriceIncludingTax * lineItem.quantity));\n\n\t\t\t\t\t\t\tlineItem.refundableQuantity = parseInt(\n\t\t\t\t\t\t\t\tparseInt(lineItem.quantity) - parseInt(this.refundLineItem[lineItem.uniqueId] || 0)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tthis.lineItems = WalleeTransaction.transactions[0].lineItems;\n\t\t\t\t\t\tthis.transactionData = WalleeTransaction;\n\t\t\t\t\t\tthis.transaction = this.transactionData.transactions[0];\n\t\t\t\t\t\tthis.refundAmount = Number(this.transactionData.transactions[0].amountIncludingTax);\n\t\t\t\t\t\tthis.refundableAmount = parseFloat(parseFloat(totalAmountTemp) - parseFloat(refundsAmountTemp));\n\t\t\t\t\t}).catch((errorResponse) => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\ttitle: this.$tc('wallee-order.paymentDetails.error.title'),\n\t\t\t\t\t\t\tmessage: errorResponse.message,\n\t\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\ttitle: this.$tc('wallee-order.paymentDetails.error.title'),\n\t\t\t\t\t\t\tmessage: errorResponse.message,\n\t\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t\t});\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tthis.isLoading = false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tdownloadPackingSlip() {\n\t\t\twindow.open(\n\t\t\t\tthis.WalleeTransactionService.getPackingSlip(\n\t\t\t\t\tthis.transaction.metaData.salesChannelId,\n\t\t\t\t\tthis.transaction.id\n\t\t\t\t),\n\t\t\t\t'_blank'\n\t\t\t);\n\t\t},\n\n\t\tdownloadInvoice() {\n\t\t\twindow.open(\n\t\t\t\tthis.WalleeTransactionService.getInvoiceDocument(\n\t\t\t\t\tthis.transaction.metaData.salesChannelId,\n\t\t\t\t\tthis.transaction.id\n\t\t\t\t),\n\t\t\t\t'_blank'\n\t\t\t);\n\t\t},\n\n\t\tresetDataAttributes() {\n\t\t\tthis.transactionData = {\n\t\t\t\ttransactions: [],\n\t\t\t\trefunds: []\n\t\t\t};\n\t\t\tthis.lineItems = [];\n\t\t\tthis.refundLineItem = [];\n\t\t\tthis.isLoading = true;\n\t\t},\n\n\t\tspawnModal(modalType, lineItemId, refundableQuantity) {\n\t\t\tthis.modalType = modalType;\n\t\t\tthis.currentLineItem = lineItemId;\n\t\t\tthis.refundableQuantity = refundableQuantity;\n\t\t},\n\n\t\tcloseModal() {\n\t\t\tthis.modalType = '';\n\t\t},\n\n\t\tlineItemRefund(lineItemId) {\n\t\t\tthis.isLoading = true;\n\t\t\tthis.WalleeRefundService.createRefund(\n\t\t\t\tthis.transactionData.transactions[0].metaData.salesChannelId,\n\t\t\t\tthis.transactionData.transactions[0].id,\n\t\t\t\t0,\n\t\t\t\tlineItemId\n\t\t\t).then(() => {\n\t\t\t\tthis.createNotificationSuccess({\n\t\t\t\t\ttitle: this.$tc('wallee-order.refundAction.successTitle'),\n\t\t\t\t\tmessage: this.$tc('wallee-order.refundAction.successMessage')\n\t\t\t\t});\n\t\t\t\tthis.isLoading = false;\n\t\t\t\tthis.$emit('modal-close');\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\tthis.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n\t\t\t\t});\n\t\t\t}).catch((errorResponse) => {\n\t\t\t\ttry {\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\ttitle: errorResponse.response.data.errors[0].title,\n\t\t\t\t\t\tmessage: errorResponse.response.data.errors[0].detail,\n\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t});\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\ttitle: errorResponse.title,\n\t\t\t\t\t\tmessage: errorResponse.message,\n\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t});\n\t\t\t\t} finally {\n\t\t\t\t\tthis.isLoading = false;\n\t\t\t\t\tthis.$emit('modal-close');\n\t\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t\tthis.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n});\n","/* global Shopware */\n\nimport './extension/sw-order';\nimport './page/wallee-order-detail';\n\nimport deDE from './snippet/de-DE.json';\nimport enGB from './snippet/en-GB.json';\nimport frFR from './snippet/fr-FR.json';\nimport itIT from './snippet/it-IT.json';\n\nconst {Module} = Shopware;\n\nModule.register('wallee-order', {\n\ttype: 'plugin',\n\tname: 'Wallee',\n\ttitle: 'wallee-order.general.title',\n\tdescription: 'wallee-order.general.descriptionTextModule',\n\tversion: '1.0.0',\n\ttargetVersion: '1.0.0',\n\tcolor: '#2b52ff',\n\n\tsnippets: {\n\t\t'de-DE': deDE,\n\t\t'en-GB': enGB,\n\t\t'fr-FR': frFR,\n\t\t'it-IT': itIT\n\t},\n\n\trouteMiddleware(next, currentRoute) {\n\t\tif (currentRoute.name === 'sw.order.detail') {\n\t\t\tcurrentRoute.children.push({\n\t\t\t\tcomponent: 'wallee-order-detail',\n\t\t\t\tname: 'wallee.order.detail',\n\t\t\t\tisChildren: true,\n\t\t\t\tpath: '/sw/order/wallee/detail/:id'\n\t\t\t});\n\t\t}\n\t\tnext(currentRoute);\n\t}\n});\n","export const CONFIG_DOMAIN = 'WalleePayment.config';\nexport const CONFIG_APPLICATION_KEY = CONFIG_DOMAIN + '.' + 'applicationKey';\nexport const CONFIG_EMAIL_ENABLED = CONFIG_DOMAIN + '.' + 'emailEnabled';\nexport const CONFIG_INTEGRATION = CONFIG_DOMAIN + '.' + 'integration';\nexport const CONFIG_LINE_ITEM_CONSISTENCY_ENABLED = CONFIG_DOMAIN + '.' + 'lineItemConsistencyEnabled';\nexport const CONFIG_SPACE_ID = CONFIG_DOMAIN + '.' + 'spaceId';\nexport const CONFIG_SPACE_VIEW_ID = CONFIG_DOMAIN + '.' + 'spaceViewId';\nexport const CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED = CONFIG_DOMAIN + '.' + 'storefrontInvoiceDownloadEnabled';\nexport const CONFIG_USER_ID = CONFIG_DOMAIN + '.' + 'userId';\nexport const CONFIG_IS_SHOWCASE = CONFIG_DOMAIN + '.' + 'isShowcase';\nexport const CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED = CONFIG_DOMAIN + '.' + 'storefrontWebhooksUpdateEnabled';\nexport const CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED = CONFIG_DOMAIN + '.' + 'storefrontPaymentsUpdateEnabled';\n\nexport default {\n CONFIG_DOMAIN,\n CONFIG_APPLICATION_KEY,\n CONFIG_EMAIL_ENABLED,\n CONFIG_INTEGRATION,\n CONFIG_LINE_ITEM_CONSISTENCY_ENABLED,\n CONFIG_SPACE_ID,\n CONFIG_SPACE_VIEW_ID,\n CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED,\n CONFIG_USER_ID,\n CONFIG_IS_SHOWCASE,\n CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED,\n CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED\n};","/* global Shopware */\n\nimport template from './index.html.twig';\nimport constants from './configuration-constants';\n\nconst {Component, Mixin} = Shopware;\n\nComponent.register('wallee-settings', {\n\n template: template,\n\n inject: [\n 'WalleeConfigurationService'\n ],\n\n mixins: [\n Mixin.getByName('notification')\n ],\n\n data() {\n return {\n\n config: {},\n\n isLoading: false,\n isTesting: false,\n\n isSaveSuccessful: false,\n isShowcase: false,\n\n applicationKeyFilled: false,\n applicationKeyErrorState: false,\n\n spaceIdFilled: false,\n spaceIdErrorState: false,\n\n userIdFilled: false,\n userIdErrorState: false,\n\n isSetDefaultPaymentSuccessful: false,\n isSettingDefaultPaymentMethods: false,\n\n configIntegrationDefaultValue: 'iframe',\n configEmailEnabledDefaultValue: true,\n configLineItemConsistencyEnabledDefaultValue: true,\n configStorefrontInvoiceDownloadEnabledEnabledDefaultValue: true,\n configStorefrontWebhooksUpdateEnabledDefaultValue: true,\n configStorefrontPaymentsUpdateEnabledDefaultValue: true,\n\n ...constants\n };\n },\n\n props: {\n isLoading: {\n type: Boolean,\n required: true\n }\n },\n\n metaInfo() {\n return {\n title: this.$createTitle()\n };\n },\n\n created() {\n // Registers a listener for the 'check-api-connection-event'.\n // Triggered when this event is emitted.\n this.$on('check-api-connection-event', this.onCheckApiConnection);\n },\n\n beforeDestroy() {\n // Removes the listener for the 'check-api-connection-event'\n // before the component is destroyed to prevent memory leaks.\n this.$off('check-api-connection-event', this.onCheckApiConnection);\n },\n\n watch: {\n config: {\n handler() {\n const defaultConfig = this.$refs.configComponent.allConfigs.null;\n const salesChannelId = this.$refs.configComponent.selectedSalesChannelId;\n this.isShowcase = this.config[this.CONFIG_IS_SHOWCASE];\n if (salesChannelId === null) {\n\n this.applicationKeyFilled = !!this.config[this.CONFIG_APPLICATION_KEY];\n this.spaceIdFilled = !!this.config[this.CONFIG_SPACE_ID];\n this.userIdFilled = !!this.config[this.CONFIG_USER_ID];\n\n if (!(this.CONFIG_INTEGRATION in this.config)) {\n this.config[this.CONFIG_INTEGRATION] = this.configIntegrationDefaultValue;\n }\n\n if (!(this.CONFIG_EMAIL_ENABLED in this.config)) {\n this.config[this.CONFIG_EMAIL_ENABLED] = this.configEmailEnabledDefaultValue;\n }\n\n if (!(this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED in this.config)) {\n this.config[this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED] = this.configLineItemConsistencyEnabledDefaultValue;\n }\n\n if (!(this.CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED in this.config)) {\n this.config[this.CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED] = this.configStorefrontInvoiceDownloadEnabledEnabledDefaultValue;\n }\n\n if (!(this.CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED in this.config)) {\n this.config[this.CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED] = this.configStorefrontWebhooksUpdateEnabledDefaultValue;\n }\n\n if (!(this.CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED in this.config)) {\n this.config[this.CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED] = this.configStorefrontPaymentsUpdateEnabledDefaultValue;\n }\n\n } else {\n\n this.applicationKeyFilled = !!this.config[this.CONFIG_APPLICATION_KEY] || !!defaultConfig[this.CONFIG_APPLICATION_KEY];\n this.spaceIdFilled = !!this.config[this.CONFIG_SPACE_ID] || !!defaultConfig[this.CONFIG_SPACE_ID];\n this.userIdFilled = !!this.config[this.CONFIG_USER_ID] || !!defaultConfig[this.CONFIG_USER_ID];\n\n\n if (!(this.CONFIG_INTEGRATION in this.config) || !(this.CONFIG_INTEGRATION in defaultConfig)) {\n this.config[this.CONFIG_INTEGRATION] = this.configIntegrationDefaultValue;\n }\n\n if (!(this.CONFIG_EMAIL_ENABLED in this.config) || !(this.CONFIG_EMAIL_ENABLED in defaultConfig)) {\n this.config[this.CONFIG_EMAIL_ENABLED] = this.configEmailEnabledDefaultValue;\n }\n\n if (!(this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED in this.config) || !(this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED in defaultConfig)) {\n this.config[this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED] = this.configLineItemConsistencyEnabledDefaultValue;\n }\n\n if (!(this.CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED in this.config) || !(this.CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED in defaultConfig)) {\n this.config[this.CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED] = this.configStorefrontInvoiceDownloadEnabledEnabledDefaultValue;\n }\n\n if (!(this.CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED in this.config) || !(this.CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED in defaultConfig)) {\n this.config[this.CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED] = this.configStorefrontWebhooksUpdateEnabledDefaultValue;\n }\n\n if (!(this.CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED in this.config) || !(this.CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED in defaultConfig)) {\n this.config[this.CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED] = this.configStorefrontPaymentsUpdateEnabledDefaultValue;\n }\n }\n },\n deep: true\n }\n },\n\n methods: {\n\n onSave() {\n if (!(this.spaceIdFilled && this.userIdFilled && this.applicationKeyFilled)) {\n this.setErrorStates();\n return;\n }\n this.save();\n },\n\n save() {\n this.isLoading = true;\n\n this.$refs.configComponent.save().then((res) => {\n if (res) {\n this.config = res;\n }\n this.registerWebHooks();\n this.synchronizePaymentMethodConfiguration();\n this.installOrderDeliveryStates();\n }).catch(() => {\n this.isLoading = false;\n });\n },\n\n registerWebHooks() {\n if (this.config[this.CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED] === false) {\n return false;\n }\n\n this.WalleeConfigurationService.registerWebHooks(this.$refs.configComponent.selectedSalesChannelId)\n .then(() => {\n this.createNotificationSuccess({\n title: this.$tc('wallee-settings.settingForm.titleSuccess'),\n message: this.$tc('wallee-settings.settingForm.messageWebHookUpdated')\n });\n }).catch(() => {\n this.createNotificationError({\n title: this.$tc('wallee-settings.settingForm.titleError'),\n message: this.$tc('wallee-settings.settingForm.messageWebHookError')\n });\n this.isLoading = false;\n });\n },\n\n synchronizePaymentMethodConfiguration() {\n if (this.config[this.CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED] === false) {\n return false;\n }\n\n this.WalleeConfigurationService.synchronizePaymentMethodConfiguration(this.$refs.configComponent.selectedSalesChannelId)\n .then(() => {\n this.createNotificationSuccess({\n title: this.$tc('wallee-settings.settingForm.titleSuccess'),\n message: this.$tc('wallee-settings.settingForm.messagePaymentMethodConfigurationUpdated')\n });\n this.isLoading = false;\n }).catch(() => {\n this.createNotificationError({\n title: this.$tc('wallee-settings.settingForm.titleError'),\n message: this.$tc('wallee-settings.settingForm.messagePaymentMethodConfigurationError')\n });\n this.isLoading = false;\n });\n },\n\n installOrderDeliveryStates(){\n this.WalleeConfigurationService.installOrderDeliveryStates()\n .then(() => {\n this.createNotificationSuccess({\n title: this.$tc('wallee-settings.settingForm.titleSuccess'),\n message: this.$tc('wallee-settings.settingForm.messageOrderDeliveryStateUpdated')\n });\n this.isLoading = false;\n }).catch(() => {\n this.createNotificationError({\n title: this.$tc('wallee-settings.settingForm.titleError'),\n message: this.$tc('wallee-settings.settingForm.messageOrderDeliveryStateError')\n });\n this.isLoading = false;\n });\n },\n\n onSetPaymentMethodDefault() {\n this.isSettingDefaultPaymentMethods = true;\n this.WalleeConfigurationService.setWalleeAsSalesChannelPaymentDefault(\n this.$refs.configComponent.selectedSalesChannelId\n ).then(() => {\n this.isSettingDefaultPaymentMethods = false;\n this.isSetDefaultPaymentSuccessful = true;\n });\n },\n\n setErrorStates() {\n const messageNotBlankErrorState = {\n code: 1,\n detail: this.$tc('wallee-settings.messageNotBlank')\n };\n\n if (!this.spaceIdFilled) {\n this.spaceIdErrorState = messageNotBlankErrorState;\n }\n\n if (!this.userIdFilled) {\n this.userIdErrorState = messageNotBlankErrorState;\n }\n\n if (!this.applicationKeyFilled) {\n this.applicationKeyErrorState = messageNotBlankErrorState;\n }\n },\n\n // Handles the 'check-api-connection-event'.\n // Uses the provided apiConnectionData to perform API connection checks.\n onCheckApiConnection(apiConnectionData) {\n const { spaceId, userId, applicationKey } = apiConnectionData;\n this.isTesting = true;\n\n this.WalleeConfigurationService.checkApiConnection(spaceId, userId, applicationKey)\n .then((res) => {\n if (res.result === 200) {\n this.createNotificationSuccess({\n title: this.$tc('wallee-settings.settingForm.credentials.alert.title'),\n message: this.$tc('wallee-settings.settingForm.credentials.alert.successMessage')\n });\n } else {\n this.createNotificationError({\n title: this.$tc('wallee-settings.settingForm.credentials.alert.title'),\n message: this.$tc('wallee-settings.settingForm.credentials.alert.errorMessage')\n });\n }\n this.isTesting = false;\n }).catch(() => {\n this.createNotificationError({\n title: this.$tc('wallee-settings.settingForm.credentials.alert.title'),\n message: this.$tc('wallee-settings.settingForm.credentials.alert.errorMessage')\n });\n this.isTesting = false;\n });\n }\n }\n});\n","export default \"{% 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 %}\";","/* global Shopware */\n\nimport template from './index.html.twig';\nimport constants from '../../page/wallee-settings/configuration-constants'\n\nconst {Component, Mixin} = Shopware;\n\nComponent.register('sw-wallee-credentials', {\n template: template,\n\n name: 'WalleeCredentials',\n\n mixins: [\n Mixin.getByName('notification')\n ],\n\n props: {\n actualConfigData: {\n type: Object,\n required: true\n },\n allConfigs: {\n type: Object,\n required: true\n },\n\n selectedSalesChannelId: {\n required: true\n },\n spaceIdFilled: {\n type: Boolean,\n required: true\n },\n spaceIdErrorState: {\n required: true\n },\n userIdFilled: {\n type: Boolean,\n required: true\n },\n userIdErrorState: {\n required: true\n },\n applicationKeyFilled: {\n type: Boolean,\n required: true\n },\n applicationKeyErrorState: {\n required: true\n },\n isLoading: {\n type: Boolean,\n required: true\n },\n isTesting: {\n type: Boolean,\n required: false\n },\n isShowcase: {\n type: Boolean,\n required: true\n }\n },\n\n data() {\n return {\n ...constants\n };\n },\n\n computed: {},\n\n methods: {\n\n checkTextFieldInheritance(value) {\n if (typeof value !== 'string') {\n return true;\n }\n\n return value.length <= 0;\n },\n\n checkNumberFieldInheritance(value) {\n if (typeof value !== 'number') {\n return true;\n }\n\n return value.length <= 0;\n },\n\n checkBoolFieldInheritance(value) {\n return typeof value !== 'boolean';\n },\n\n // Emits the 'check-api-connection-event' with the current API connection parameters.\n // Used to trigger API connection testing from this component.\n emitCheckApiConnectionEvent() {\n const apiConnectionParams = {\n spaceId: this.actualConfigData[constants.CONFIG_SPACE_ID],\n userId: this.actualConfigData[constants.CONFIG_USER_ID],\n applicationKey: this.actualConfigData[constants.CONFIG_APPLICATION_KEY]\n };\n\n this.$emit('check-api-connection-event', apiConnectionParams);\n }\n }\n});\n","export default \"{% 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\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{{ $tc('wallee-settings.settingForm.credentials.button.label') }}\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\n\\t\\t\\t
    \\n\\t\\t{% endblock %}\\n\\t\\n\\n{% endblock %}\\n\";","/* global Shopware */\n\nimport template from './index.html.twig';\nimport constants from '../../page/wallee-settings/configuration-constants'\n\nconst {Component, Mixin} = Shopware;\n\nComponent.register('sw-wallee-options', {\n\ttemplate: template,\n\n\tname: 'WalleeOptions',\n\n\tmixins: [\n\t\tMixin.getByName('notification')\n\t],\n\n\tprops: {\n\t\tactualConfigData: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tallConfigs: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tselectedSalesChannelId: {\n\t\t\trequired: true\n\t\t},\n\t\tisLoading: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t...constants\n\t\t};\n\t},\n\n\tcomputed: {\n\t\tintegrationOptions() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tid: 'iframe',\n\t\t\t\t\tname: this.$tc('wallee-settings.settingForm.options.integration.options.iframe')\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'payment_page',\n\t\t\t\t\tname: this.$tc('wallee-settings.settingForm.options.integration.options.payment_page')\n\t\t\t\t}\n\t\t\t];\n\t\t}\n\t},\n\n\tmethods: {\n\t\tcheckTextFieldInheritance(value) {\n\t\t\tif (typeof value !== 'string') {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn value.length <= 0;\n\t\t},\n\n\t\tcheckNumberFieldInheritance(value) {\n\t\t\tif (typeof value !== 'number') {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn value.length <= 0;\n\t\t},\n\n\t\tcheckBoolFieldInheritance(value) {\n\t\t\treturn typeof value !== 'boolean';\n\t\t}\n\t}\n});\n","export default \"{% 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\";","import template from './index.html.twig';\n\nconst { Component } = Shopware;\n\nComponent.register('sw-wallee-settings-icon', {\n template\n});\n","export default \"{% 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\";","/* global Shopware */\n\nimport template from './index.html.twig';\nimport constants from '../../page/wallee-settings/configuration-constants'\n\nconst {Component, Mixin} = Shopware;\n\nComponent.register('sw-wallee-storefront-options', {\n\ttemplate: template,\n\n\tname: 'WalleeStorefrontOptions',\n\n\tmixins: [\n\t\tMixin.getByName('notification')\n\t],\n\n\tprops: {\n\t\tactualConfigData: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tallConfigs: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tselectedSalesChannelId: {\n\t\t\trequired: true\n\t\t},\n\t\tisLoading: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t...constants\n\t\t};\n\t},\n\n\tcomputed: {\n\t},\n\n\tmethods: {\n\t\tcheckTextFieldInheritance(value) {\n\t\t\tif (typeof value !== 'string') {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn value.length <= 0;\n\t\t},\n\n\t\tcheckNumberFieldInheritance(value) {\n\t\t\tif (typeof value !== 'number') {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn value.length <= 0;\n\t\t},\n\n\t\tcheckBoolFieldInheritance(value) {\n\t\t\treturn typeof value !== 'boolean';\n\t\t}\n\t}\n});\n","export default \"\\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\";","/* global Shopware */\n\nimport template from './index.html.twig';\nimport constants from '../../page/wallee-settings/configuration-constants'\n\nconst {Component, Mixin} = Shopware;\n\nComponent.register('sw-wallee-advanced-options', {\n\ttemplate: template,\n\n\tname: 'WalleeAdvancedOptions',\n\n\tmixins: [\n\t\tMixin.getByName('notification')\n\t],\n\n\tprops: {\n\t\tactualConfigData: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tallConfigs: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tselectedSalesChannelId: {\n\t\t\trequired: true\n\t\t},\n\t\tisLoading: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t...constants\n\t\t};\n\t},\n\n\tcomputed: {\n\t},\n\n\tmethods: {\n\t\tcheckTextFieldInheritance(value) {\n\t\t\tif (typeof value !== 'string') {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn value.length <= 0;\n\t\t},\n\n\t\tcheckNumberFieldInheritance(value) {\n\t\t\tif (typeof value !== 'number') {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn value.length <= 0;\n\t\t},\n\n\t\tcheckBoolFieldInheritance(value) {\n\t\t\treturn typeof value !== 'boolean';\n\t\t}\n\t}\n});\n","export default \"\\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\";","/* global Shopware */\n\nimport './acl';\nimport './page/wallee-settings';\nimport './component/sw-wallee-credentials';\nimport './component/sw-wallee-options';\nimport './component/sw-wallee-settings-icon';\nimport './component/sw-wallee-storefront-options';\nimport './component/sw-wallee-advanced-options';\n\nconst {Module} = Shopware;\n\nModule.register('wallee-settings', {\n\ttype: 'plugin',\n\tname: 'Wallee',\n\ttitle: 'wallee-settings.general.descriptionTextModule',\n\tdescription: 'wallee-settings.general.descriptionTextModule',\n\tcolor: '#28d8ff',\n\ticon: 'default-action-settings',\n\tversion: '1.0.0',\n\ttargetVersion: '1.0.0',\n\n\troutes: {\n\t\tindex: {\n\t\t\tcomponent: 'wallee-settings',\n\t\t\tpath: 'index',\n\t\t\tmeta: {\n\t\t\t\tparentPath: 'sw.settings.index',\n\t\t\t\tprivilege: 'wallee.viewer'\n\t\t\t}\n\t\t}\n\t},\n\n\tsettingsItem: {\n\t\tgroup: 'plugins',\n\t\tto: 'wallee.settings.index',\n\t\ticonComponent: 'sw-wallee-settings-icon',\n\t\tbackgroundEnabled: true,\n\t\tprivilege: 'wallee.viewer'\n\t}\n\n});\n","/* global Shopware */\n\nconst ApiService = Shopware.Classes.ApiService;\n\n/**\n * @class WalleePayment\\Core\\Api\\Config\\Controller\\ConfigurationController\n */\nclass WalleeConfigurationService extends ApiService {\n\n\t/**\n\t * WalleeConfigurationService constructor\n\t *\n\t * @param httpClient\n\t * @param loginService\n\t * @param apiEndpoint\n\t */\n\tconstructor(httpClient, loginService, apiEndpoint = 'wallee') {\n\t\tsuper(httpClient, loginService, apiEndpoint);\n\t}\n\n\t/**\n\t * Register web hooks\n\t *\n\t * @param {String|null} salesChannelId\n\t * @return {*}\n\t */\n\tregisterWebHooks(salesChannelId = null) {\n\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/configuration/register-web-hooks`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tsalesChannelId: salesChannelId\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n\n\t/**\n\t * Test API connection\n\t *\n\t * @param {int|null} spaceId\n\t * @param {int|null} userId\n\t * @param {String|null} applicationId\n\t * @return {*}\n\t */\n\tcheckApiConnection(spaceId = null, userId = null, applicationId = null) {\n\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/configuration/check-api-connection`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tspaceId: spaceId,\n\t\t\t\tuserId: userId,\n\t\t\t\tapplicationId: applicationId\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n\n\t/**\n\t * Set's the default payment method to Wallee for the given salesChannel id.\n\t *\n\t * @param {String|null} salesChannelId\n\t *\n\t * @returns {Promise}\n\t */\n\tsetWalleeAsSalesChannelPaymentDefault(salesChannelId = null) {\n\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/configuration/set-wallee-as-sales-channel-payment-default`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tsalesChannelId: salesChannelId\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n\n\t/**\n\t *\n\t * @param salesChannelId\n\t * @return {Promise}\n\t */\n\tsynchronizePaymentMethodConfiguration(salesChannelId = null) {\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/configuration/synchronize-payment-method-configuration`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tsalesChannelId: salesChannelId\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n\n\t/**\n\t *\n\t * @return {*}\n\t */\n\tinstallOrderDeliveryStates() {\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/configuration/install-order-delivery-states`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n}\n\nexport default WalleeConfigurationService;\n","/* global Shopware */\n\nconst ApiService = Shopware.Classes.ApiService;\n\n/**\n * @class WalleePayment\\Core\\Api\\Transaction\\Controller\\RefundController\n */\nclass WalleeRefundService extends ApiService {\n\n\t/**\n\t * WalleeRefundService constructor\n\t *\n\t * @param httpClient\n\t * @param loginService\n\t * @param apiEndpoint\n\t */\n\tconstructor(httpClient, loginService, apiEndpoint = 'wallee') {\n\t\tsuper(httpClient, loginService, apiEndpoint);\n\t}\n\n\t/**\n\t * Refund a transaction\n\t *\n\t * @param {String} salesChannelId\n\t * @param {int} transactionId\n\t * @param {int} quantity\n\t * @param {int} lineItemId\n\t * @return {*}\n\t */\n\tcreateRefund(salesChannelId, transactionId, quantity, lineItemId) {\n\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/refund/create-refund/`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tsalesChannelId: salesChannelId,\n\t\t\t\ttransactionId: transactionId,\n\t\t\t\tquantity: quantity,\n\t\t\t\tlineItemId: lineItemId\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n\n\t/**\n\t * Refund a transaction\n\t *\n\t * @param {String} salesChannelId\n\t * @param {int} transactionId\n\t * @param {float} refundableAmount\n\t * @return {*}\n\t */\n\tcreateRefundByAmount(salesChannelId, transactionId, refundableAmount) {\n\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/refund/create-refund-by-amount/`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tsalesChannelId: salesChannelId,\n\t\t\t\ttransactionId: transactionId,\n\t\t\t\trefundableAmount: refundableAmount\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n}\n\nexport default WalleeRefundService;","/* global Shopware */\n\nconst ApiService = Shopware.Classes.ApiService;\n\n/**\n * @class WalleePayment\\Core\\Api\\Transaction\\Controller\\TransactionController\n */\nclass WalleeTransactionService extends ApiService {\n\n\t/**\n\t * WalleeTransactionService constructor\n\t *\n\t * @param httpClient\n\t * @param loginService\n\t * @param apiEndpoint\n\t */\n\tconstructor(httpClient, loginService, apiEndpoint = 'wallee') {\n\t\tsuper(httpClient, loginService, apiEndpoint);\n\t}\n\n\t/**\n\t * Get transaction data\n\t *\n\t * @param {String} salesChannelId\n\t * @param {int} transactionId\n\t * @return {*}\n\t */\n\tgetTransactionData(salesChannelId, transactionId) {\n\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/transaction/get-transaction-data/`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tsalesChannelId: salesChannelId,\n\t\t\t\ttransactionId: transactionId\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n\n\t/**\n\t * Download Invoice Document\n\t *\n\t * @param context\n\t * @param salesChannelId\n\t * @param transactionId\n\t * @return {string}\n\t */\n\tgetInvoiceDocument(salesChannelId, transactionId) {\n\t\treturn `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/transaction/get-invoice-document/${salesChannelId}/${transactionId}`;\n\t}\n\n\t/**\n\t * Download Packing slip\n\t *\n\t * @param salesChannelId\n\t * @param transactionId\n\t * @return {string}\n\t */\n\tgetPackingSlip(salesChannelId, transactionId) {\n\t\treturn `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/transaction/get-packing-slip/${salesChannelId}/${transactionId}`;\n\t}\n}\n\nexport default WalleeTransactionService;","/* global Shopware */\n\nconst ApiService = Shopware.Classes.ApiService;\n\n/**\n * @class WalleePayment\\Core\\Api\\Transaction\\Controller\\TransactionCompletionController\n */\nclass WalleeTransactionCompletionService extends ApiService {\n\n\t/**\n\t * WalleeTransactionCompletionService constructor\n\t *\n\t * @param httpClient\n\t * @param loginService\n\t * @param apiEndpoint\n\t */\n\tconstructor(httpClient, loginService, apiEndpoint = 'wallee') {\n\t\tsuper(httpClient, loginService, apiEndpoint);\n\t}\n\n\t/**\n\t * Complete a transaction\n\t *\n\t * @param {String} salesChannelId\n\t * @param {int} transactionId\n\t * @return {*}\n\t */\n\tcreateTransactionCompletion(salesChannelId, transactionId) {\n\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/transaction-completion/create-transaction-completion/`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tsalesChannelId: salesChannelId,\n\t\t\t\ttransactionId: transactionId\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n}\n\nexport default WalleeTransactionCompletionService;","/* global Shopware */\n\nconst ApiService = Shopware.Classes.ApiService;\n\n/**\n * @class WalleePayment\\Core\\Api\\Transaction\\Controller\\TransactionVoidController\n */\nclass WalleeTransactionVoidService extends ApiService {\n\n\t/**\n\t * WalleeTransactionVoidService constructor\n\t *\n\t * @param httpClient\n\t * @param loginService\n\t * @param apiEndpoint\n\t */\n\tconstructor(httpClient, loginService, apiEndpoint = 'wallee') {\n\t\tsuper(httpClient, loginService, apiEndpoint);\n\t}\n\n\t/**\n\t * Void a transaction\n\t *\n\t * @param {String} salesChannelId\n\t * @param {int} transactionId\n\t * @return {*}\n\t */\n\tcreateTransactionVoid(salesChannelId, transactionId) {\n\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/transaction-void/create-transaction-void/`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tsalesChannelId: salesChannelId,\n\t\t\t\ttransactionId: transactionId\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n}\n\nexport default WalleeTransactionVoidService;","/* global Shopware */\n\nimport WalleeConfigurationService from '../core/service/api/wallee-configuration.service';\nimport WalleeRefundService from '../core/service/api/wallee-refund.service';\nimport WalleeTransactionService from '../core/service/api/wallee-transaction.service';\nimport WalleeTransactionCompletionService\n\tfrom '../core/service/api/wallee-transaction-completion.service';\nimport WalleeTransactionVoidService\n\tfrom '../core/service/api/wallee-transaction-void.service';\n\n\nconst {Application} = Shopware;\n\n// noinspection JSUnresolvedFunction\nApplication.addServiceProvider('WalleeConfigurationService', (container) => {\n\tconst initContainer = Application.getContainer('init');\n\treturn new WalleeConfigurationService(initContainer.httpClient, container.loginService);\n});\n\n// noinspection JSUnresolvedFunction\nApplication.addServiceProvider('WalleeRefundService', (container) => {\n\tconst initContainer = Application.getContainer('init');\n\treturn new WalleeRefundService(initContainer.httpClient, container.loginService);\n});\n\n// noinspection JSUnresolvedFunction\nApplication.addServiceProvider('WalleeTransactionService', (container) => {\n\tconst initContainer = Application.getContainer('init');\n\treturn new WalleeTransactionService(initContainer.httpClient, container.loginService);\n});\n\n// noinspection JSUnresolvedFunction\nApplication.addServiceProvider('WalleeTransactionCompletionService', (container) => {\n\tconst initContainer = Application.getContainer('init');\n\treturn new WalleeTransactionCompletionService(initContainer.httpClient, container.loginService);\n});\n\n// noinspection JSUnresolvedFunction\nApplication.addServiceProvider('WalleeTransactionVoidService', (container) => {\n\tconst initContainer = Application.getContainer('init');\n\treturn new WalleeTransactionVoidService(initContainer.httpClient, container.loginService);\n});","// style-loader: Adds some css to the DOM by adding a