diff --git a/CHANGELOG.md b/CHANGELOG.md index f243e57..311968b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 4.0.28 +- Added italian translations +- Tested against SW v6.4.9.0 + # 4.0.26 - Added documentation around flow builder diff --git a/CHANGELOG_de-DE.md b/CHANGELOG_de-DE.md index 686f434..a09ccbe 100644 --- a/CHANGELOG_de-DE.md +++ b/CHANGELOG_de-DE.md @@ -1,3 +1,7 @@ +# 4.0.28 +- Italienische Übersetzungen hinzugefügt +- Getestet mit SW v6.4.9.0 + # 4.0.26 - Dokumentation zum Flow Builder hinzugefügt diff --git a/README.md b/README.md index 0363949..536c24b 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ tail -f var/log/postfinancecheckout_payment*.log ## Documentation -[Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/shopware-6/4.0.27/docs/en/documentation.html) +[Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/shopware-6/4.0.28/docs/en/documentation.html) ## License diff --git a/composer.json b/composer.json index 2d80369..68aeb33 100644 --- a/composer.json +++ b/composer.json @@ -20,22 +20,26 @@ "description": { "de-DE": "PostFinanceCheckout integration f\u00fcr Shopware 6", "en-GB": "PostFinanceCheckout integration for Shopware 6", - "fr-Fr": "Int\u00e9gration de PostFinanceCheckout pour Shopware 6" + "fr-FR": "Int\u00e9gration de PostFinanceCheckout pour Shopware 6", + "it-IT": "Integrazione PostFinanceCheckout per Shopware" }, "label": { "de-DE": "PostFinanceCheckout Produkte f\u00fcr Shopware 6", "en-GB": "PostFinanceCheckout Products for Shopware 6", - "fr-FR": "PostFinanceCheckout Produits for Shopware 6" + "fr-FR": "PostFinanceCheckout Produits for Shopware 6", + "it-IT": "PostFinanceCheckout Prodotti per Shopware 6" }, "manufacturerLink": { "de-DE": "https://www.postfinance.ch/checkout", "en-GB": "https://www.postfinance.ch/checkout", - "fr-FR": "https://www.postfinance.ch/checkout" + "fr-FR": "https://www.postfinance.ch/checkout", + "it-IT": "https://www.postfinance.ch/checkout" }, "supportLink": { "de-DE": "https://www.postfinance.ch/en/business/support/written-contact/contact-form.html", "en-GB": "https://www.postfinance.ch/en/business/support/written-contact/contact-form.html", - "fr-FR": "https://www.postfinance.ch/checkout" + "fr-FR": "https://www.postfinance.ch/en/business/support/written-contact/contact-form.html", + "it-IT": "https://www.postfinance.ch/en/business/support/written-contact/contact-form.html" }, "shopware-plugin-class": "PostFinanceCheckoutPayment\\PostFinanceCheckoutPayment" }, @@ -58,5 +62,5 @@ "postfinancecheckout/sdk": "3.0.1" }, "type": "shopware-platform-plugin", - "version": "4.0.27" + "version": "4.0.28" } \ No newline at end of file diff --git a/docs/en/documentation.html b/docs/en/documentation.html index b8f455f..48d3996 100644 --- a/docs/en/documentation.html +++ b/docs/en/documentation.html @@ -22,7 +22,7 @@

Documentation

  • - + Source
  • diff --git a/src/Core/Util/LocaleCodeProvider.php b/src/Core/Util/LocaleCodeProvider.php index 7b8fd39..f2e1307 100644 --- a/src/Core/Util/LocaleCodeProvider.php +++ b/src/Core/Util/LocaleCodeProvider.php @@ -21,6 +21,11 @@ */ class LocaleCodeProvider { + public const LOCALE_GREAT_BRITAIN_ENGLISH = 'en-GB'; + public const LOCALE_GERMANY_GERMAN = 'de-DE'; + public const LOCALE_FRANCE_FRENCH = 'fr-FR'; + public const LOCALE_ITALY_ITALIAN = 'it-IT'; + /** * @var \Psr\Log\LoggerInterface */ @@ -70,7 +75,7 @@ public function setLogger(LoggerInterface $logger): void */ public function getLocaleCodeFromContext(Context $context): string { - $defaultLocale = 'en-GB'; + $defaultLocale = self::LOCALE_GREAT_BRITAIN_ENGLISH; $languageId = $context->getLanguageId(); /** @var \Shopware\Core\System\Language\LanguageCollection $languageCollection */ $languageCollection = $this->languageRepository->search( @@ -94,7 +99,7 @@ public function getLocaleCodeFromContext(Context $context): string */ public function getDefaultLocaleCode(Context $context): string { - $defaultLocale = 'en-GB'; + $defaultLocale = self::LOCALE_GREAT_BRITAIN_ENGLISH; $languageId = Defaults::LANGUAGE_SYSTEM; /** @var \Shopware\Core\System\Language\LanguageCollection $languageCollection */ $languageCollection = $this->languageRepository->search( @@ -160,9 +165,10 @@ public function getAvailableLocales(Context $context): array $availableLanguages->jsonSerialize() ); $locales[] = $this->getDefaultLocaleCode($context); - $locales[] = 'de-DE'; - $locales[] = 'en-GB'; - $locales[] = 'fr-FR'; + $locales[] = self::LOCALE_GERMANY_GERMAN; + $locales[] = self::LOCALE_GREAT_BRITAIN_ENGLISH; + $locales[] = self::LOCALE_FRANCE_FRENCH; + $locales[] = self::LOCALE_ITALY_ITALIAN; $locales = array_unique($locales); return $locales; } @@ -180,4 +186,4 @@ public function getAvailableLanguages(Context $context): LanguageCollection 'locale', ]), $context)->getEntities(); } -} \ No newline at end of file +} diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-order/index.js b/src/Resources/app/administration/src/module/postfinancecheckout-order/index.js index 34f6846..1e63b22 100644 --- a/src/Resources/app/administration/src/module/postfinancecheckout-order/index.js +++ b/src/Resources/app/administration/src/module/postfinancecheckout-order/index.js @@ -6,6 +6,7 @@ import './page/postfinancecheckout-order-detail'; import deDE from './snippet/de-DE.json'; import enGB from './snippet/en-GB.json'; import frFR from './snippet/fr-FR.json'; +import itIT from './snippet/it-IT.json'; const {Module} = Shopware; @@ -21,7 +22,8 @@ Module.register('postfinancecheckout-order', { snippets: { 'de-DE': deDE, 'en-GB': enGB, - 'fr-FR': frFR + 'fr-FR': frFR, + 'it-IT': itIT }, routeMiddleware(next, currentRoute) { diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-order/snippet/it-IT.json b/src/Resources/app/administration/src/module/postfinancecheckout-order/snippet/it-IT.json new file mode 100644 index 0000000..c53188d --- /dev/null +++ b/src/Resources/app/administration/src/module/postfinancecheckout-order/snippet/it-IT.json @@ -0,0 +1,102 @@ +{ + "postfinancecheckout-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 PostFinanceCheckout", + "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 PostFinanceCheckout" + } + }, + "refund": { + "cardTitle": "Rimborsi", + "refundAmount": { + "label": "Importo del rimborso" + }, + "refundQuantity": { + "label": "Quantità di rimborso" + }, + "types": { + "amount": "Importo", + "createdOn": "Creato il", + "id": "ID", + "state": "Stato" + } + }, + "refundAction": { + "confirmButton": { + "text": "Esegui" + }, + "refundAmount": { + "label": "Importo", + "placeholder": "Inserisci un importo" + }, + "successMessage": "Il tuo rimborso è andato a buon fine.", + "successTitle": "Successo", + "maxAvailableItemsToRefund": "Numero massimo di articoli disponibili da rimborsare" + }, + "transactionHistory": { + "cardTitle": "Dettagli", + "types": { + "authorized_amount": "Importo autorizzato", + "currency": "Valuta", + "customer": "Cliente", + "payment_method": "Metodo di pagamento", + "state": "Stato", + "transaction": "Transazione" + } + }, + "voidAction": { + "confirm": { + "button": { + "cancel": "No", + "confirm": "Annulla autorizzazione" + }, + "message": "Vuoi davvero annullare questo pagamento?" + }, + "successMessage": "Il pagamento è stato annullato con successo.", + "successTitle": "Successo" + } + } +} diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-settings/snippet/it-IT.json b/src/Resources/app/administration/src/module/postfinancecheckout-settings/snippet/it-IT.json new file mode 100644 index 0000000..2cb273b --- /dev/null +++ b/src/Resources/app/administration/src/module/postfinancecheckout-settings/snippet/it-IT.json @@ -0,0 +1,84 @@ +{ + "postfinancecheckout-settings": { + "general": { + "descriptionTextModule": "Impostazioni PostFinanceCheckout", + "mainMenuItemGeneral": "PostFinanceCheckout" + }, + "header": "PostFinanceCheckout", + "messageNotBlank": "Questo valore non dovrebbe essere vuoto.", + "salesChannelCard": { + "button": { + "description": "Fai clic su questo pulsante per impostare PostFinanceCheckout come gestore di pagamento predefinito nel SalesChannel selezionato", + "label": "Imposta PostFinanceCheckout come gestore di pagamento predefinito" + } + }, + "settingForm": { + "credentials": { + "applicationKey": { + "label": "Chiave di applicazione", + "tooltipText": "La chiave dell'applicazione è usata per autenticare questo plugin con l'API PostFinanceCheckout." + }, + "cardTitle": "Credenziali", + "spaceId": { + "label": "ID spazio", + "tooltipText": "L'ID dello spazio è usato per autenticare questo plugin con l'API PostFinanceCheckout." + }, + "userId": { + "label": "ID utente", + "tooltipText": "L'ID utente è usato per autenticare questo plugin con l'API PostFinanceCheckout." + } + }, + "messageSaveSuccess": "Le impostazioni di PostFinanceCheckout sono state salvate.", + "messageOrderDeliveryStateError": "PostFinanceCheckout OrderDeliveryState non può essere salvato.", + "messageOrderDeliveryStateUpdated": "PostFinanceCheckout OrderDeliveryState è stato aggiornato.", + "messagePaymentMethodConfigurationError": "PostFinanceCheckout PaymentMethodConfiguration non può essere salvato. Per favore controlla le tue credenziali.", + "messagePaymentMethodConfigurationUpdated": "PostFinanceCheckout PaymentMethodConfiguration è stato registrato.", + "messageWebHookError": "PostFinanceCheckout WebHook non può essere salvato. Per favore controlla le tue credenziali.", + "messageWebHookUpdated": "PostFinanceCheckout WebHook è stato aggiornato.", + "options": { + "cardTitle": "Opzioni", + "emailEnabled": { + "label": "Invia email di conferma dell'ordine", + "tooltipText": "Se questa impostazione è abilitata i tuoi clienti riceveranno un'email dal tuo negozio quando il pagamento del loro ordine sarà autorizzato" + }, + "integration": { + "label": "Integrazione", + "options": { + "iframe": "Iframe", + "payment_page": "Pagina di pagamento" + }, + "tooltipText": "Integrazione" + }, + "lineItemConsistencyEnabled": { + "label": "Coerenza dell'elemento linea", + "tooltipText": "Se questa opzione è abilitata i totali degli articoli in PostFinanceCheckoutPayment corrisponderanno sempre al totale dell'ordine Shopware" + }, + "spaceViewId": { + "label": "ID della vista spazio", + "tooltipText": "ID della vista spaziale" + } + }, + "save": "Salva", + "storefrontOptions": { + "cardTitle": "Opzioni vetrina", + "invoiceDownloadEnabled": { + "label": "Scaricamento fattura", + "tooltipText": "Se questa impostazione è abilitata i tuoi clienti potranno scaricare le fatture degli ordini da PostFinanceCheckout" + } + }, + "advancedOptions": { + "cardTitle": "Opzioni avanzate", + "webhooksUpdateEnabled": { + "label": "Aggiornamento webhooks", + "tooltipText": "Se questa impostazione è abilitata l'aggiornamento dei webhook sarà attivato quando si salvano le impostazioni" + }, + "paymentsUpdateEnabled": { + "label": "Aggiornamento pagamenti", + "tooltipText": "Se questa impostazione è abilitata l'aggiornamento dei metodi di pagamento verrà attivato quando si salvano le impostazioni" + } + }, + "titleError": "Errore", + "titleSuccess": "Successo" + } + } +} diff --git a/src/Resources/public/administration/js/post-finance-checkout-payment.js b/src/Resources/public/administration/js/post-finance-checkout-payment.js index 2d89eaa..0874a45 100644 --- a/src/Resources/public/administration/js/post-finance-checkout-payment.js +++ b/src/Resources/public/administration/js/post-finance-checkout-payment.js @@ -1 +1 @@ -!function(t){var e={};function n(o){if(e[o])return e[o].exports;var a=e[o]={i:o,l:!1,exports:{}};return t[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(o,a,function(e){return t[e]}.bind(null,a));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/bundles/administration/",n(n.s="ypuE")}({"/iC3":function(t){t.exports=JSON.parse('{"postfinancecheckout-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":"PostFinanceCheckout 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 PostFinanceCheckout"}},"refund":{"cardTitle":"Gutschriften","refundAmount":{"label":"Gutschriftsbetrag"},"refundQuantity":{"label":"Refund Menge"},"types":{"amount":"Betrag","createdOn":"Erstellt am","id":"ID","state":"Staat"}},"refundAction":{"confirmButton":{"text":"Ausführen"},"refundAmount":{"label":"Betrag","placeholder":"Einen Betrag eingeben"},"successMessage":"Ihre Rückerstattung war erfolgreich","successTitle":"Erfolg","maxAvailableItemsToRefund":"Maximal Verfügbare Artikel zum Erstatten"},"transactionHistory":{"cardTitle":"Einzelheiten","types":{"authorized_amount":"Autorisierter Betrag","currency":"Währung","customer":"Kunde","payment_method":"Zahlungsweise","state":"Staat","transaction":"Transaktion"}},"voidAction":{"confirm":{"button":{"cancel":"Nein","confirm":"Autorisierung aufheben"},"message":"Wollen Sie diese Zahlung wirklich stornieren?"},"successMessage":"Die Zahlung wurde erfolgreich annulliert","successTitle":"Erfolg"}}}')},"2zY8":function(t,e,n){var o=n("6Ef7");"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);(0,n("SZ7m").default)("52fac0e8",o,!0,{})},"6Ef7":function(t,e,n){},ADsd:function(t,e,n){},FCMq:function(t){t.exports=JSON.parse('{"postfinancecheckout-order":{"buttons":{"label":{"completion":"Complete","download-invoice":"Download Invoice","download-packing-slip":"Download Packing Slip","refund":"Create a new refund","void":"Cancel authorization","refund-whole-line-item":"Refund whole line item","refund-line-item-by-quantity":"Refund by quantity"}},"captureAction":{"button":{"text":"Capture payment"},"currentAmount":"Amount","isFinal":"This is final capture","maxAmount":"Maximum amount","successMessage":"Your capture was successful.","successTitle":"Success"},"general":{"title":"Orders"},"header":"PostFinanceCheckout Payment","lineItem":{"cardTitle":"Line Items","types":{"amountIncludingTax":"Amount","name":"Name","quantity":"Quantity","taxAmount":"Taxes","type":"Type","uniqueId":"Unique ID"}},"modal":{"title":{"capture":"Capture","refund":"New refund","void":"Cancel authorization"}},"paymentDetails":{"cardTitle":"Payment","error":{"title":"Error fetching payment details from PostFinanceCheckout"}},"refund":{"cardTitle":"Refunds","refundAmount":{"label":"Refund Amount"},"refundQuantity":{"label":"Refund Quantity"},"types":{"amount":"Amount","createdOn":"Created On","id":"ID","state":"State"}},"refundAction":{"confirmButton":{"text":"Execute"},"refundAmount":{"label":"Amount","placeholder":"Enter a amount"},"successMessage":"Your refund was successful.","successTitle":"Success","maxAvailableItemsToRefund":"Maximum available items to refund"},"transactionHistory":{"cardTitle":"Details","types":{"authorized_amount":"Authorized Amount","currency":"Currency","customer":"Customer","payment_method":"Payment Method","state":"State","transaction":"Transaction"}},"voidAction":{"confirm":{"button":{"cancel":"No","confirm":"Cancel authorization"},"message":"Do you really want to cancel this payment?"},"successMessage":"The payment was successfully voided.","successTitle":"Success"}}}')},FLPB:function(t,e){t.exports='{% block postfinancecheckout_order_action_completion %}\n\n\n\t{% block postfinancecheckout_order_action_completion_amount %}\n\t\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_order_action_completion_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n'},H4Kp:function(t,e){t.exports='{% block postfinancecheckout_order_action_refund %}\n\n\n\t{% block postfinancecheckout_order_action_refund_amount %}\n\n\t\t\n\t\t\n\n\t\t
    \n\t\t\t{{ $tc(\'postfinancecheckout-order.refundAction.maxAvailableItemsToRefund\') }}:\n\t\t\t{{ this.$parent.refundableQuantity }}\n\t\t
    \n\t{% endblock %}\n\n\t{% block postfinancecheckout_order_action_refund_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n
    \n{% endblock %}\n'},Hmsx:function(t,e){t.exports='{% block postfinancecheckout_settings %}\n\n\n\t{% block postfinancecheckout_settings_header %}\n\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_settings_actions %}\n\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_settings_content %}\n\t\n\t{% endblock %}\n\n{% endblock %}'},PwZK:function(t,e,n){var o=n("ADsd");"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);(0,n("SZ7m").default)("4addc608",o,!0,{})},SZ7m:function(t,e,n){"use strict";function o(t,e){for(var n=[],o={},a=0;an.parts.length&&(o.parts.length=n.parts.length)}else{var c=[];for(a=0;a\n\n\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container %}\n\t\t\t\n\n\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings %}\n\t\t\t\t\t
    \n\n\t\t\t\t\t\t{% block postfinancecheckout_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 postfinancecheckout_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 postfinancecheckout_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 postfinancecheckout_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'},Uo3W:function(t,e){t.exports='\n\t\n\t\t
    \n\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
    \n\t
    \n
    \n\n'},VP8G:function(t,e){t.exports='{% block postfinancecheckout_order_detail %}\n
    \n\t
    \n\t\t\n\t\t\t\n\t\t\n\t\t{% block postfinancecheckout_order_transaction_history_card %}\n\t\t\n\t\t\t\n\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_transaction_line_items_card %}\n\t\t\n\t\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_transaction_refunds_card %}\n\t\t\n\t\t\t\n\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_actions_modal_refund %}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_actions_modal_refund_by_amount %}\n\t\t\t\n\t\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_actions_modal_completion%}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_actions_modal_void %}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t
    \n\t\n
    \n{% endblock %}\n'},aubh:function(t,e){Shopware.Service("privileges").addPrivilegeMappingEntry({category:"permissions",parent:"postfinancecheckout",key:"postfinancecheckout",roles:{viewer:{privileges:["sales_channel:read","sales_channel_payment_method:read","system_config:read"],dependencies:[]},editor:{privileges:["sales_channel:update","sales_channel_payment_method:create","sales_channel_payment_method:update","system_config:update","system_config:create","system_config:delete"],dependencies:["postfinancecheckout.viewer"]}}}),Shopware.Service("privileges").addPrivilegeMappingEntry({category:"permissions",parent:null,key:"sales_channel",roles:{viewer:{privileges:["sales_channel_payment_method:read"]},editor:{privileges:["payment_method:update"]},creator:{privileges:["payment_method:create","shipping_method:create","delivery_time:create"]},deleter:{privileges:["payment_method:delete"]}}})},gF78:function(t,e){t.exports='{% block postfinancecheckout_order_action_refund_by_amount %}\n\n\n\t{% block postfinancecheckout_order_action_refund_amount_by_amount %}\n\t\t\n\t\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_order_action_refund_confirm_button_by_amount %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n'},heDV:function(t,e){t.exports='{% block postfinancecheckout_settings_content_card_channel_config_credentials %}\n\t\n\n\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container %}\n\t\t\t\n\n\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings %}\n\t\t\t\t\t
    \n\n\t\t\t\t\t\t{% block postfinancecheckout_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 postfinancecheckout_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 postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_application_key %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\t\t\t\t\t
    \n\t\t\t\t{% endblock %}\n\t\t\t
    \n\t\t{% endblock %}\n\t\n\n{% endblock %}\n'},juBS:function(t,e){t.exports='\n\t\n\t\t
    \n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
    \n\t
    \n
    \n\n'},tYm5:function(t,e){t.exports='{% block sw_order_detail_content_tabs_general %}\n {% parent %}\n\n\n\t{{ $tc(\'postfinancecheckout-order.header\') }}\n\n{% endblock %}\n\n{% block sw_order_detail_actions_slot_smart_bar_actions %}\n\n{% endblock %}\n'},wwge:function(t,e){t.exports='{% block postfinancecheckout_settings_icon %}\n \n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n{% endblock %}\n'},x5wL:function(t){t.exports=JSON.parse('{"postfinancecheckout-order":{"buttons":{"label":{"completion":"Terminée","download-invoice":"Télécharger la facture","download-packing-slip":"Télécharger le bordereau d\'expédition","refund":"Créer un nouveau remboursement","void":"Annulez l\'autorisation","refund-whole-line-item":"Remboursement de la ligne entière","refund-line-item-by-quantity":"Remboursement par quantité"}},"captureAction":{"button":{"text":"Capture du paiement"},"currentAmount":"Montant","isFinal":"C\'est la capture finale","maxAmount":"Montant maximal","successMessage":"Votre capture a été réussie.","successTitle":"Succès"},"general":{"title":"Commandes"},"header":"PostFinanceCheckout Paiement","lineItem":{"cardTitle":"Articles de ligne","types":{"amountIncludingTax":"Montant","name":"Nom","quantity":"Quantité","taxAmount":"Taxes","type":"Type","uniqueId":"ID unique"}},"modal":{"title":{"capture":"Capture","refund":"Nouveau remboursement","void":"Annulez l\'autorisation"}},"paymentDetails":{"cardTitle":"Paiement","error":{"title":"Erreur dans la récupération des détails du paiement à partir de PostFinanceCheckout"}},"refund":{"cardTitle":"Remboursements","refundAmount":{"label":"Montant du remboursement"},"refundQuantity":{"label":"Quantité à rembourser"},"types":{"amount":"Montant","createdOn":"Créé le","id":"ID","state":"État"}},"refundAction":{"confirmButton":{"text":"Exécutez"},"refundAmount":{"label":"Montant","placeholder":"Entrez un montant"},"successMessage":"Votre remboursement a été effectué avec succès.","successTitle":"Succès","maxAvailableItemsToRefund":"Nombre maximum d\'articles disponibles pour le remboursement"},"transactionHistory":{"cardTitle":"Détails","types":{"authorized_amount":"Montant autorisé","currency":"Monnaie","customer":"Client","payment_method":"Mode de paiement","state":"État","transaction":"Transaction"}},"voidAction":{"confirm":{"button":{"cancel":"Non","confirm":"Annulez l\'autorisation"},"message":"Voulez-vous vraiment annuler ce paiement?"},"successMessage":"Le paiement a été annulé avec succès.","successTitle":"Succès"}}}')},ygOZ:function(t,e){t.exports='{% block postfinancecheckout_order_action_void %}\n\n\n\t{% block postfinancecheckout_order_action_void_amount %}\n\t\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_order_action_void_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n'},ypuE:function(t,e,n){"use strict";n.r(e);var o=n("tYm5"),a=n.n(o),i=(n("PwZK"),Shopware),c=i.Component,r=i.Context,s=Shopware.Data.Criteria;c.override("sw-order-detail",{template:a.a,data:function(){return{isPostFinanceCheckoutPayment:!1}},computed:{isEditable:function(){return!this.isPostFinanceCheckoutPayment||"postfinancecheckout.order.detail"!==this.$route.name},showTabs:function(){return!0}},watch:{orderId:{deep:!0,handler:function(){var t=this;if(this.orderId){var e=this.repositoryFactory.create("order"),n=new s(1,1);n.addAssociation("transactions"),e.get(this.orderId,r.api,n).then((function(e){if(e.amountTotal<=0||e.transactions.length<=0||!e.transactions[0].paymentMethodId)t.setIsPostFinanceCheckoutPayment(null);else{var n=e.transactions[0].paymentMethodId;null!=n&&t.setIsPostFinanceCheckoutPayment(n)}}))}else this.setIsPostFinanceCheckoutPayment(null)},immediate:!0}},methods:{setIsPostFinanceCheckoutPayment:function(t){var e=this;t&&this.repositoryFactory.create("payment_method").get(t,r.api).then((function(t){e.isPostFinanceCheckoutPayment="handler_postfinancecheckoutpayment_postfinancecheckoutpaymenthandler"===t.formattedHandlerIdentifier}))}}});var l=n("FLPB"),u=n.n(l),d=Shopware,p=d.Component,f=d.Mixin,h=d.Filter,m=d.Utils;p.register("postfinancecheckout-order-action-completion",{template:u.a,inject:["PostFinanceCheckoutTransactionCompletionService"],mixins:[f.getByName("notification")],props:{transactionData:{type:Object,required:!0}},data:function(){return{isLoading:!0,isCompletion:!1}},computed:{dateFilter:function(){return h.getByName("date")}},created:function(){this.createdComponent()},methods:{createdComponent:function(){this.isLoading=!1},completion:function(){var t=this;this.isCompletion&&(this.isLoading=!0,this.PostFinanceCheckoutTransactionCompletionService.createTransactionCompletion(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id).then((function(){t.createNotificationSuccess({title:t.$tc("postfinancecheckout-order.captureAction.successTitle"),message:t.$tc("postfinancecheckout-order.captureAction.successMessage")}),t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(m.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(m.createId()))}))}})))}}});var g=n("H4Kp"),_=n.n(g),b=Shopware,y=b.Component,k=b.Mixin,I=b.Filter,C=b.Utils;y.register("postfinancecheckout-order-action-refund",{template:_.a,inject:["PostFinanceCheckoutRefundService"],mixins:[k.getByName("notification")],props:{transactionData:{type:Object,required:!0},orderId:{type:String,required:!0}},data:function(){return{refundQuantity:1,transactionData:{},isLoading:!0,currentLineItem:""}},computed:{dateFilter:function(){return I.getByName("date")}},created:function(){this.createdComponent()},methods:{createdComponent:function(){this.isLoading=!1},refund:function(){var t=this;this.isLoading=!0,this.PostFinanceCheckoutRefundService.createRefund(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,this.refundQuantity,this.$parent.currentLineItem).then((function(){t.createNotificationSuccess({title:t.$tc("postfinancecheckout-order.refundAction.successTitle"),message:t.$tc("postfinancecheckout-order.refundAction.successMessage")}),t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(C.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(C.createId()))}))}}))}}});var w=n("gF78"),v=n.n(w),O=Shopware,E=O.Component,S=O.Mixin,N=O.Filter,F=O.Utils;E.register("postfinancecheckout-order-action-refund-by-amount",{template:v.a,inject:["PostFinanceCheckoutRefundService"],mixins:[S.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 N.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.PostFinanceCheckoutRefundService.createRefundByAmount(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,this.refundAmount).then((function(){t.createNotificationSuccess({title:t.$tc("postfinancecheckout-order.refundAction.successTitle"),message:t.$tc("postfinancecheckout-order.refundAction.successMessage")}),t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(F.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(F.createId()))}))}}))}}});var D=n("ygOZ"),P=n.n(D),T=Shopware,A=T.Component,x=T.Mixin,L=T.Filter,$=T.Utils;A.register("postfinancecheckout-order-action-void",{template:P.a,inject:["PostFinanceCheckoutTransactionVoidService"],mixins:[x.getByName("notification")],props:{transactionData:{type:Object,required:!0}},data:function(){return{isLoading:!0,isVoid:!1}},computed:{dateFilter:function(){return L.getByName("date")},lineItemColumns:function(){return[{property:"uniqueId",label:this.$tc("postfinancecheckout-order.refund.types.uniqueId"),rawData:!1,allowResize:!0,primary:!0,width:"auto"},{property:"name",label:this.$tc("postfinancecheckout-order.refund.types.name"),rawData:!0,allowResize:!0,sortable:!0,width:"auto"},{property:"quantity",label:this.$tc("postfinancecheckout-order.refund.types.quantity"),rawData:!0,allowResize:!0,width:"auto"},{property:"amountIncludingTax",label:this.$tc("postfinancecheckout-order.refund.types.amountIncludingTax"),rawData:!0,allowResize:!0,inlineEdit:"string",width:"auto"},{property:"type",label:this.$tc("postfinancecheckout-order.refund.types.type"),rawData:!0,allowResize:!0,sortable:!0,width:"auto"},{property:"taxAmount",label:this.$tc("postfinancecheckout-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.PostFinanceCheckoutTransactionVoidService.createTransactionVoid(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id).then((function(){t.createNotificationSuccess({title:t.$tc("postfinancecheckout-order.voidAction.successTitle"),message:t.$tc("postfinancecheckout-order.voidAction.successMessage")}),t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat($.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($.createId()))}))}})))}}});var R=n("VP8G"),B=n.n(R),j=(n("2zY8"),Shopware),M=j.Component,G=j.Mixin,V=j.Filter,q=j.Context,U=j.Utils,H=Shopware.Data.Criteria;M.register("postfinancecheckout-order-detail",{template:B.a,inject:["PostFinanceCheckoutTransactionService","PostFinanceCheckoutRefundService","repositoryFactory"],mixins:[G.getByName("notification")],data:function(){return{transactionData:{transactions:[],refunds:[]},transaction:{},lineItems:[],refundableQuantity:0,isLoading:!0,orderId:"",currency:"",modalType:"",refundAmount:0,refundableAmount:0,currentLineItem:"",refundLineItem:[]}},metaInfo:function(){return{title:this.$tc("postfinancecheckout-order.header")}},computed:{dateFilter:function(){return V.getByName("date")},relatedResourceColumns:function(){return[{property:"paymentConnectorConfiguration.name",label:this.$tc("postfinancecheckout-order.transactionHistory.types.payment_method"),rawData:!0},{property:"state",label:this.$tc("postfinancecheckout-order.transactionHistory.types.state"),rawData:!0},{property:"currency",label:this.$tc("postfinancecheckout-order.transactionHistory.types.currency"),rawData:!0},{property:"authorized_amount",label:this.$tc("postfinancecheckout-order.transactionHistory.types.authorized_amount"),rawData:!0},{property:"id",label:this.$tc("postfinancecheckout-order.transactionHistory.types.transaction"),rawData:!0},{property:"customerId",label:this.$tc("postfinancecheckout-order.transactionHistory.types.customer"),rawData:!0}]},lineItemColumns:function(){return[{property:"uniqueId",label:this.$tc("postfinancecheckout-order.lineItem.types.uniqueId"),rawData:!0,visible:!1,primary:!0},{property:"name",label:this.$tc("postfinancecheckout-order.lineItem.types.name"),rawData:!0},{property:"quantity",label:this.$tc("postfinancecheckout-order.lineItem.types.quantity"),rawData:!0},{property:"amountIncludingTax",label:this.$tc("postfinancecheckout-order.lineItem.types.amountIncludingTax"),rawData:!0},{property:"type",label:this.$tc("postfinancecheckout-order.lineItem.types.type"),rawData:!0},{property:"taxAmount",label:this.$tc("postfinancecheckout-order.lineItem.types.taxAmount"),rawData:!0},{property:"refundableQuantity",rawData:!0,visible:!1}]},refundColumns:function(){return[{property:"id",label:this.$tc("postfinancecheckout-order.refund.types.id"),rawData:!0,visible:!0,primary:!0},{property:"amount",label:this.$tc("postfinancecheckout-order.refund.types.amount"),rawData:!0},{property:"state",label:this.$tc("postfinancecheckout-order.refund.types.state"),rawData:!0},{property:"createdOn",label:this.$tc("postfinancecheckout-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 H(1,1);n.addAssociation("transactions"),n.getAssociation("transactions").addSorting(H.sort("createdAt","DESC")),e.get(this.orderId,q.api,n).then((function(e){t.order=e,t.isLoading=!1;var n=0,o=0,a=e.transactions[0].customFields.postfinancecheckout_transaction_id;t.PostFinanceCheckoutTransactionService.getTransactionData(e.salesChannelId,a).then((function(e){t.currency=e.transactions[0].currency,e.transactions[0].authorized_amount=U.format.currency(e.transactions[0].authorizationAmount,t.currency),e.refunds.forEach((function(e){o=parseFloat(parseFloat(o)+parseFloat(e.amount)),e.amount=U.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=U.format.currency(e.amountIncludingTax,t.currency),e.taxAmount=U.format.currency(e.taxAmount,t.currency),n=parseFloat(e.unitPriceIncludingTax*e.quantity),e.refundableQuantity=parseInt(parseInt(e.quantity)-parseInt(t.refundLineItem[e.uniqueId]||0))})),t.lineItems=e.transactions[0].lineItems,t.transactionData=e,t.transaction=t.transactionData.transactions[0],t.refundAmount=Number(t.transactionData.transactions[0].amountIncludingTax),t.refundableAmount=parseFloat(parseFloat(n)-parseFloat(o))})).catch((function(e){try{t.createNotificationError({title:t.$tc("postfinancecheckout-order.paymentDetails.error.title"),message:e.message,autoClose:!1})}catch(n){t.createNotificationError({title:t.$tc("postfinancecheckout-order.paymentDetails.error.title"),message:e.message,autoClose:!1})}finally{t.isLoading=!1}}))}))},downloadPackingSlip:function(){window.open(this.PostFinanceCheckoutTransactionService.getPackingSlip(this.transaction.metaData.salesChannelId,this.transaction.id),"_blank")},downloadInvoice:function(){window.open(this.PostFinanceCheckoutTransactionService.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.PostFinanceCheckoutRefundService.createRefund(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,0,t).then((function(){e.createNotificationSuccess({title:e.$tc("postfinancecheckout-order.refundAction.successTitle"),message:e.$tc("postfinancecheckout-order.refundAction.successMessage")}),e.isLoading=!1,e.$emit("modal-close"),e.$nextTick((function(){e.$router.replace("".concat(e.$route.path,"?hash=").concat(U.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(U.createId()))}))}}))}}});var z=n("/iC3"),W=n("FCMq"),K=n("x5wL");Shopware.Module.register("postfinancecheckout-order",{type:"plugin",name:"PostFinanceCheckout",title:"postfinancecheckout-order.general.title",description:"postfinancecheckout-order.general.descriptionTextModule",version:"1.0.0",targetVersion:"1.0.0",color:"#2b52ff",snippets:{"de-DE":z,"en-GB":W,"fr-FR":K},routeMiddleware:function(t,e){"sw.order.detail"===e.name&&e.children.push({component:"postfinancecheckout-order-detail",name:"postfinancecheckout.order.detail",isChildren:!0,path:"/sw/order/postfinancecheckout/detail/:id"}),t(e)}});n("aubh");var Y=n("Hmsx"),Q=n.n(Y),Z="PostFinanceCheckoutPayment.config",J={CONFIG_DOMAIN:Z,CONFIG_APPLICATION_KEY:"PostFinanceCheckoutPayment.config.applicationKey",CONFIG_EMAIL_ENABLED:"PostFinanceCheckoutPayment.config.emailEnabled",CONFIG_INTEGRATION:"PostFinanceCheckoutPayment.config.integration",CONFIG_LINE_ITEM_CONSISTENCY_ENABLED:"PostFinanceCheckoutPayment.config.lineItemConsistencyEnabled",CONFIG_SPACE_ID:"PostFinanceCheckoutPayment.config.spaceId",CONFIG_SPACE_VIEW_ID:"PostFinanceCheckoutPayment.config.spaceViewId",CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED:"PostFinanceCheckoutPayment.config.storefrontInvoiceDownloadEnabled",CONFIG_USER_ID:"PostFinanceCheckoutPayment.config.userId",CONFIG_IS_SHOWCASE:"PostFinanceCheckoutPayment.config.isShowcase",CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED:"PostFinanceCheckoutPayment.config.storefrontWebhooksUpdateEnabled",CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED:"PostFinanceCheckoutPayment.config.storefrontPaymentsUpdateEnabled"};function X(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function tt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var et=Shopware,nt=et.Component,ot=et.Mixin;nt.register("postfinancecheckout-settings",{template:Q.a,inject:["PostFinanceCheckoutConfigurationService"],mixins:[ot.getByName("notification")],data:function(){return function(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:"postfinancecheckout";return Lt(this,i),a.call(this,t,e,n)}return e=i,(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 Gt.handleResponse(t)}))}},{key:"setPostFinanceCheckoutAsSalesChannelPaymentDefault",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-postfinancecheckout-as-sales-channel-payment-default");return this.httpClient.post(n,{salesChannelId:t},{headers:e}).then((function(t){return Gt.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 Gt.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 Gt.handleResponse(t)}))}}])&&$t(e.prototype,n),o&&$t(e,o),i}(Gt);function qt(t){return(qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ut(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ht(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"postfinancecheckout";return Ut(this,i),a.call(this,t,e,n)}return e=i,(n=[{key:"createRefund",value:function(t,e,n,o){var a=this.getBasicHeaders(),i="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/refund/create-refund/");return this.httpClient.post(i,{salesChannelId:t,transactionId:e,quantity:n,lineItemId:o},{headers:a}).then((function(t){return Qt.handleResponse(t)}))}},{key:"createRefundByAmount",value:function(t,e,n){var o=this.getBasicHeaders(),a="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/refund/create-refund-by-amount/");return this.httpClient.post(a,{salesChannelId:t,transactionId:e,refundableAmount:n},{headers:o}).then((function(t){return Qt.handleResponse(t)}))}}])&&Ht(e.prototype,n),o&&Ht(e,o),i}(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]:"postfinancecheckout";return Xt(this,i),a.call(this,t,e,n)}return e=i,(n=[{key:"getTransactionData",value:function(t,e){var n=this.getBasicHeaders(),o="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction/get-transaction-data/");return this.httpClient.post(o,{salesChannelId:t,transactionId:e},{headers:n}).then((function(t){return ie.handleResponse(t)}))}},{key:"getInvoiceDocument",value:function(t,e){return"".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction/get-invoice-document/").concat(t,"/").concat(e)}},{key:"getPackingSlip",value:function(t,e){return"".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction/get-packing-slip/").concat(t,"/").concat(e)}}])&&te(e.prototype,n),o&&te(e,o),i}(ie);function re(t){return(re="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 se(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function le(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"postfinancecheckout";return se(this,i),a.call(this,t,e,n)}return e=i,(n=[{key:"createTransactionCompletion",value:function(t,e){var n=this.getBasicHeaders(),o="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction-completion/create-transaction-completion/");return this.httpClient.post(o,{salesChannelId:t,transactionId:e},{headers:n}).then((function(t){return he.handleResponse(t)}))}}])&&le(e.prototype,n),o&&le(e,o),i}(he);function ge(t){return(ge="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 _e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function be(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"postfinancecheckout";return _e(this,i),a.call(this,t,e,n)}return e=i,(n=[{key:"createTransactionVoid",value:function(t,e){var n=this.getBasicHeaders(),o="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction-void/create-transaction-void/");return this.httpClient.post(o,{salesChannelId:t,transactionId:e},{headers:n}).then((function(t){return we.handleResponse(t)}))}}])&&be(e.prototype,n),o&&be(e,o),i}(we),Oe=Shopware.Application;Oe.addServiceProvider("PostFinanceCheckoutConfigurationService",(function(t){var e=Oe.getContainer("init");return new Vt(e.httpClient,t.loginService)})),Oe.addServiceProvider("PostFinanceCheckoutRefundService",(function(t){var e=Oe.getContainer("init");return new Zt(e.httpClient,t.loginService)})),Oe.addServiceProvider("PostFinanceCheckoutTransactionService",(function(t){var e=Oe.getContainer("init");return new ce(e.httpClient,t.loginService)})),Oe.addServiceProvider("PostFinanceCheckoutTransactionCompletionService",(function(t){var e=Oe.getContainer("init");return new me(e.httpClient,t.loginService)})),Oe.addServiceProvider("PostFinanceCheckoutTransactionVoidService",(function(t){var e=Oe.getContainer("init");return new ve(e.httpClient,t.loginService)}))}}); \ No newline at end of file +!function(t){var e={};function n(o){if(e[o])return e[o].exports;var a=e[o]={i:o,l:!1,exports:{}};return t[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(o,a,function(e){return t[e]}.bind(null,a));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/bundles/postfinancecheckoutpayment/",n(n.s="ypuE")}({"/iC3":function(t){t.exports=JSON.parse('{"postfinancecheckout-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":"PostFinanceCheckout 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 PostFinanceCheckout"}},"refund":{"cardTitle":"Gutschriften","refundAmount":{"label":"Gutschriftsbetrag"},"refundQuantity":{"label":"Refund Menge"},"types":{"amount":"Betrag","createdOn":"Erstellt am","id":"ID","state":"Staat"}},"refundAction":{"confirmButton":{"text":"Ausführen"},"refundAmount":{"label":"Betrag","placeholder":"Einen Betrag eingeben"},"successMessage":"Ihre Rückerstattung war erfolgreich","successTitle":"Erfolg","maxAvailableItemsToRefund":"Maximal Verfügbare Artikel zum Erstatten"},"transactionHistory":{"cardTitle":"Einzelheiten","types":{"authorized_amount":"Autorisierter Betrag","currency":"Währung","customer":"Kunde","payment_method":"Zahlungsweise","state":"Staat","transaction":"Transaktion"}},"voidAction":{"confirm":{"button":{"cancel":"Nein","confirm":"Autorisierung aufheben"},"message":"Wollen Sie diese Zahlung wirklich stornieren?"},"successMessage":"Die Zahlung wurde erfolgreich annulliert","successTitle":"Erfolg"}}}')},"2zY8":function(t,e,n){var o=n("6Ef7");"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);(0,n("SZ7m").default)("52fac0e8",o,!0,{})},"6Ef7":function(t,e,n){},ADsd:function(t,e,n){},FCMq:function(t){t.exports=JSON.parse('{"postfinancecheckout-order":{"buttons":{"label":{"completion":"Complete","download-invoice":"Download Invoice","download-packing-slip":"Download Packing Slip","refund":"Create a new refund","void":"Cancel authorization","refund-whole-line-item":"Refund whole line item","refund-line-item-by-quantity":"Refund by quantity"}},"captureAction":{"button":{"text":"Capture payment"},"currentAmount":"Amount","isFinal":"This is final capture","maxAmount":"Maximum amount","successMessage":"Your capture was successful.","successTitle":"Success"},"general":{"title":"Orders"},"header":"PostFinanceCheckout Payment","lineItem":{"cardTitle":"Line Items","types":{"amountIncludingTax":"Amount","name":"Name","quantity":"Quantity","taxAmount":"Taxes","type":"Type","uniqueId":"Unique ID"}},"modal":{"title":{"capture":"Capture","refund":"New refund","void":"Cancel authorization"}},"paymentDetails":{"cardTitle":"Payment","error":{"title":"Error fetching payment details from PostFinanceCheckout"}},"refund":{"cardTitle":"Refunds","refundAmount":{"label":"Refund Amount"},"refundQuantity":{"label":"Refund Quantity"},"types":{"amount":"Amount","createdOn":"Created On","id":"ID","state":"State"}},"refundAction":{"confirmButton":{"text":"Execute"},"refundAmount":{"label":"Amount","placeholder":"Enter a amount"},"successMessage":"Your refund was successful.","successTitle":"Success","maxAvailableItemsToRefund":"Maximum available items to refund"},"transactionHistory":{"cardTitle":"Details","types":{"authorized_amount":"Authorized Amount","currency":"Currency","customer":"Customer","payment_method":"Payment Method","state":"State","transaction":"Transaction"}},"voidAction":{"confirm":{"button":{"cancel":"No","confirm":"Cancel authorization"},"message":"Do you really want to cancel this payment?"},"successMessage":"The payment was successfully voided.","successTitle":"Success"}}}')},FJBk:function(t){t.exports=JSON.parse('{"postfinancecheckout-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 PostFinanceCheckout","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 PostFinanceCheckout"}},"refund":{"cardTitle":"Rimborsi","refundAmount":{"label":"Importo del rimborso"},"refundQuantity":{"label":"Quantità di rimborso"},"types":{"amount":"Importo","createdOn":"Creato il","id":"ID","state":"Stato"}},"refundAction":{"confirmButton":{"text":"Esegui"},"refundAmount":{"label":"Importo","placeholder":"Inserisci un importo"},"successMessage":"Il tuo rimborso è andato a buon fine.","successTitle":"Successo","maxAvailableItemsToRefund":"Numero massimo di articoli disponibili da rimborsare"},"transactionHistory":{"cardTitle":"Dettagli","types":{"authorized_amount":"Importo autorizzato","currency":"Valuta","customer":"Cliente","payment_method":"Metodo di pagamento","state":"Stato","transaction":"Transazione"}},"voidAction":{"confirm":{"button":{"cancel":"No","confirm":"Annulla autorizzazione"},"message":"Vuoi davvero annullare questo pagamento?"},"successMessage":"Il pagamento è stato annullato con successo.","successTitle":"Successo"}}}')},FLPB:function(t,e){t.exports='{% block postfinancecheckout_order_action_completion %}\n\n\n\t{% block postfinancecheckout_order_action_completion_amount %}\n\t\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_order_action_completion_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n'},H4Kp:function(t,e){t.exports='{% block postfinancecheckout_order_action_refund %}\n\n\n\t{% block postfinancecheckout_order_action_refund_amount %}\n\n\t\t\n\t\t\n\n\t\t
    \n\t\t\t{{ $tc(\'postfinancecheckout-order.refundAction.maxAvailableItemsToRefund\') }}:\n\t\t\t{{ this.$parent.refundableQuantity }}\n\t\t
    \n\t{% endblock %}\n\n\t{% block postfinancecheckout_order_action_refund_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n
    \n{% endblock %}\n'},Hmsx:function(t,e){t.exports='{% block postfinancecheckout_settings %}\n\n\n\t{% block postfinancecheckout_settings_header %}\n\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_settings_actions %}\n\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_settings_content %}\n\t\n\t{% endblock %}\n\n{% endblock %}'},PwZK:function(t,e,n){var o=n("ADsd");"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);(0,n("SZ7m").default)("4addc608",o,!0,{})},SZ7m:function(t,e,n){"use strict";function o(t,e){for(var n=[],o={},a=0;an.parts.length&&(o.parts.length=n.parts.length)}else{var r=[];for(a=0;a\n\n\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container %}\n\t\t\t\n\n\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings %}\n\t\t\t\t\t
    \n\n\t\t\t\t\t\t{% block postfinancecheckout_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 postfinancecheckout_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 postfinancecheckout_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 postfinancecheckout_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'},Uo3W:function(t,e){t.exports='\n\t\n\t\t
    \n\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
    \n\t
    \n
    \n\n'},VP8G:function(t,e){t.exports='{% block postfinancecheckout_order_detail %}\n
    \n\t
    \n\t\t\n\t\t\t\n\t\t\n\t\t{% block postfinancecheckout_order_transaction_history_card %}\n\t\t\n\t\t\t\n\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_transaction_line_items_card %}\n\t\t\n\t\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_transaction_refunds_card %}\n\t\t\n\t\t\t\n\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_actions_modal_refund %}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_actions_modal_refund_by_amount %}\n\t\t\t\n\t\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_actions_modal_completion%}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_actions_modal_void %}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t
    \n\t\n
    \n{% endblock %}\n'},aubh:function(t,e){Shopware.Service("privileges").addPrivilegeMappingEntry({category:"permissions",parent:"postfinancecheckout",key:"postfinancecheckout",roles:{viewer:{privileges:["sales_channel:read","sales_channel_payment_method:read","system_config:read"],dependencies:[]},editor:{privileges:["sales_channel:update","sales_channel_payment_method:create","sales_channel_payment_method:update","system_config:update","system_config:create","system_config:delete"],dependencies:["postfinancecheckout.viewer"]}}}),Shopware.Service("privileges").addPrivilegeMappingEntry({category:"permissions",parent:null,key:"sales_channel",roles:{viewer:{privileges:["sales_channel_payment_method:read"]},editor:{privileges:["payment_method:update"]},creator:{privileges:["payment_method:create","shipping_method:create","delivery_time:create"]},deleter:{privileges:["payment_method:delete"]}}})},gF78:function(t,e){t.exports='{% block postfinancecheckout_order_action_refund_by_amount %}\n\n\n\t{% block postfinancecheckout_order_action_refund_amount_by_amount %}\n\t\t\n\t\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_order_action_refund_confirm_button_by_amount %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n'},heDV:function(t,e){t.exports='{% block postfinancecheckout_settings_content_card_channel_config_credentials %}\n\t\n\n\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container %}\n\t\t\t\n\n\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings %}\n\t\t\t\t\t
    \n\n\t\t\t\t\t\t{% block postfinancecheckout_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 postfinancecheckout_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 postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_application_key %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\t\t\t\t\t
    \n\t\t\t\t{% endblock %}\n\t\t\t
    \n\t\t{% endblock %}\n\t\n\n{% endblock %}\n'},juBS:function(t,e){t.exports='\n\t\n\t\t
    \n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
    \n\t
    \n
    \n\n'},tYm5:function(t,e){t.exports='{% block sw_order_detail_content_tabs_general %}\n {% parent %}\n\n\n\t{{ $tc(\'postfinancecheckout-order.header\') }}\n\n{% endblock %}\n\n{% block sw_order_detail_actions_slot_smart_bar_actions %}\n\n{% endblock %}\n'},wwge:function(t,e){t.exports='{% block postfinancecheckout_settings_icon %}\n \n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n{% endblock %}\n'},x5wL:function(t){t.exports=JSON.parse('{"postfinancecheckout-order":{"buttons":{"label":{"completion":"Terminée","download-invoice":"Télécharger la facture","download-packing-slip":"Télécharger le bordereau d\'expédition","refund":"Créer un nouveau remboursement","void":"Annulez l\'autorisation","refund-whole-line-item":"Remboursement de la ligne entière","refund-line-item-by-quantity":"Remboursement par quantité"}},"captureAction":{"button":{"text":"Capture du paiement"},"currentAmount":"Montant","isFinal":"C\'est la capture finale","maxAmount":"Montant maximal","successMessage":"Votre capture a été réussie.","successTitle":"Succès"},"general":{"title":"Commandes"},"header":"PostFinanceCheckout Paiement","lineItem":{"cardTitle":"Articles de ligne","types":{"amountIncludingTax":"Montant","name":"Nom","quantity":"Quantité","taxAmount":"Taxes","type":"Type","uniqueId":"ID unique"}},"modal":{"title":{"capture":"Capture","refund":"Nouveau remboursement","void":"Annulez l\'autorisation"}},"paymentDetails":{"cardTitle":"Paiement","error":{"title":"Erreur dans la récupération des détails du paiement à partir de PostFinanceCheckout"}},"refund":{"cardTitle":"Remboursements","refundAmount":{"label":"Montant du remboursement"},"refundQuantity":{"label":"Quantité à rembourser"},"types":{"amount":"Montant","createdOn":"Créé le","id":"ID","state":"État"}},"refundAction":{"confirmButton":{"text":"Exécutez"},"refundAmount":{"label":"Montant","placeholder":"Entrez un montant"},"successMessage":"Votre remboursement a été effectué avec succès.","successTitle":"Succès","maxAvailableItemsToRefund":"Nombre maximum d\'articles disponibles pour le remboursement"},"transactionHistory":{"cardTitle":"Détails","types":{"authorized_amount":"Montant autorisé","currency":"Monnaie","customer":"Client","payment_method":"Mode de paiement","state":"État","transaction":"Transaction"}},"voidAction":{"confirm":{"button":{"cancel":"Non","confirm":"Annulez l\'autorisation"},"message":"Voulez-vous vraiment annuler ce paiement?"},"successMessage":"Le paiement a été annulé avec succès.","successTitle":"Succès"}}}')},ygOZ:function(t,e){t.exports='{% block postfinancecheckout_order_action_void %}\n\n\n\t{% block postfinancecheckout_order_action_void_amount %}\n\t\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_order_action_void_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n'},ypuE:function(t,e,n){"use strict";n.r(e);var o=n("tYm5"),a=n.n(o),i=(n("PwZK"),Shopware),r=i.Component,c=i.Context,s=Shopware.Data.Criteria;r.override("sw-order-detail",{template:a.a,data:function(){return{isPostFinanceCheckoutPayment:!1}},computed:{isEditable:function(){return!this.isPostFinanceCheckoutPayment||"postfinancecheckout.order.detail"!==this.$route.name},showTabs:function(){return!0}},watch:{orderId:{deep:!0,handler:function(){var t=this;if(this.orderId){var e=this.repositoryFactory.create("order"),n=new s(1,1);n.addAssociation("transactions"),e.get(this.orderId,c.api,n).then((function(e){if(e.amountTotal<=0||e.transactions.length<=0||!e.transactions[0].paymentMethodId)t.setIsPostFinanceCheckoutPayment(null);else{var n=e.transactions[0].paymentMethodId;null!=n&&t.setIsPostFinanceCheckoutPayment(n)}}))}else this.setIsPostFinanceCheckoutPayment(null)},immediate:!0}},methods:{setIsPostFinanceCheckoutPayment:function(t){var e=this;t&&this.repositoryFactory.create("payment_method").get(t,c.api).then((function(t){e.isPostFinanceCheckoutPayment="handler_postfinancecheckoutpayment_postfinancecheckoutpaymenthandler"===t.formattedHandlerIdentifier}))}}});var l=n("FLPB"),u=n.n(l),d=Shopware,p=d.Component,f=d.Mixin,h=d.Filter,m=d.Utils;p.register("postfinancecheckout-order-action-completion",{template:u.a,inject:["PostFinanceCheckoutTransactionCompletionService"],mixins:[f.getByName("notification")],props:{transactionData:{type:Object,required:!0}},data:function(){return{isLoading:!0,isCompletion:!1}},computed:{dateFilter:function(){return h.getByName("date")}},created:function(){this.createdComponent()},methods:{createdComponent:function(){this.isLoading=!1},completion:function(){var t=this;this.isCompletion&&(this.isLoading=!0,this.PostFinanceCheckoutTransactionCompletionService.createTransactionCompletion(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id).then((function(){t.createNotificationSuccess({title:t.$tc("postfinancecheckout-order.captureAction.successTitle"),message:t.$tc("postfinancecheckout-order.captureAction.successMessage")}),t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(m.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(m.createId()))}))}})))}}});var g=n("H4Kp"),_=n.n(g),b=Shopware,y=b.Component,k=b.Mixin,I=b.Filter,C=b.Utils;y.register("postfinancecheckout-order-action-refund",{template:_.a,inject:["PostFinanceCheckoutRefundService"],mixins:[k.getByName("notification")],props:{transactionData:{type:Object,required:!0},orderId:{type:String,required:!0}},data:function(){return{refundQuantity:1,transactionData:{},isLoading:!0,currentLineItem:""}},computed:{dateFilter:function(){return I.getByName("date")}},created:function(){this.createdComponent()},methods:{createdComponent:function(){this.isLoading=!1},refund:function(){var t=this;this.isLoading=!0,this.PostFinanceCheckoutRefundService.createRefund(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,this.refundQuantity,this.$parent.currentLineItem).then((function(){t.createNotificationSuccess({title:t.$tc("postfinancecheckout-order.refundAction.successTitle"),message:t.$tc("postfinancecheckout-order.refundAction.successMessage")}),t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(C.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(C.createId()))}))}}))}}});var w=n("gF78"),v=n.n(w),O=Shopware,E=O.Component,S=O.Mixin,N=O.Filter,F=O.Utils;E.register("postfinancecheckout-order-action-refund-by-amount",{template:v.a,inject:["PostFinanceCheckoutRefundService"],mixins:[S.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 N.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.PostFinanceCheckoutRefundService.createRefundByAmount(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,this.refundAmount).then((function(){t.createNotificationSuccess({title:t.$tc("postfinancecheckout-order.refundAction.successTitle"),message:t.$tc("postfinancecheckout-order.refundAction.successMessage")}),t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(F.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(F.createId()))}))}}))}}});var D=n("ygOZ"),T=n.n(D),P=Shopware,A=P.Component,x=P.Mixin,L=P.Filter,R=P.Utils;A.register("postfinancecheckout-order-action-void",{template:T.a,inject:["PostFinanceCheckoutTransactionVoidService"],mixins:[x.getByName("notification")],props:{transactionData:{type:Object,required:!0}},data:function(){return{isLoading:!0,isVoid:!1}},computed:{dateFilter:function(){return L.getByName("date")},lineItemColumns:function(){return[{property:"uniqueId",label:this.$tc("postfinancecheckout-order.refund.types.uniqueId"),rawData:!1,allowResize:!0,primary:!0,width:"auto"},{property:"name",label:this.$tc("postfinancecheckout-order.refund.types.name"),rawData:!0,allowResize:!0,sortable:!0,width:"auto"},{property:"quantity",label:this.$tc("postfinancecheckout-order.refund.types.quantity"),rawData:!0,allowResize:!0,width:"auto"},{property:"amountIncludingTax",label:this.$tc("postfinancecheckout-order.refund.types.amountIncludingTax"),rawData:!0,allowResize:!0,inlineEdit:"string",width:"auto"},{property:"type",label:this.$tc("postfinancecheckout-order.refund.types.type"),rawData:!0,allowResize:!0,sortable:!0,width:"auto"},{property:"taxAmount",label:this.$tc("postfinancecheckout-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.PostFinanceCheckoutTransactionVoidService.createTransactionVoid(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id).then((function(){t.createNotificationSuccess({title:t.$tc("postfinancecheckout-order.voidAction.successTitle"),message:t.$tc("postfinancecheckout-order.voidAction.successMessage")}),t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(R.createId()))}))})).catch((function(e){try{t.createNotificationError({title:e.response.data.errors[0].title,message:e.response.data.errors[0].detail,autoClose:!1})}catch(n){t.createNotificationError({title:e.title,message:e.message,autoClose:!1})}finally{t.isLoading=!1,t.$emit("modal-close"),t.$nextTick((function(){t.$router.replace("".concat(t.$route.path,"?hash=").concat(R.createId()))}))}})))}}});var $=n("VP8G"),B=n.n($),M=(n("2zY8"),Shopware),j=M.Component,G=M.Mixin,V=M.Filter,q=M.Context,U=M.Utils,z=Shopware.Data.Criteria;j.register("postfinancecheckout-order-detail",{template:B.a,inject:["PostFinanceCheckoutTransactionService","PostFinanceCheckoutRefundService","repositoryFactory"],mixins:[G.getByName("notification")],data:function(){return{transactionData:{transactions:[],refunds:[]},transaction:{},lineItems:[],refundableQuantity:0,isLoading:!0,orderId:"",currency:"",modalType:"",refundAmount:0,refundableAmount:0,currentLineItem:"",refundLineItem:[]}},metaInfo:function(){return{title:this.$tc("postfinancecheckout-order.header")}},computed:{dateFilter:function(){return V.getByName("date")},relatedResourceColumns:function(){return[{property:"paymentConnectorConfiguration.name",label:this.$tc("postfinancecheckout-order.transactionHistory.types.payment_method"),rawData:!0},{property:"state",label:this.$tc("postfinancecheckout-order.transactionHistory.types.state"),rawData:!0},{property:"currency",label:this.$tc("postfinancecheckout-order.transactionHistory.types.currency"),rawData:!0},{property:"authorized_amount",label:this.$tc("postfinancecheckout-order.transactionHistory.types.authorized_amount"),rawData:!0},{property:"id",label:this.$tc("postfinancecheckout-order.transactionHistory.types.transaction"),rawData:!0},{property:"customerId",label:this.$tc("postfinancecheckout-order.transactionHistory.types.customer"),rawData:!0}]},lineItemColumns:function(){return[{property:"uniqueId",label:this.$tc("postfinancecheckout-order.lineItem.types.uniqueId"),rawData:!0,visible:!1,primary:!0},{property:"name",label:this.$tc("postfinancecheckout-order.lineItem.types.name"),rawData:!0},{property:"quantity",label:this.$tc("postfinancecheckout-order.lineItem.types.quantity"),rawData:!0},{property:"amountIncludingTax",label:this.$tc("postfinancecheckout-order.lineItem.types.amountIncludingTax"),rawData:!0},{property:"type",label:this.$tc("postfinancecheckout-order.lineItem.types.type"),rawData:!0},{property:"taxAmount",label:this.$tc("postfinancecheckout-order.lineItem.types.taxAmount"),rawData:!0},{property:"refundableQuantity",rawData:!0,visible:!1}]},refundColumns:function(){return[{property:"id",label:this.$tc("postfinancecheckout-order.refund.types.id"),rawData:!0,visible:!0,primary:!0},{property:"amount",label:this.$tc("postfinancecheckout-order.refund.types.amount"),rawData:!0},{property:"state",label:this.$tc("postfinancecheckout-order.refund.types.state"),rawData:!0},{property:"createdOn",label:this.$tc("postfinancecheckout-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 z(1,1);n.addAssociation("transactions"),n.getAssociation("transactions").addSorting(z.sort("createdAt","DESC")),e.get(this.orderId,q.api,n).then((function(e){t.order=e,t.isLoading=!1;var n=0,o=0,a=e.transactions[0].customFields.postfinancecheckout_transaction_id;t.PostFinanceCheckoutTransactionService.getTransactionData(e.salesChannelId,a).then((function(e){t.currency=e.transactions[0].currency,e.transactions[0].authorized_amount=U.format.currency(e.transactions[0].authorizationAmount,t.currency),e.refunds.forEach((function(e){o=parseFloat(parseFloat(o)+parseFloat(e.amount)),e.amount=U.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=U.format.currency(e.amountIncludingTax,t.currency),e.taxAmount=U.format.currency(e.taxAmount,t.currency),n=parseFloat(e.unitPriceIncludingTax*e.quantity),e.refundableQuantity=parseInt(parseInt(e.quantity)-parseInt(t.refundLineItem[e.uniqueId]||0))})),t.lineItems=e.transactions[0].lineItems,t.transactionData=e,t.transaction=t.transactionData.transactions[0],t.refundAmount=Number(t.transactionData.transactions[0].amountIncludingTax),t.refundableAmount=parseFloat(parseFloat(n)-parseFloat(o))})).catch((function(e){try{t.createNotificationError({title:t.$tc("postfinancecheckout-order.paymentDetails.error.title"),message:e.message,autoClose:!1})}catch(n){t.createNotificationError({title:t.$tc("postfinancecheckout-order.paymentDetails.error.title"),message:e.message,autoClose:!1})}finally{t.isLoading=!1}}))}))},downloadPackingSlip:function(){window.open(this.PostFinanceCheckoutTransactionService.getPackingSlip(this.transaction.metaData.salesChannelId,this.transaction.id),"_blank")},downloadInvoice:function(){window.open(this.PostFinanceCheckoutTransactionService.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.PostFinanceCheckoutRefundService.createRefund(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,0,t).then((function(){e.createNotificationSuccess({title:e.$tc("postfinancecheckout-order.refundAction.successTitle"),message:e.$tc("postfinancecheckout-order.refundAction.successMessage")}),e.isLoading=!1,e.$emit("modal-close"),e.$nextTick((function(){e.$router.replace("".concat(e.$route.path,"?hash=").concat(U.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(U.createId()))}))}}))}}});var H=n("/iC3"),W=n("FCMq"),K=n("x5wL"),Y=n("FJBk");Shopware.Module.register("postfinancecheckout-order",{type:"plugin",name:"PostFinanceCheckout",title:"postfinancecheckout-order.general.title",description:"postfinancecheckout-order.general.descriptionTextModule",version:"1.0.0",targetVersion:"1.0.0",color:"#2b52ff",snippets:{"de-DE":H,"en-GB":W,"fr-FR":K,"it-IT":Y},routeMiddleware:function(t,e){"sw.order.detail"===e.name&&e.children.push({component:"postfinancecheckout-order-detail",name:"postfinancecheckout.order.detail",isChildren:!0,path:"/sw/order/postfinancecheckout/detail/:id"}),t(e)}});n("aubh");var Q=n("Hmsx"),Z=n.n(Q),J="PostFinanceCheckoutPayment.config",X={CONFIG_DOMAIN:J,CONFIG_APPLICATION_KEY:"PostFinanceCheckoutPayment.config.applicationKey",CONFIG_EMAIL_ENABLED:"PostFinanceCheckoutPayment.config.emailEnabled",CONFIG_INTEGRATION:"PostFinanceCheckoutPayment.config.integration",CONFIG_LINE_ITEM_CONSISTENCY_ENABLED:"PostFinanceCheckoutPayment.config.lineItemConsistencyEnabled",CONFIG_SPACE_ID:"PostFinanceCheckoutPayment.config.spaceId",CONFIG_SPACE_VIEW_ID:"PostFinanceCheckoutPayment.config.spaceViewId",CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED:"PostFinanceCheckoutPayment.config.storefrontInvoiceDownloadEnabled",CONFIG_USER_ID:"PostFinanceCheckoutPayment.config.userId",CONFIG_IS_SHOWCASE:"PostFinanceCheckoutPayment.config.isShowcase",CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED:"PostFinanceCheckoutPayment.config.storefrontWebhooksUpdateEnabled",CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED:"PostFinanceCheckoutPayment.config.storefrontPaymentsUpdateEnabled"};function tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function et(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var nt=Shopware,ot=nt.Component,at=nt.Mixin;ot.register("postfinancecheckout-settings",{template:Z.a,inject:["PostFinanceCheckoutConfigurationService"],mixins:[at.getByName("notification")],data:function(){return function(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:"postfinancecheckout";return Rt(this,i),a.call(this,t,e,n)}return e=i,(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 Vt.handleResponse(t)}))}},{key:"setPostFinanceCheckoutAsSalesChannelPaymentDefault",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-postfinancecheckout-as-sales-channel-payment-default");return this.httpClient.post(n,{salesChannelId:t},{headers:e}).then((function(t){return Vt.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 Vt.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 Vt.handleResponse(t)}))}}])&&$t(e.prototype,n),o&&$t(e,o),i}(Vt);function Ut(t){return(Ut="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 zt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ht(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"postfinancecheckout";return zt(this,i),a.call(this,t,e,n)}return e=i,(n=[{key:"createRefund",value:function(t,e,n,o){var a=this.getBasicHeaders(),i="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/refund/create-refund/");return this.httpClient.post(i,{salesChannelId:t,transactionId:e,quantity:n,lineItemId:o},{headers:a}).then((function(t){return Zt.handleResponse(t)}))}},{key:"createRefundByAmount",value:function(t,e,n){var o=this.getBasicHeaders(),a="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/refund/create-refund-by-amount/");return this.httpClient.post(a,{salesChannelId:t,transactionId:e,refundableAmount:n},{headers:o}).then((function(t){return Zt.handleResponse(t)}))}}])&&Ht(e.prototype,n),o&&Ht(e,o),i}(Zt);function Xt(t){return(Xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function te(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ee(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"postfinancecheckout";return te(this,i),a.call(this,t,e,n)}return e=i,(n=[{key:"getTransactionData",value:function(t,e){var n=this.getBasicHeaders(),o="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction/get-transaction-data/");return this.httpClient.post(o,{salesChannelId:t,transactionId:e},{headers:n}).then((function(t){return re.handleResponse(t)}))}},{key:"getInvoiceDocument",value:function(t,e){return"".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction/get-invoice-document/").concat(t,"/").concat(e)}},{key:"getPackingSlip",value:function(t,e){return"".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction/get-packing-slip/").concat(t,"/").concat(e)}}])&&ee(e.prototype,n),o&&ee(e,o),i}(re);function se(t){return(se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function le(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ue(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"postfinancecheckout";return le(this,i),a.call(this,t,e,n)}return e=i,(n=[{key:"createTransactionCompletion",value:function(t,e){var n=this.getBasicHeaders(),o="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction-completion/create-transaction-completion/");return this.httpClient.post(o,{salesChannelId:t,transactionId:e},{headers:n}).then((function(t){return me.handleResponse(t)}))}}])&&ue(e.prototype,n),o&&ue(e,o),i}(me);function _e(t){return(_e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function be(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ye(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"postfinancecheckout";return be(this,i),a.call(this,t,e,n)}return e=i,(n=[{key:"createTransactionVoid",value:function(t,e){var n=this.getBasicHeaders(),o="".concat(Shopware.Context.api.apiPath,"/_action/").concat(this.getApiBasePath(),"/transaction-void/create-transaction-void/");return this.httpClient.post(o,{salesChannelId:t,transactionId:e},{headers:n}).then((function(t){return ve.handleResponse(t)}))}}])&&ye(e.prototype,n),o&&ye(e,o),i}(ve),Ee=Shopware.Application;Ee.addServiceProvider("PostFinanceCheckoutConfigurationService",(function(t){var e=Ee.getContainer("init");return new qt(e.httpClient,t.loginService)})),Ee.addServiceProvider("PostFinanceCheckoutRefundService",(function(t){var e=Ee.getContainer("init");return new Jt(e.httpClient,t.loginService)})),Ee.addServiceProvider("PostFinanceCheckoutTransactionService",(function(t){var e=Ee.getContainer("init");return new ce(e.httpClient,t.loginService)})),Ee.addServiceProvider("PostFinanceCheckoutTransactionCompletionService",(function(t){var e=Ee.getContainer("init");return new ge(e.httpClient,t.loginService)})),Ee.addServiceProvider("PostFinanceCheckoutTransactionVoidService",(function(t){var e=Ee.getContainer("init");return new Oe(e.httpClient,t.loginService)}))}}); \ No newline at end of file diff --git a/src/Resources/snippet/storefront/postfinancecheckout.it-IT.json b/src/Resources/snippet/storefront/postfinancecheckout.it-IT.json new file mode 100644 index 0000000..4e13a8a --- /dev/null +++ b/src/Resources/snippet/storefront/postfinancecheckout.it-IT.json @@ -0,0 +1,27 @@ +{ + "postfinancecheckout": { + "account": { + "downloadInvoice": "Scaricare la fattura" + }, + "cookie": { + "name": "Pagamento PostFinanceCheckout" + }, + "deliveryState": { + "hold": "Tenere", + "unhold": "Aprite" + }, + "payButton": "Paga", + "payHeader": "Ordine di pagamento", + "payload": { + "adjustmentLineItem": "Voce di aggiustamento", + "shipping": { + "lineItem": "Spedizione", + "name": "Spedizione" + }, + "taxes": "Tasse" + }, + "paymentMethod": { + "notAvailable": "Il metodo di pagamento non è attualmente disponibile. Si prega di scegliere un altro metodo di pagamento." + } + } +}