diff --git a/CHANGELOG.md b/CHANGELOG.md
index fd4d726..acdc31e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+# 7.1.3
+- Fixed issue with radio button/switch settings not saving
+- Fixed issue with error screen sporadically happening after failed payments
+
# 7.1.2
- Support the ability to have different spaces for differet sales channels
- Fixed issue where Twint would not appear sometimes
diff --git a/CHANGELOG_de-DE.md b/CHANGELOG_de-DE.md
index 75bbf3e..22a1fd6 100644
--- a/CHANGELOG_de-DE.md
+++ b/CHANGELOG_de-DE.md
@@ -1,3 +1,7 @@
+# 7.1.3
+– Problem behoben, bei dem die Einstellungen von Optionsfeldern/Schaltern nicht gespeichert wurden.
+– Problem behoben, bei dem nach fehlgeschlagenen Zahlungen sporadisch ein Fehlerbildschirm angezeigt wurde.
+
# 7.1.2
- Unterstützung der Möglichkeit, unterschiedliche Bereiche für verschiedene Vertriebskanäle zu nutzen.
- Problem behoben, bei dem Twint manchmal nicht angezeigt wurde.
diff --git a/README.md b/README.md
index e457220..8a0a619 100644
--- a/README.md
+++ b/README.md
@@ -13,10 +13,10 @@ Please note that this plugin is for versions 6.5, 6.6 or 6.7. For the 6.4 plugin
## Documentation
-- For English documentation click [here](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.1.2/docs/en/documentation.html)
-- Für die deutsche Dokumentation klicken Sie [hier](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.1.2/docs/de/documentation.html)
-- Pour la documentation Française, cliquez [ici](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.1.2/docs/fr/documentation.html)
-- Per la documentazione in tedesco, clicca [qui](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.1.2/docs/it/documentation.html)
+- For English documentation click [here](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.1.3/docs/en/documentation.html)
+- Für die deutsche Dokumentation klicken Sie [hier](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.1.3/docs/de/documentation.html)
+- Pour la documentation Française, cliquez [ici](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.1.3/docs/fr/documentation.html)
+- Per la documentazione in tedesco, clicca [qui](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.1.3/docs/it/documentation.html)
## Installation
@@ -48,6 +48,15 @@ bin/console plugin:install --activate --clearCache VRPayment
1. Navigate to Shopware Admin > Settings > VRPayment.
2. Enter your Space ID, User ID, and API Key (obtained from the [VR Payment Portal](https://gateway.vr-payment.de/)).
+### VRPayment does not appear in Settings
+
+1. You should run the following commmand
+
+```bash
+Copy
+bin/build-administration.sh
+```
+
### Payment Methods
Configure supported methods (e.g., credit cards, Apple Pay) via the [VR Payment Portal](https://gateway.vr-payment.de/).
diff --git a/composer.json b/composer.json
index 6c0fd35..14ff6e0 100644
--- a/composer.json
+++ b/composer.json
@@ -59,5 +59,5 @@
"vrpayment/sdk": "^4.0.0"
},
"type": "shopware-platform-plugin",
- "version": "7.1.2"
+ "version": "7.1.3"
}
diff --git a/docs/de/documentation.html b/docs/de/documentation.html
index bfa1354..d8babb7 100644
--- a/docs/de/documentation.html
+++ b/docs/de/documentation.html
@@ -23,7 +23,7 @@
{% endblock %}`,{Component:Z,Mixin:J,Filter:X,Context:ee,Utils:u}=Shopware,I=Shopware.Data.Criteria;Z.register("vrpayment-order-detail",{template:j,inject:["VRPaymentTransactionService","VRPaymentRefundService","repositoryFactory"],mixins:[J.getByName("notification")],data(){return{transactionData:{transactions:[],refunds:[]},transaction:{},lineItems:[],refundableQuantity:0,itemRefundableQuantity:0,isLoading:!0,orderId:"",currency:"",modalType:"",refundAmount:0,refundableAmount:0,itemRefundedAmount:0,itemRefundedQuantity:0,itemRefundableAmount:0,currentLineItem:"",refundLineItemQuantity:[],refundLineItemAmount:[],selectedItems:[]}},metaInfo(){return{title:this.$tc("vrpayment-order.header")}},computed:{dateFilter(){return X.getByName("date")},relatedResourceColumns(){return[{property:"paymentMethodName",label:this.$tc("vrpayment-order.transactionHistory.types.payment_method"),rawData:!0},{property:"state",label:this.$tc("vrpayment-order.transactionHistory.types.state"),rawData:!0},{property:"currency",label:this.$tc("vrpayment-order.transactionHistory.types.currency"),rawData:!0},{property:"authorized_amount",label:this.$tc("vrpayment-order.transactionHistory.types.authorized_amount"),rawData:!0},{property:"id",label:this.$tc("vrpayment-order.transactionHistory.types.transaction"),rawData:!0},{property:"customerId",label:this.$tc("vrpayment-order.transactionHistory.types.customer"),rawData:!0}]},lineItemColumns(){return[{property:"id",rawData:!0,visible:!1,primary:!0},{property:"uniqueId",label:this.$tc("vrpayment-order.lineItem.types.uniqueId"),rawData:!0,visible:!1,primary:!0},{property:"name",label:this.$tc("vrpayment-order.lineItem.types.name"),rawData:!0},{property:"quantity",label:this.$tc("vrpayment-order.lineItem.types.quantity"),rawData:!0},{property:"amountIncludingTax",label:this.$tc("vrpayment-order.lineItem.types.amountIncludingTax"),rawData:!0},{property:"type",label:this.$tc("vrpayment-order.lineItem.types.type"),rawData:!0},{property:"taxAmount",label:this.$tc("vrpayment-order.lineItem.types.taxAmount"),rawData:!0},{property:"refundableQuantity",rawData:!0,visible:!1}]},refundColumns(){return[{property:"id",label:this.$tc("vrpayment-order.refund.types.id"),rawData:!0,visible:!0,primary:!0},{property:"amount",label:this.$tc("vrpayment-order.refund.types.amount"),rawData:!0},{property:"state",label:this.$tc("vrpayment-order.refund.types.state"),rawData:!0},{property:"createdOn",label:this.$tc("vrpayment-order.refund.types.createdOn"),rawData:!0}]}},watch:{$route(){this.resetDataAttributes(),this.createdComponent()}},created(){this.createdComponent()},methods:{createdComponent(){this.orderId=this.$route.params.id;const e=this.repositoryFactory.create("order"),t=new I(1,1);t.addAssociation("transactions"),t.getAssociation("transactions").addSorting(I.sort("createdAt","DESC")),e.get(this.orderId,ee.api,t).then(a=>{this.order=a,this.isLoading=!1;var n=0,r=0;const o=a.transactions[0].customFields.vrpayment_transaction_id;this.VRPaymentTransactionService.getTransactionData(a.salesChannelId,o).then(s=>{this.currency=s.transactions[0].currency,s.transactions[0].authorized_amount=u.format.currency(s.transactions[0].authorizationAmount,this.currency),s.refunds.forEach(i=>{r=parseFloat(parseFloat(r)+parseFloat(i.amount)),i.amount=u.format.currency(i.amount,this.currency),i.reductions.forEach(l=>{l.quantityReduction>0&&(this.refundLineItemQuantity[l.lineItemUniqueId]===void 0?this.refundLineItemQuantity[l.lineItemUniqueId]=l.quantityReduction:this.refundLineItemQuantity[l.lineItemUniqueId]+=l.quantityReduction),l.unitPriceReduction>0&&(this.refundLineItemAmount[l.lineItemUniqueId]===void 0?this.refundLineItemAmount[l.lineItemUniqueId]=l.unitPriceReduction:this.refundLineItemAmount[l.lineItemUniqueId]+=l.unitPriceReduction)})}),s.transactions[0].lineItems.forEach(i=>{i.id||(i.id=i.uniqueId),i.itemRefundedAmount=parseFloat(this.refundLineItemAmount[i.uniqueId]||0)*parseInt(i.quantity),i.amountIncludingTax=parseFloat(i.amountIncludingTax)||0,i.itemRefundedQuantity=parseInt(this.refundLineItemQuantity[i.uniqueId])||0,i.refundableAmount=parseFloat((i.amountIncludingTax-i.itemRefundedAmount).toFixed(2)),i.amountIncludingTax=u.format.currency(i.amountIncludingTax,this.currency),i.taxAmount=u.format.currency(i.taxAmount,this.currency),n=parseFloat(parseFloat(n)+parseFloat(i.unitPriceIncludingTax*i.quantity)),i.refundableQuantity=parseInt(parseInt(i.quantity)-parseInt(this.refundLineItemQuantity[i.uniqueId]||0))}),this.lineItems=s.transactions[0].lineItems,this.transactionData=s,this.transaction=this.transactionData.transactions[0],this.refundAmount=Number(this.transactionData.transactions[0].amountIncludingTax),this.refundableAmount=parseFloat(parseFloat(n)-parseFloat(r))}).catch(s=>{try{this.createNotificationError({title:this.$tc("vrpayment-order.paymentDetails.error.title"),message:s.message,autoClose:!1})}catch{this.createNotificationError({title:this.$tc("vrpayment-order.paymentDetails.error.title"),message:s.message,autoClose:!1})}finally{this.isLoading=!1}})})},downloadPackingSlip(){window.open(this.VRPaymentTransactionService.getPackingSlip(this.transaction.metaData.salesChannelId,this.transaction.id),"_blank")},downloadInvoice(){window.open(this.VRPaymentTransactionService.getInvoiceDocument(this.transaction.metaData.salesChannelId,this.transaction.id),"_blank")},resetDataAttributes(){this.transactionData={transactions:[],refunds:[]},this.lineItems=[],this.refundLineItemQuantity=[],this.refundLineItemAmount=[],this.isLoading=!0},spawnModal(e,t,a,n){this.modalType=e,this.currentLineItem=t,this.itemRefundableQuantity=a,this.itemRefundableAmount=isNaN(n)?0:Math.round(n*100)/100},closeModal(){this.modalType=""},lineItemRefund(e){this.isLoading=!0,this.VRPaymentRefundService.createRefund(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,0,e).then(()=>{this.createNotificationSuccess({title:this.$tc("vrpayment-order.refundAction.successTitle"),message:this.$tc("vrpayment-order.refundAction.successMessage")}),this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${u.createId()}`)})}).catch(t=>{try{this.createNotificationError({title:t.response.data.errors[0].title,message:t.response.data.errors[0].detail,autoClose:!1})}catch{this.createNotificationError({title:t.title,message:t.response.data,autoClose:!1})}finally{this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${u.createId()}`)})}})},isSelectable(e){return e.refundableQuantity>0&&e.refundableAmount>0&&e.itemRefundedAmount==0&&e.itemRefundedQuantity==0},onSelectionChanged(e){this.selectedItems=Object.values(e)},onPerformBulkAction(){this.selectedItems.length&&(this.isLoading=!0,this.$nextTick(()=>{const e=this.selectedItems.map(t=>this.lineItemRefundBulk(t.uniqueId));Promise.all(e).then(()=>{this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${u.createId()}`)})}).catch(t=>{this.createNotificationError({title:"Error",message:"Something went wrong with the refunds",autoClose:!1}),this.isLoading=!1})}))},lineItemRefundBulk(e){return new Promise((t,a)=>{this.VRPaymentRefundService.createRefund(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,0,e).then(()=>{this.createNotificationSuccess({title:this.$tc("vrpayment-order.refundAction.successTitle"),message:this.$tc("vrpayment-order.refundAction.successMessage")}),t()}).catch(n=>{try{this.createNotificationError({title:n.response.data.errors[0].title,message:n.response.data.errors[0].detail,autoClose:!1})}catch{this.createNotificationError({title:n.title,message:n.response.data,autoClose:!1})}finally{a()}})})}}});const te={"vrpayment-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","refund-line-item-selected":"Rückerstattung auswählen","refund-line-item-parial":"Teilweise Rückerstattung"}},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:"VRPayment 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 VRPayment"}},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",maxAvailableAmountToRefund:"Maximal verfügbarer Erstattungsbetrag",refundExceedsTotalError:{title:"Fehler beim Erstellen der Rückerstattung.",messageRefundAmountExceedsAvailableBalance:"Der Rückerstattungsbetrag übersteigt das verfügbare Guthaben."}},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"}}},ae={"vrpayment-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","refund-line-item-selected":"Refund selected","refund-line-item-parial":"Partial refund"}},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:"VRPayment 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 VRPayment"}},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",maxAvailableAmountToRefund:"Maximum available amount to refund",refundExceedsTotalError:{title:"Error while creating the refund.",messageRefundAmountExceedsAvailableBalance:"Refund amount exceeds available balance."}},transactionHistory:{cardTitle:"Details",types:{authorized_amount:"Authorized Amount",currency:"Currency",customer:"Customer",payment_method:"Payment Method",state:"State",transaction:"Transaction"},customerId:"Customer ID",customerName:"Customer Name",creditCardHolder:"Credit Card Holder",paymentMethod:"Payment Method",paymentMethodBrand:"Payment Method Brand",PseudoCreditCardNumber:"Pseudo Credit Card Number",CardExpire:"Card Expire"},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"}}},ne={"vrpayment-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é","refund-line-item-selected":"Rembourser sélectionnés","refund-line-item-parial":"Remboursement partiel"}},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:"VRPayment 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 VRPayment"}},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",maxAvailableAmountToRefund:"Montant maximal disponible pour le remboursement",refundExceedsTotalError:{title:"Erreur lors de la création du remboursement.",messageRefundAmountExceedsAvailableBalance:"Le montant du remboursement dépasse le solde disponible."}},transactionHistory:{cardTitle:"Détails",types:{authorized_amount:"Montant autorisé",currency:"Monnaie",customer:"Client",payment_method:"Mode de paiement",state:"État",transaction:"Transaction"},customerId:"Customer ID",customerName:"Customer Name",creditCardHolder:"Titulaire de la carte de crédit",paymentMethod:"Mode de paiement",paymentMethodBrand:"Marque du mode de paiement",PseudoCreditCardNumber:"Pseudo numéro de carte de crédit",CardExpire:"La carte expire"},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"}}},ie={"vrpayment-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à","refund-line-item-selected":"Rimborso selezionati","refund-line-item-parial":"Rimborso parziale"}},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 VRPayment",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 VRPayment"}},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",maxAvailableAmountToRefund:"Importo massimo disponibile per il rimborso",refundExceedsTotalError:{title:"Errore durante la creazione del rimborso.",messageRefundAmountExceedsAvailableBalance:"LL'importo del rimborso supera il saldo disponibile."}},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"}}},{Module:re}=Shopware;re.register("vrpayment-order",{type:"plugin",name:"VRPayment",title:"vrpayment-order.general.title",description:"vrpayment-order.general.descriptionTextModule",version:"1.0.1",targetVersion:"1.0.1",color:"#2b52ff",snippets:{"de-DE":te,"en-GB":ae,"fr-FR":ne,"it-IT":ie},routeMiddleware(e,t){t.name==="sw.order.detail"&&t.children.push({component:"vrpayment-order-detail",name:"vrpayment.order.detail",isChildren:!0,path:"/sw/order/vrpayment/detail/:id"}),e(t)}});Shopware.Service("privileges").addPrivilegeMappingEntry({category:"permissions",parent:"vrpayment",key:"vrpayment",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:["vrpayment.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"]}}});const se=`{% block vrpayment_settings %} {% block vrpayment_settings_header %}
{% endblock %} {% endblock %} {% block vrpayment_settings_content_card_loading %} {% endblock %} {% endblock %} {% endblock %} {% endblock %}`,c="VRPaymentPayment.config",oe=c+".applicationKey",le=c+".emailEnabled",ce=c+".integration",de=c+".lineItemConsistencyEnabled",me=c+".spaceId",ue=c+".spaceViewId",pe=c+".storefrontInvoiceDownloadEnabled",he=c+".userId",ge=c+".storefrontWebhooksUpdateEnabled",ye=c+".storefrontPaymentsUpdateEnabled",m={CONFIG_DOMAIN:c,CONFIG_APPLICATION_KEY:oe,CONFIG_EMAIL_ENABLED:le,CONFIG_INTEGRATION:ce,CONFIG_LINE_ITEM_CONSISTENCY_ENABLED:de,CONFIG_SPACE_ID:me,CONFIG_SPACE_VIEW_ID:ue,CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED:pe,CONFIG_USER_ID:he,CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED:ge,CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED:ye},{Component:fe,Mixin:C}=Shopware;fe.register("vrpayment-settings",{template:se,inject:["acl","VRPaymentConfigurationService"],mixins:[C.getByName("notification"),C.getByName("sw-inline-snippet")],data(){return{config:{},isLoading:!1,isTesting:!1,isSaveSuccessful:!1,applicationKeyFilled:!1,applicationKeyErrorState:!1,spaceIdFilled:!1,spaceIdErrorState:!1,userIdFilled:!1,userIdErrorState:!1,isSetDefaultPaymentSuccessful:!1,isSettingDefaultPaymentMethods:!1,configIntegrationDefaultValue:"payment_page",configEmailEnabledDefaultValue:!0,configLineItemConsistencyEnabledDefaultValue:!0,configStorefrontInvoiceDownloadEnabledEnabledDefaultValue:!0,configStorefrontWebhooksUpdateEnabledDefaultValue:!0,configStorefrontPaymentsUpdateEnabledDefaultValue:!0,...m}},props:{isLoading:{type:Boolean,required:!0}},metaInfo(){return{title:this.$createTitle()}},watch:{config:{handler(e){const t=(this.$refs.configComponent.allConfigs||{}).null||{};this.$refs.configComponent.selectedSalesChannelId===null?(this.applicationKeyFilled=!!this.config[this.CONFIG_APPLICATION_KEY],this.spaceIdFilled=!!this.config[this.CONFIG_SPACE_ID],this.userIdFilled=!!this.config[this.CONFIG_USER_ID],this.CONFIG_INTEGRATION in this.config||(this.config[this.CONFIG_INTEGRATION]=this.configIntegrationDefaultValue),this.CONFIG_EMAIL_ENABLED in this.config||(this.config[this.CONFIG_EMAIL_ENABLED]=this.configEmailEnabledDefaultValue),this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED in this.config||(this.config[this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED]=this.configLineItemConsistencyEnabledDefaultValue),this.CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED in this.config||(this.config[this.CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED]=this.configStorefrontInvoiceDownloadEnabledEnabledDefaultValue),this.CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED in this.config||(this.config[this.CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED]=this.configStorefrontWebhooksUpdateEnabledDefaultValue),this.CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED in this.config||(this.config[this.CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED]=this.configStorefrontPaymentsUpdateEnabledDefaultValue)):(this.applicationKeyFilled=!!this.config[this.CONFIG_APPLICATION_KEY]||!!t[this.CONFIG_APPLICATION_KEY],this.spaceIdFilled=!!this.config[this.CONFIG_SPACE_ID]||!!t[this.CONFIG_SPACE_ID],this.userIdFilled=!!this.config[this.CONFIG_USER_ID]||!!t[this.CONFIG_USER_ID],(!(this.CONFIG_INTEGRATION in this.config)||!(this.CONFIG_INTEGRATION in t))&&(this.config[this.CONFIG_INTEGRATION]=this.configIntegrationDefaultValue),(!(this.CONFIG_EMAIL_ENABLED in this.config)||!(this.CONFIG_EMAIL_ENABLED in t))&&(this.config[this.CONFIG_EMAIL_ENABLED]=this.configEmailEnabledDefaultValue),(!(this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED in this.config)||!(this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED in t))&&(this.config[this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED]=this.configLineItemConsistencyEnabledDefaultValue),(!(this.CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED in this.config)||!(this.CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED in t))&&(this.config[this.CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED]=this.configStorefrontInvoiceDownloadEnabledEnabledDefaultValue),(!(this.CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED in this.config)||!(this.CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED in t))&&(this.config[this.CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED]=this.configStorefrontWebhooksUpdateEnabledDefaultValue),(!(this.CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED in this.config)||!(this.CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED in t))&&(this.config[this.CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED]=this.configStorefrontPaymentsUpdateEnabledDefaultValue)),this.$emit("salesChannelChanged"),this.$emit("update:value",e)},deep:!0}},methods:{checkTextFieldInheritance(e){return typeof e!="string"?!0:e.length<=0},checkNumberFieldInheritance(e){return typeof e!="number"?!0:e.length<=0},checkBoolFieldInheritance(e){return typeof e!="boolean"},getInheritValue(e){return this.selectedSalesChannelId==null?this.actualConfigData[e]:this.allConfigs.null[e]},onSave(){if(!(this.spaceIdFilled&&this.userIdFilled&&this.applicationKeyFilled)){this.setErrorStates();return}this.save()},save(){this.isLoading=!0,this.$refs.configComponent.save().then(e=>{e&&(this.config=e),this.registerWebHooks(),this.synchronizePaymentMethodConfiguration(),this.installOrderDeliveryStates()}).catch(e=>{console.error("Error:",e),this.isLoading=!1})},registerWebHooks(){if(this.config[this.CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED]===!1)return!1;this.VRPaymentConfigurationService.registerWebHooks(this.$refs.configComponent.selectedSalesChannelId).then(()=>{this.createNotificationSuccess({title:this.$tc("vrpayment-settings.settingForm.titleSuccess"),message:this.$tc("vrpayment-settings.settingForm.messageWebHookUpdated")})}).catch(e=>{this.createNotificationError({title:this.$tc("vrpayment-settings.settingForm.titleError"),message:this.$tc("vrpayment-settings.settingForm.messageWebHookError")}),this.isLoading=!1,console.error("Error:",e)})},synchronizePaymentMethodConfiguration(){if(this.config[this.CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED]===!1)return!1;this.VRPaymentConfigurationService.synchronizePaymentMethodConfiguration(this.$refs.configComponent.selectedSalesChannelId).then(()=>{this.createNotificationSuccess({title:this.$tc("vrpayment-settings.settingForm.titleSuccess"),message:this.$tc("vrpayment-settings.settingForm.messagePaymentMethodConfigurationUpdated")}),this.isLoading=!1}).catch(e=>{this.createNotificationError({title:this.$tc("vrpayment-settings.settingForm.titleError"),message:this.$tc("vrpayment-settings.settingForm.messagePaymentMethodConfigurationError")}),this.isLoading=!1,console.error("Error:",e)})},installOrderDeliveryStates(){this.VRPaymentConfigurationService.installOrderDeliveryStates().then(()=>{this.createNotificationSuccess({title:this.$tc("vrpayment-settings.settingForm.titleSuccess"),message:this.$tc("vrpayment-settings.settingForm.messageOrderDeliveryStateUpdated")}),this.isLoading=!1}).catch(()=>{this.createNotificationError({title:this.$tc("vrpayment-settings.settingForm.titleError"),message:this.$tc("vrpayment-settings.settingForm.messageOrderDeliveryStateError")}),this.isLoading=!1})},onSetPaymentMethodDefault(){this.isSettingDefaultPaymentMethods=!0,this.VRPaymentConfigurationService.setVRPaymentAsSalesChannelPaymentDefault(this.$refs.configComponent.selectedSalesChannelId).then(()=>{this.isSettingDefaultPaymentMethods=!1,this.isSetDefaultPaymentSuccessful=!0,this.createNotificationSuccess({title:this.$tc("vrpayment-settings.settingForm.titleSuccess"),message:this.$tc("vrpayment-settings.salesChannelCard.messageDefaultPaymentUpdated")})})},setErrorStates(){const e={code:1,detail:this.$tc("vrpayment-settings.messageNotBlank")};this.spaceIdFilled||(this.spaceIdErrorState=e),this.userIdFilled||(this.userIdErrorState=e),this.applicationKeyFilled||(this.applicationKeyErrorState=e)},onCheckApiConnection(e){const{spaceId:t,userId:a,applicationKey:n}=e;this.isTesting=!0,this.VRPaymentConfigurationService.checkApiConnection(t,a,n).then(r=>{r.result===200?this.createNotificationSuccess({title:this.$tc("vrpayment-settings.settingForm.credentials.alert.title"),message:this.$tc("vrpayment-settings.settingForm.credentials.alert.successMessage")}):this.createNotificationError({title:this.$tc("vrpayment-settings.settingForm.credentials.alert.title"),message:this.$tc("vrpayment-settings.settingForm.credentials.alert.errorMessage")}),this.isTesting=!1}).catch(()=>{this.createNotificationError({title:this.$tc("vrpayment-settings.settingForm.credentials.alert.title"),message:this.$tc("vrpayment-settings.settingForm.credentials.alert.errorMessage")}),this.isTesting=!1})}}});const ve=`{% block vrpayment_settings_content_card_channel_config_credentials %} {% block vrpayment_settings_content_card_channel_config_credentials_card_container %} {% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings %}
`,{Component:Ne,Mixin:ke}=Shopware;Ne.register("sw-vrpayment-advanced-options",{template:De,name:"VRPaymentAdvancedOptions",inject:["acl"],mixins:[ke.getByName("notification")],props:{actualConfigData:{type:Object,required:!0},allConfigs:{type:Object,required:!0},selectedSalesChannelId:{required:!0},isLoading:{type:Boolean,required:!0}},data(){return{...m}},methods:{checkTextFieldInheritance(e){return typeof e!="string"?!0:e.length<=0},checkNumberFieldInheritance(e){return typeof e!="number"?!0:e.length<=0},checkBoolFieldInheritance(e){return typeof e!="boolean"}}});const $e={"sw-privileges":{permissions:{parents:{vrpayment:"VRPayment plugin"},vrpayment:{label:"VRPayment berechtigungen"}}},"vrpayment-settings":{general:{descriptionTextModule:"VRPayment-Einstellungen",mainMenuItemGeneral:"VRPayment"},header:"VRPayment",messageNotBlank:"Dieser Wert sollte nicht leer sein.",salesChannelCard:{button:{description:"Klicken Sie auf diese Schaltfläche, um VRPayment als Standard-Zahlungsabwickler im ausgewählten Vertriebskanal festzulegen",label:"VRPayment als Standard-Zahlungsabwickler festlegen"},messageDefaultPaymentError:"VRPayment als Standard-Zahlungsabwickler konnte nicht festgelegt werden..",messageDefaultPaymentUpdated:"VRPayment als Standard-Zahlungsabwickler wurde festgelegt."},settingForm:{credentials:{applicationKey:{label:"Application Key",tooltipText:"Der Anwendungsschlüssel wird verwendet, um dieses Plugin mit der API VRPayment zu authentifizieren."},cardTitle:"Anmeldedaten",spaceId:{label:"Space ID",tooltipText:"Die Space ID wird verwendet, um dieses Plugin mit der API VRPayment zu authentifizieren."},userId:{label:"User ID",tooltipText:"Die Benutzer-ID wird verwendet, um dieses Plugin mit der VRPayment-API zu authentifizieren."},button:{description:"Klicken Sie auf diese Schaltfläche, um die VRPayment API zu testen",label:"API Verbindung testen"},alert:{title:"API-Test",successMessage:"Die Verbindung wurde erfolgreich getestet.",errorMessage:"Die Verbindung ist fehlgeschlagen. Versuchen Sie es erneut."}},messageSaveSuccess:"VRPayment-Einstellungen wurden gespeichert.",messageOrderDeliveryStateError:"VRPayment OrderDeliveryState konnte nicht gespeichert werden.",messageOrderDeliveryStateUpdated:"VRPayment OrderDeliveryState wurde aktualisiert.",messagePaymentMethodConfigurationError:"VRPayment PaymentMethodConfiguration konnte nicht gespeichert werden. Bitte überprüfen Sie Ihre Anmeldedaten.",messagePaymentMethodConfigurationUpdated:"VRPayment PaymentMethodConfiguration wurde registriert.",messageWebHookError:"VRPayment WebHook konnte nicht gespeichert werden. Bitte überprüfen Sie Ihre Zugangsdaten.",messageWebHookUpdated:"VRPayment WebHook wurde aktualisiert.",options:{cardTitle:"Optionen",emailEnabled:{label:"Auftragsbestätigung per E-Mail senden",tooltipText:"Wenn diese Einstellung aktiviert ist, erhalten Ihre Kunden eine E-Mail von Ihrem Geschäft, wenn die Zahlung ihrer Bestellung autorisiert ist."},integration:{label:"Integration",options:{iframe:"Iframe",payment_page:"Payment Page"},tooltipText:"Integration"},lineItemConsistencyEnabled:{label:"Konsistenz der Einzelposten",tooltipText:"Wenn diese Option aktiviert ist, stimmen die Summen der Einzelposten in VRPaymentPayment immer mit der Shopware-Bestellsumme überein."},spaceViewId:{label:"Space View ID",tooltipText:"Space View ID"}},save:"Speichern",storefrontOptions:{cardTitle:"Storefront-Optionen",invoiceDownloadEnabled:{label:"Rechnung Download",tooltipText:"Wenn diese Einstellung aktiviert ist, können Ihre Kunden Auftragsrechnungen von VRPayment herunterladen."}},advancedOptions:{cardTitle:"Erweiterte-Optionen",webhooksUpdateEnabled:{label:"Webhooks-Update",tooltipText:"Wenn diese Einstellung aktiviert ist, wird das Webhook-Update ausgelöst, wenn Sie die Einstellungen speichern"},paymentsUpdateEnabled:{label:"Payments-Update",tooltipText:"Wenn diese Einstellung aktiviert ist, wird die Aktualisierung der Zahlungsmethoden ausgelöst, wenn Sie die Einstellungen speichern"}},titleError:"Fehler",titleSuccess:"Erfolg"}}},Re={"sw-privileges":{permissions:{parents:{vrpayment:"VRPayment plugin"},vrpayment:{label:"VRPayment permissions"}}},"vrpayment-settings":{general:{descriptionTextModule:"VRPayment settings",mainMenuItemGeneral:"VRPayment"},header:"VRPayment",messageNotBlank:"This value should not be blank.",salesChannelCard:{button:{description:"Click this button to set VRPayment as default payment handler in the selected SalesChannel",label:"Set VRPayment as default payment handler"},messageDefaultPaymentError:"VRPayment as default payment could not be set.",messageDefaultPaymentUpdated:"VRPayment as default payment has been set."},settingForm:{credentials:{applicationKey:{label:"Application Key",tooltipText:"The Application Key is used to authenticate this plugin with the VRPayment API."},cardTitle:"Credentials",spaceId:{label:"Space ID",tooltipText:"The space ID is used to authenticate this plugin with the VRPayment API."},userId:{label:"User ID",tooltipText:"The user ID is used to authenticate this plugin with the VRPayment API."},button:{description:"Click this button to test the VRPayment API",label:"API connection test"},alert:{title:"API Test",successMessage:"The connection was successfully tested.",errorMessage:"The connection was failed. Try it again."}},messageSaveSuccess:"VRPayment settings have been saved.",messageOrderDeliveryStateError:"VRPayment OrderDeliveryState could not be saved.",messageOrderDeliveryStateUpdated:"VRPayment OrderDeliveryState has been updated.",messagePaymentMethodConfigurationError:"VRPayment PaymentMethodConfiguration could not be saved. Please check your credentials.",messagePaymentMethodConfigurationUpdated:"VRPayment PaymentMethodConfiguration has been registered.",messageWebHookError:"VRPayment WebHook could not be saved. Please check your credentials.",messageWebHookUpdated:"VRPayment WebHook has been updated.",options:{cardTitle:"Options",emailEnabled:{label:"Send order confirmation email",tooltipText:"If this setting is enabled your customers will receive an email from your store when their order payment is authorised"},integration:{label:"Integration",options:{iframe:"Iframe",payment_page:"Payment Page"},tooltipText:"Integration"},lineItemConsistencyEnabled:{label:"Line item consistency",tooltipText:"If this option is enabled line item totals in VRPaymentPayment will always match Shopware order total"},spaceViewId:{label:"Space View ID",tooltipText:"Space View ID"}},save:"Save",storefrontOptions:{cardTitle:"Storefront Options",invoiceDownloadEnabled:{label:"Invoice Download",tooltipText:"If this setting is enabled your customers will be able to download order invoices from VRPayment"}},advancedOptions:{cardTitle:"Advanced Options",webhooksUpdateEnabled:{label:"Webhooks Update",tooltipText:"If this setting is enabled webhook update will be triggered when you save settings"},paymentsUpdateEnabled:{label:"Payments Update",tooltipText:"If this setting is enabled payment methods update will be triggered when you save settings"}},titleError:"Error",titleSuccess:"Success"}}},xe={"sw-privileges":{permissions:{parents:{vrpayment:"VRPayment brancher"},vrpayment:{label:"VRPayment autorisations"}}},"vrpayment-settings":{general:{descriptionTextModule:"Paramètres de VRPayment",mainMenuItemGeneral:"VRPayment"},header:"VRPayment",messageNotBlank:"Cette valeur ne doit pas être vide.",salesChannelCard:{button:{description:"Cliquez sur ce bouton pour définir VRPayment comme gestionnaire de paiement par défaut dans le canal de vente sélectionné.",label:"Définir VRPayment comme gestionnaire de paiement par défaut"},messageDefaultPaymentError:"VRPayment comme paiement par défaut n'a pas pu être défini.",messageDefaultPaymentUpdated:"VRPayment comme paiement par défaut a été défini."},settingForm:{credentials:{applicationKey:{label:"Application Key",tooltipText:"La clé d'application est utilisée pour authentifier ce plugin avec l'API."},cardTitle:"Références",spaceId:{label:"Space ID",tooltipText:"L'ID de l'espace est utilisé pour authentifier ce plugin avec l'API VRPayment.."},userId:{label:"User ID",tooltipText:"L'ID utilisateur est utilisé pour authentifier ce plugin avec l'API VRPayment."},button:{description:"Cliquez sur ce bouton pour tester l'API VRPayment.",label:"Test de connexion à l'API"},alert:{title:"Test API",successMessage:"La connexion a été testée avec succès.",errorMessage:"La connexion a échoué. Réessayez."}},messageSaveSuccess:"Les paramètres de VRPayment ont été enregistrés.",messageOrderDeliveryStateError:"Les paramètres de VRPayment OrderDeliveryState n'ont pas pu être enregistrés.",messageOrderDeliveryStateUpdated:"VRPayment OrderDeliveryState a été mis à jour.",messagePaymentMethodConfigurationError:"VRPayment PaymentMethodConfiguration n'a pas pu être enregistré. Veuillez vérifier vos informations d'identification.",messagePaymentMethodConfigurationUpdated:"VRPayment PaymentMethodConfiguration a été enregistré.",messageWebHookError:"VRPayment WebHook n'a pas pu être enregistré. Veuillez vérifier vos informations d'identification.",messageWebHookUpdated:"VRPayment WebHook a été mis à jour.",options:{cardTitle:"Options",emailEnabled:{label:"Envoyer un e-mail de confirmation de commande",tooltipText:"If this setting is enabled your customers will receive an email from your store when their order payment is authorised"},integration:{label:"Integration",options:{iframe:"Iframe",payment_page:"Page de paiement"},tooltipText:"Integration"},lineItemConsistencyEnabled:{label:"Cohérence des postes de ligne",tooltipText:"Si cette option est activée, les totaux des articles dans VRPaymentPayment correspondront toujours au total de la commande Shopware."},spaceViewId:{label:"Space View ID",tooltipText:"Space View ID"}},save:"Enregistrer",storefrontOptions:{cardTitle:"Storefront Options",invoiceDownloadEnabled:{label:"Téléchargement de facture",tooltipText:"Si ce paramètre est activé, vos clients pourront télécharger les factures de commande depuis VRPayment"}},advancedOptions:{cardTitle:"Options avancées",webhooksUpdateEnabled:{label:"Mise à jour des webhooks",tooltipText:"Si ce paramètre est activé, la mise à jour des webhooks sera déclenchée lorsque vous enregistrerez les paramètres."},paymentsUpdateEnabled:{label:"Mise à jour des paiements",tooltipText:"Si ce paramètre est activé, la mise à jour des méthodes de paiement sera déclenchée lorsque vous enregistrez les paramètres."}},titleError:"Erreur",titleSuccess:"Succès"}}},Oe={"sw-privileges":{permissions:{parents:{vrpayment:"VRPayment brancher"},vrpayment:{label:"VRPayment autorisations"}}},"vrpayment-settings":{general:{descriptionTextModule:"Impostazioni VRPayment",mainMenuItemGeneral:"VRPayment"},header:"VRPayment",messageNotBlank:"Questo valore non dovrebbe essere vuoto.",salesChannelCard:{button:{description:"Fai clic su questo pulsante per impostare VRPayment come gestore di pagamento predefinito nel SalesChannel selezionato",label:"Imposta VRPayment come gestore di pagamento predefinito"},messageDefaultPaymentError:"Non è stato possibile impostare VRPayment come pagamento predefinito.",messageDefaultPaymentUpdated:"VRPayment come pagamento predefinito è stato impostato."},settingForm:{credentials:{applicationKey:{label:"Chiave di applicazione",tooltipText:"La chiave dell'applicazione è usata per autenticare questo plugin con l'API VRPayment."},cardTitle:"Credenziali",spaceId:{label:"ID spazio",tooltipText:"L'ID dello spazio è usato per autenticare questo plugin con l'API VRPayment."},userId:{label:"ID utente",tooltipText:"L'ID utente è usato per autenticare questo plugin con l'API VRPayment."},button:{description:"Fare clic su questo pulsante per testare l'API VRPayment.",label:"Test di connessione API"},alert:{title:"Test API",successMessage:"La connessione è stata testata con successo.",errorMessage:"La connessione è fallita. Riprovare."}},messageSaveSuccess:"Le impostazioni di VRPayment sono state salvate.",messageOrderDeliveryStateError:"VRPayment OrderDeliveryState non può essere salvato.",messageOrderDeliveryStateUpdated:"VRPayment OrderDeliveryState è stato aggiornato.",messagePaymentMethodConfigurationError:"VRPayment PaymentMethodConfiguration non può essere salvato. Per favore controlla le tue credenziali.",messagePaymentMethodConfigurationUpdated:"VRPayment PaymentMethodConfiguration è stato registrato.",messageWebHookError:"VRPayment WebHook non può essere salvato. Per favore controlla le tue credenziali.",messageWebHookUpdated:"VRPayment 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 VRPaymentPayment 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 VRPayment"}},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"}}},{Module:Fe}=Shopware;Fe.register("vrpayment-settings",{type:"plugin",name:"VRPayment",title:"vrpayment-settings.general.descriptionTextModule",description:"vrpayment-settings.general.descriptionTextModule",color:"#28d8ff",icon:"default-action-settings",version:"1.0.1",targetVersion:"1.0.1",snippets:{"de-DE":$e,"en-GB":Re,"fr-FR":xe,"it-IT":Oe},routes:{index:{component:"vrpayment-settings",path:"index",meta:{parentPath:"sw.settings.index",privilege:"vrpayment.viewer"},props:{default:e=>({hash:e.params.hash})}}},settingsItem:{group:"plugins",to:"vrpayment.settings.index",iconComponent:"sw-vrpayment-settings-icon",backgroundEnabled:!0,privilege:"vrpayment.viewer"}});const p=Shopware.Classes.ApiService;class Ve extends p{constructor(t,a,n="vrpayment"){super(t,a,n)}registerWebHooks(t=null){const a=this.getBasicHeaders(),n=`${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/configuration/register-web-hooks`;return this.httpClient.post(n,{salesChannelId:t},{headers:a}).then(r=>p.handleResponse(r))}checkApiConnection(t=null,a=null,n=null){const r=this.getBasicHeaders(),o=`${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/configuration/check-api-connection`;return this.httpClient.post(o,{spaceId:t,userId:a,applicationId:n},{headers:r}).then(s=>p.handleResponse(s))}setVRPaymentAsSalesChannelPaymentDefault(t=null){const a=this.getBasicHeaders(),n=`${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/configuration/set-vrpayment-as-sales-channel-payment-default`;return this.httpClient.post(n,{salesChannelId:t},{headers:a}).then(r=>p.handleResponse(r))}synchronizePaymentMethodConfiguration(t=null){const a=this.getBasicHeaders(),n=`${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/configuration/synchronize-payment-method-configuration`;return this.httpClient.post(n,{salesChannelId:t},{headers:a}).then(r=>p.handleResponse(r))}installOrderDeliveryStates(){const t=this.getBasicHeaders(),a=`${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/configuration/install-order-delivery-states`;return this.httpClient.post(a,{},{headers:t}).then(n=>p.handleResponse(n))}}const h=Shopware.Classes.ApiService;class Le extends h{constructor(t,a,n="vrpayment"){super(t,a,n)}createRefund(t,a,n,r){const o=this.getBasicHeaders(),s=`${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/refund/create-refund/`;return this.httpClient.post(s,{salesChannelId:t,transactionId:a,quantity:n,lineItemId:r},{headers:o}).then(i=>h.handleResponse(i))}createRefundByAmount(t,a,n){const r=this.getBasicHeaders(),o=`${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/refund/create-refund-by-amount/`;return this.httpClient.post(o,{salesChannelId:t,transactionId:a,refundableAmount:n},{headers:r}).then(s=>h.handleResponse(s))}createPartialRefund(t,a,n,r){const o=this.getBasicHeaders(),s=`${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/refund/create-partial-refund/`;return this.httpClient.post(s,{salesChannelId:t,transactionId:a,refundableAmount:n,lineItemId:r},{headers:o}).then(i=>h.handleResponse(i))}}const E=Shopware.Classes.ApiService;class Me extends E{constructor(t,a,n="vrpayment"){super(t,a,n)}getTransactionData(t,a){const n=this.getBasicHeaders(),r=`${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/transaction/get-transaction-data/`;return this.httpClient.post(r,{salesChannelId:t,transactionId:a},{headers:n}).then(o=>E.handleResponse(o))}getInvoiceDocument(t,a){return`${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/transaction/get-invoice-document/${t}/${a}`}getPackingSlip(t,a){return`${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/transaction/get-packing-slip/${t}/${a}`}}const w=Shopware.Classes.ApiService;class Be extends w{constructor(t,a,n="vrpayment"){super(t,a,n)}createTransactionCompletion(t,a){const n=this.getBasicHeaders(),r=`${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/transaction-completion/create-transaction-completion/`;return this.httpClient.post(r,{salesChannelId:t,transactionId:a},{headers:n}).then(o=>w.handleResponse(o))}}const S=Shopware.Classes.ApiService;class ze extends S{constructor(t,a,n="vrpayment"){super(t,a,n)}createTransactionVoid(t,a){const n=this.getBasicHeaders(),r=`${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/transaction-void/create-transaction-void/`;return this.httpClient.post(r,{salesChannelId:t,transactionId:a},{headers:n}).then(o=>S.handleResponse(o))}}const{Application:d}=Shopware;d.addServiceProvider("VRPaymentConfigurationService",e=>{const t=d.getContainer("init");return new Ve(t.httpClient,e.loginService)});d.addServiceProvider("VRPaymentRefundService",e=>{const t=d.getContainer("init");return new Le(t.httpClient,e.loginService)});d.addServiceProvider("VRPaymentTransactionService",e=>{const t=d.getContainer("init");return new Me(t.httpClient,e.loginService)});d.addServiceProvider("VRPaymentTransactionCompletionService",e=>{const t=d.getContainer("init");return new Be(t.httpClient,e.loginService)});d.addServiceProvider("VRPaymentTransactionVoidService",e=>{const t=d.getContainer("init");return new ze(t.httpClient,e.loginService)});
+//# sourceMappingURL=v-r-payment-payment-VI5R5y0b.js.map
diff --git a/src/Resources/public/administration/assets/v-r-payment-payment-VI5R5y0b.js.map b/src/Resources/public/administration/assets/v-r-payment-payment-VI5R5y0b.js.map
new file mode 100644
index 0000000..b5bd51f
--- /dev/null
+++ b/src/Resources/public/administration/assets/v-r-payment-payment-VI5R5y0b.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"v-r-payment-payment-VI5R5y0b.js","sources":["../../../app/administration/src/module/vrpayment-order/extension/sw-order/sw-order.html.twig","../../../app/administration/src/module/vrpayment-order/extension/sw-order/index.js","../../../app/administration/src/module/vrpayment-order/component/vrpayment-order-action-completion/index.html.twig","../../../app/administration/src/module/vrpayment-order/component/vrpayment-order-action-completion/index.js","../../../app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund/index.html.twig","../../../app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund/index.js","../../../app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-partial/index.html.twig","../../../app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-partial/index.js","../../../app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-by-amount/index.html.twig","../../../app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-by-amount/index.js","../../../app/administration/src/module/vrpayment-order/component/vrpayment-order-action-void/index.html.twig","../../../app/administration/src/module/vrpayment-order/component/vrpayment-order-action-void/index.js","../../../app/administration/src/module/vrpayment-order/page/vrpayment-order-detail/index.html.twig","../../../app/administration/src/module/vrpayment-order/page/vrpayment-order-detail/index.js","../../../app/administration/src/module/vrpayment-order/index.js","../../../app/administration/src/module/vrpayment-settings/acl/index.js","../../../app/administration/src/module/vrpayment-settings/page/vrpayment-settings/index.html.twig","../../../app/administration/src/module/vrpayment-settings/page/vrpayment-settings/configuration-constants.js","../../../app/administration/src/module/vrpayment-settings/page/vrpayment-settings/index.js","../../../app/administration/src/module/vrpayment-settings/component/sw-vrpayment-credentials/index.html.twig","../../../app/administration/src/module/vrpayment-settings/component/sw-vrpayment-credentials/index.js","../../../app/administration/src/module/vrpayment-settings/component/sw-vrpayment-options/index.html.twig","../../../app/administration/src/module/vrpayment-settings/component/sw-vrpayment-options/index.js","../../../app/administration/src/module/vrpayment-settings/component/sw-vrpayment-settings-icon/index.html.twig","../../../app/administration/src/module/vrpayment-settings/component/sw-vrpayment-settings-icon/index.js","../../../app/administration/src/module/vrpayment-settings/component/sw-vrpayment-storefront-options/index.html.twig","../../../app/administration/src/module/vrpayment-settings/component/sw-vrpayment-storefront-options/index.js","../../../app/administration/src/module/vrpayment-settings/component/sw-vrpayment-advanced-options/index.html.twig","../../../app/administration/src/module/vrpayment-settings/component/sw-vrpayment-advanced-options/index.js","../../../app/administration/src/module/vrpayment-settings/index.js","../../../app/administration/src/core/service/api/vrpayment-configuration.service.js","../../../app/administration/src/core/service/api/vrpayment-refund.service.js","../../../app/administration/src/core/service/api/vrpayment-transaction.service.js","../../../app/administration/src/core/service/api/vrpayment-transaction-completion.service.js","../../../app/administration/src/core/service/api/vrpayment-transaction-void.service.js","../../../app/administration/src/init/api-service.init.js"],"sourcesContent":["{% block sw_order_detail_content_tabs_general %}\n {% parent %}\n\n{# sw-tabs-item will dissappear. See: https://github.com/shopware/shopware/blob/trunk/UPGRADE-6.7.md#sw-tabs-is-removed #}\n\n\t{{ $tc('vrpayment-order.header') }}\n\n{% endblock %}\n\n{% block sw_order_detail_actions_slot_smart_bar_actions %}\n\n\t{% parent %}\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 vrpaymentFormattedHandlerIdentifier = 'handler_vrpaymentpayment_vrpaymentpaymenthandler';\n\nComponent.override('sw-order-detail', {\n\ttemplate,\n\n\tdata() {\n\t\treturn {\n\t\t\tisVRPaymentPayment: false\n\t\t};\n\t},\n\n\tcomputed: {\n\t\tisEditable() {\n\t\t\treturn !this.isVRPaymentPayment || this.$route.name !== 'vrpayment.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.setIsVRPaymentPayment(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.setIsVRPaymentPayment(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.setIsVRPaymentPayment(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\tsetIsVRPaymentPayment(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.isVRPaymentPayment = (paymentMethod.formattedHandlerIdentifier === vrpaymentFormattedHandlerIdentifier);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n});\n","{% block vrpayment_order_action_completion %}\n\n\n\t{% block vrpayment_order_action_completion_amount %}\n\t\t\n \n\t{% endblock %}\n\n\t{% block vrpayment_order_action_completion_confirm_button %}\n\t\n\t\t\n\t\t\t{{ $tc('vrpayment-order.refundAction.confirmButton.text') }}\n\t\t\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('vrpayment-order-action-completion', {\n\n\ttemplate: template,\n\n\tinject: ['VRPaymentTransactionCompletionService'],\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.VRPaymentTransactionCompletionService.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('vrpayment-order.captureAction.successTitle'),\n\t\t\t\t\t\tmessage: this.$tc('vrpayment-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","{% block vrpayment_order_action_refund %}\n\n\n\t{% block vrpayment_order_action_refund_amount %}\n\n\t\t\n\t\t\n\n\t\t