diff --git a/CHANGELOG.md b/CHANGELOG.md index 44c689c..f5931db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 7.2.0 +- Datenbanktabelle umbenannt, um Namenskonflikte mit älteren Plugins zu vermeiden. +- Problem mit fehlgeschlagenen Rückerstattungen bei Zahlungen mit Rechnungen behoben. + # 7.1.6 - Improved rounding handling to force 2 decimal places - Removed references to unused classes diff --git a/CHANGELOG_de-DE.md b/CHANGELOG_de-DE.md index 23efd00..5a56441 100644 --- a/CHANGELOG_de-DE.md +++ b/CHANGELOG_de-DE.md @@ -1,3 +1,7 @@ +# 7.2.0 +- Datenbanktabelle umbenannt, um Namenskonflikte mit älteren Plugins zu vermeiden. +- Problem mit fehlgeschlagenen Rückerstattungen bei Zahlungen mit Rechnungen behoben. + # 7.1.6 - Verbesserte Rundungsbehandlung für zwei Dezimalstellen - Entfernte Verweise auf ungenutzte Klassen diff --git a/LICENSE.txt b/LICENSE.txt index cb82feb..a7f6000 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2025 VR Payment GmbH + Copyright 2026 VR Payment GmbH Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 1b92d08..2b59036 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.6/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.6/docs/de/documentation.html) -- Pour la documentation Française, cliquez [ici](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.1.6/docs/fr/documentation.html) -- Per la documentazione in tedesco, clicca [qui](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.1.6/docs/it/documentation.html) +- For English documentation click [here](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.2.0/docs/en/documentation.html) +- Für die deutsche Dokumentation klicken Sie [hier](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.2.0/docs/de/documentation.html) +- Pour la documentation Française, cliquez [ici](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.2.0/docs/fr/documentation.html) +- Per la documentazione in tedesco, clicca [qui](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.2.0/docs/it/documentation.html) ## Installation @@ -42,6 +42,22 @@ bin/console plugin:refresh bin/console plugin:install --activate --clearCache VRPayment ``` +## Update + +### Via Administration +1. Go to Shopware Admin > Extensions > My extensions. +2. Find VRPaymentPayment. +3. Click Update. + +### Via CLI +1. Deploy the new plugin files (replace the folder in custom/plugins/VRPaymentPayment or upload/install a new ZIP). +2. Run: +```bash +bin/console plugin:refresh +bin/console plugin:update --clearCache VRPaymentPayment +bin/console cache:clear +``` + ## Configuration ### API Credentials @@ -78,7 +94,7 @@ ________________________________________________________________________________ | Shopware 6 version | Plugin major version | Supported until | |-------------------------------|------------------------|------------------------| | Shopware 6.7.x | 7.x | Further notice | -| Shopware 6.6.x | 6.x | December 2025 | +| Shopware 6.6.x | 6.x | March 2026 | | Shopware 6.5.x | 5.x | October 2024 | ----------------------------------------------------------------------------------- diff --git a/composer.json b/composer.json index d681543..c78a5ac 100644 --- a/composer.json +++ b/composer.json @@ -59,5 +59,5 @@ "vrpayment/sdk": "^4.0.0" }, "type": "shopware-platform-plugin", - "version": "7.1.6" + "version": "7.2.0" } diff --git a/docs/de/documentation.html b/docs/de/documentation.html index 649be25..9af9eb7 100644 --- a/docs/de/documentation.html +++ b/docs/de/documentation.html @@ -23,7 +23,7 @@
  • - + Source
  • @@ -197,10 +197,59 @@ php bin/console plugin:install --activate --clearCache VRPayment +
    +
    +

    + 5Update

    +
    +
    +
    +
    +

    + 5.1Via Administration

    +
    +
    +
    +
      +
    1. +

      Gehe zu Shopware Admin > Erweiterungen > Meine Erweiterungen.

      +
    2. +
    3. +

      Suche nach VRPaymentPayment.

      +
    4. +
    5. +

      Klicke auf Aktualisieren.

      +
    6. +
    +
    +
    +
    +

    + 5.2Via CLI

    +
    +
    +
    +
      +
    1. +

      Stelle die neuen Plugin-Dateien bereit (ersetze den Ordner custom/plugins/VRPaymentPayment oder lade ein neues ZIP hoch/installiere es).

      +
    2. +
    3. +

      Führe aus:

      +
      +
      +
      bin/console plugin:refresh
      +bin/console plugin:update --clearCache VRPaymentPayment
      +bin/console cache:clear
      +
      +
      +
    4. +
    +
    +

    - 5Portal-Startanleitung

    + 6Portal-Startanleitung
    @@ -219,7 +268,7 @@ Wählen Sie das passende Abo aus – es sollte E-Commerce-Transaktionen unterst

    - 5.1Erstellen Sie den API-Schlüssel:

    + 6.1Erstellen Sie den API-Schlüssel:
    @@ -305,7 +354,7 @@ Bitte beachten Sie, dass das Laden der Rollen einige Sekunden dauern kann.

    - 5.2Zahlungsmethoden einrichten

    + 6.2Zahlungsmethoden einrichten
    @@ -367,7 +416,7 @@ Bitte beachten Sie, dass die Konnektoren doppelt erscheinen, da einer für Zahlu

    - 6Shop-Startanleitung

    + 7Shop-Startanleitung
    @@ -506,7 +555,7 @@ Bitte beachten Sie, dass diese Option leer bleiben sollte, wenn Sie die Space Vi

    - 7Transaktionszustandsdiagramm

    + 8Transaktionszustandsdiagramm
    @@ -516,7 +565,7 @@ Bitte beachten Sie, dass diese Option leer bleiben sollte, wenn Sie die Space Vi

    - 7.1Zustandsabbildung von Shopware-Bestellungen

    + 8.1Zustandsabbildung von Shopware-Bestellungen
    @@ -524,7 +573,7 @@ Bitte beachten Sie, dass diese Option leer bleiben sollte, wenn Sie die Space Vi

    - 7.1.1Allgemeine Anmerkungen zu Bestellstatus

    + 8.1.1Allgemeine Anmerkungen zu Bestellstatus
    @@ -534,7 +583,7 @@ Bitte beachten Sie, dass diese Option leer bleiben sollte, wenn Sie die Space Vi

    - 7.2Zustandsabbildung des Shopware-Zahlungsstatus

    + 8.2Zustandsabbildung des Shopware-Zahlungsstatus
    @@ -561,7 +610,7 @@ Bitte beachten Sie, dass diese Option leer bleiben sollte, wenn Sie die Space Vi

    - 7.2.1Allgemeine Anmerkungen zu Zahlungsstatus

    + 8.2.1Allgemeine Anmerkungen zu Zahlungsstatus
    @@ -571,7 +620,7 @@ Bitte beachten Sie, dass diese Option leer bleiben sollte, wenn Sie die Space Vi

    - 7.3Zustandsabbildung des Shopware-Lieferstatus

    + 8.3Zustandsabbildung des Shopware-Lieferstatus
    @@ -597,7 +646,7 @@ Bitte beachten Sie, dass diese Option leer bleiben sollte, wenn Sie die Space Vi

    - 8Transaktionsverwaltung

    + 9Transaktionsverwaltung
    @@ -605,7 +654,7 @@ Bitte beachten Sie, dass diese Option leer bleiben sollte, wenn Sie die Space Vi

    - 8.1Bestellung abschließen (erfassen)

    + 9.1Bestellung abschließen (erfassen)
    @@ -633,7 +682,7 @@ Wenn der Abschluss in VR Payment ausstehend ist, bleibt die Bestellung im Status

    - 8.2Transaktion stornieren

    + 9.2Transaktion stornieren
    @@ -657,7 +706,7 @@ Sie können nur Transaktionen stornieren, die noch nicht abgeschlossen sind.

    - 8.3Rückerstattung einer Transaktion

    + 9.3Rückerstattung einer Transaktion
    @@ -683,7 +732,7 @@ Es kann einige Zeit dauern, bis Sie die Rückerstattung in Shopware sehen. Rück

    - 8.4Bestellungen auf On Hold

    + 9.4Bestellungen auf On Hold
    @@ -705,7 +754,7 @@ Es kann einige Zeit dauern, bis Sie die Rückerstattung in Shopware sehen. Rück

    - 8.5Einschränkungen der Synchronisierung zwischen VR Payment und Shopware

    + 9.5Einschränkungen der Synchronisierung zwischen VR Payment und Shopware
    @@ -716,7 +765,7 @@ Es kann einige Zeit dauern, bis Sie die Rückerstattung in Shopware sehen. Rück

    - 8.6Tokenisierung

    + 9.6Tokenisierung
    @@ -736,7 +785,7 @@ Die Tokenisierung ist für Gast-Checkouts nicht verfügbar

    - 8.7Wiederkehrende Zahlungen

    + 9.7Wiederkehrende Zahlungen
    @@ -746,7 +795,7 @@ Tokenisierung unterstützt, kann er für Abonnements verwendet werden. Die wiede

    - 8.8Hauptfunktionen

    + 9.8Hauptfunktionen
    @@ -771,7 +820,7 @@ Tokenisierung unterstützt, kann er für Abonnements verwendet werden. Die wiede

    - 8.9Fehlerbehebung

    + 9.9Fehlerbehebung
    @@ -803,7 +852,7 @@ tail -f var/log/whitelabelname*.log

    - 8.10FAQs

    + 9.10FAQs
    @@ -832,7 +881,7 @@ A: Ja, das Plugin unterstützt Wallets wie Apple Pay.

    - 9Änderungsprotokoll

    + 10Änderungsprotokoll
    @@ -841,7 +890,7 @@ A: Ja, das Plugin unterstützt Wallets wie Apple Pay.

    - 10Mitwirken

    + 11Mitwirken
    +
    +
    +

    + 5Update

    +
    +
    +
    +
    +

    + 5.1Via Administration

    +
    +
    +
    +
      +
    1. +

      Go to Shopware Admin > Extensions > My extensions.

      +
    2. +
    3. +

      Find VRPaymentPayment.

      +
    4. +
    5. +

      Click Update.

      +
    6. +
    +
    +
    +
    +

    + 5.2Via CLI

    +
    +
    +
    +
      +
    1. +

      Deploy the new plugin files (replace the folder in custom/plugins/VRPaymentPayment or upload/install a new ZIP).

      +
    2. +
    3. +

      Run:

      +
      +
      +
      bin/console plugin:refresh
      +bin/console plugin:update --clearCache VRPaymentPayment
      +bin/console cache:clear
      +
      +
      +
    4. +
    +
    +

    - 5Portal Startup Guide

    + 6Portal Startup Guide
    @@ -215,7 +264,7 @@ Please select the proper subscription plan - it should support ecommerce transac

    - 5.1Create the API key:

    + 6.1Create the API key:
    @@ -301,7 +350,7 @@ Please note that Roles might be loading for few seconds

    - 5.2Setup Payment Methods

    + 6.2Setup Payment Methods
    @@ -363,7 +412,7 @@ Please note that the connectors seems duplicated but it because one is for Physi

    - 6Shop Startup Guide

    + 7Shop Startup Guide
    @@ -502,7 +551,7 @@ Please note that if you do not use the Space View Id; this option should stay em

    - 7Transaction State graph

    + 8Transaction State graph
    @@ -514,7 +563,7 @@ can be found in the

    - 7.1State mapping of Shopware orders

    + 8.1State mapping of Shopware orders
    @@ -522,7 +571,7 @@ can be found in the

    - 7.1.1General remarks regarding order statuses

    + 8.1.1General remarks regarding order statuses
    @@ -532,7 +581,7 @@ can be found in the

    - 7.2State mapping of Shopware payment status

    + 8.2State mapping of Shopware payment status
    @@ -559,7 +608,7 @@ can be found in the

    - 7.2.1General remarks regarding payment statuses

    + 8.2.1General remarks regarding payment statuses
    @@ -569,7 +618,7 @@ can be found in the

    - 7.3State mapping of Shopware delivery status

    + 8.3State mapping of Shopware delivery status
    @@ -595,7 +644,7 @@ can be found in the

    - 8Transaction management

    + 9Transaction management
    @@ -605,7 +654,7 @@ Shopware. However, there are some limitations (see below).

    - 8.1Complete (capture) an order

    + 9.1Complete (capture) an order
    @@ -639,7 +688,7 @@ the fulfill state is reached. Initially the transaction will be in the Aut

    - 8.2Void a transaction

    + 9.2Void a transaction
    @@ -663,7 +712,7 @@ You can only void transactions that are not yet completed.

    - 8.3Refund of a transaction

    + 9.3Refund of a transaction
    @@ -690,7 +739,7 @@ It can take some time until you see the refund in Shopware. Refunds will only be

    - 8.4On hold orders

    + 9.4On hold orders
    @@ -714,7 +763,7 @@ within the defined time frame, VR Payment will generate a manual task which you

    - 8.5Limitations of the synchronization between VR Payment and Shopware

    + 9.5Limitations of the synchronization between VR Payment and Shopware
    @@ -730,7 +779,7 @@ your Shopware backend.

    - 8.6Tokenization

    + 9.6Tokenization
    @@ -751,7 +800,7 @@ Tokenization is not available for guest checkouts.

    - 8.7Recurring payments

    + 9.7Recurring payments
    @@ -761,7 +810,7 @@ tokenization, it can be used for subscriptions. The recurring payment is fully m

    - 8.8Key Features

    + 9.8Key Features
    @@ -786,7 +835,7 @@ tokenization, it can be used for subscriptions. The recurring payment is fully m

    - 8.9Troubleshooting

    + 9.9Troubleshooting
    @@ -817,7 +866,7 @@ tokenization, it can be used for subscriptions. The recurring payment is fully m

    - 8.10FAQs

    + 9.10FAQs
    @@ -849,7 +898,7 @@ tokenization, it can be used for subscriptions. The recurring payment is fully m

    - 9Changelog

    + 10Changelog
    @@ -858,7 +907,7 @@ tokenization, it can be used for subscriptions. The recurring payment is fully m
    +
    +
    +

    + 5Mise à jour

    +
    +
    +
    +
    +

    + 5.1Via l’administration

    +
    +
    +
    +
      +
    1. +

      Allez dans Shopware Admin > Extensions > Mes extensions.

      +
    2. +
    3. +

      Recherchez VRPaymentPayment.

      +
    4. +
    5. +

      Cliquez sur Mettre à jour.

      +
    6. +
    +
    +
    +
    +

    + 5.2Via la CLI

    +
    +
    +
    +
      +
    1. +

      Déployez les nouveaux fichiers du plugin (remplacez le dossier custom/plugins/VRPaymentPayment ou téléversez/installez un nouveau ZIP).

      +
    2. +
    3. +

      Exécutez :

      +
      +
      +
      bin/console plugin:refresh
      +bin/console plugin:update --clearCache VRPaymentPayment
      +bin/console cache:clear
      +
      +
      +
    4. +
    +
    +

    - 5Guide de démarrage pour le Portail

    + 6Guide de démarrage pour le Portail
    @@ -206,7 +255,7 @@ Veuillez sélectionner le plan d’abonnement approprié - il doit prendre e

    - 5.1Créez la clé API:

    + 6.1Créez la clé API:
    @@ -292,7 +341,7 @@ Veuillez noter que le chargement des rôles peut durer quelques secondes.

    - 5.2Configurer les modes de paiement

    + 6.2Configurer les modes de paiement
    @@ -354,7 +403,7 @@ Veuillez noter que les connecteurs semblent faire double emploi, mais c’es

    - 6Guide de démarrage pour Shopware

    + 7Guide de démarrage pour Shopware
    @@ -493,7 +542,7 @@ Veuillez noter que si vous n’utilisez pas Space View Id, cette option doit

    - 7Différents Etats pour une Transaction

    + 8Différents Etats pour une Transaction
    @@ -503,7 +552,7 @@ Veuillez noter que si vous n’utilisez pas Space View Id, cette option doit

    - 7.1Cartographie des différents états d’une commande de Shopware

    + 8.1Cartographie des différents états d’une commande de Shopware
    @@ -511,7 +560,7 @@ Veuillez noter que si vous n’utilisez pas Space View Id, cette option doit

    - 7.1.1Remarque générales concernant les status des commandes

    + 8.1.1Remarque générales concernant les status des commandes
    @@ -521,7 +570,7 @@ Veuillez noter que si vous n’utilisez pas Space View Id, cette option doit

    - 7.2Cartographie des différents états du paiement de Shopware

    + 8.2Cartographie des différents états du paiement de Shopware
    @@ -548,7 +597,7 @@ Veuillez noter que si vous n’utilisez pas Space View Id, cette option doit

    - 7.2.1Remarques générales concernant les différents status pour les paiements

    + 8.2.1Remarques générales concernant les différents status pour les paiements
    @@ -558,7 +607,7 @@ Veuillez noter que si vous n’utilisez pas Space View Id, cette option doit

    - 7.3Carthographie des différents états de livraison chez Shopware

    + 8.3Carthographie des différents états de livraison chez Shopware
    @@ -584,7 +633,7 @@ Veuillez noter que si vous n’utilisez pas Space View Id, cette option doit

    - 8Gestion des Transactions

    + 9Gestion des Transactions
    @@ -592,7 +641,7 @@ Veuillez noter que si vous n’utilisez pas Space View Id, cette option doit

    - 8.1Complete (capture) an order

    + 9.1Complete (capture) an order
    @@ -624,7 +673,7 @@ Lorsque le paiement est en attente dans VR Payment, la commande reste en attente

    - 8.2Annuler une transaction

    + 9.2Annuler une transaction
    @@ -648,7 +697,7 @@ Vous ne pouvez annuler que les transactions qui ne sont pas encore complétée..

    - 8.3Remboursement d’une transaction

    + 9.3Remboursement d’une transaction
    @@ -674,7 +723,7 @@ Il peut s’écouler un certain temps avant que vous ne voyiez le remboursem

    - 8.4Commandes en attente

    + 9.4Commandes en attente
    @@ -696,7 +745,7 @@ Il peut s’écouler un certain temps avant que vous ne voyiez le remboursem

    - 8.5Limites de la synchronisation entre VR Payment et Shopware

    + 9.5Limites de la synchronisation entre VR Payment et Shopware
    @@ -707,7 +756,7 @@ Il peut s’écouler un certain temps avant que vous ne voyiez le remboursem

    - 8.6Tokenisation

    + 9.6Tokenisation
    @@ -727,7 +776,7 @@ La tokenisation n’est pas disponible pour les paiements par les invités.

    - 8.7Paiements récurrents

    + 9.7Paiements récurrents
    @@ -736,7 +785,7 @@ La tokenisation n’est pas disponible pour les paiements par les invités.

    - 8.8Caractéristiques Pricinpales

    + 9.8Caractéristiques Pricinpales
    @@ -761,7 +810,7 @@ La tokenisation n’est pas disponible pour les paiements par les invités.

    - 8.9Troubleshooting

    + 9.9Troubleshooting
    @@ -792,7 +841,7 @@ La tokenisation n’est pas disponible pour les paiements par les invités.

    - 8.10FAQs

    + 9.10FAQs
    @@ -820,7 +869,7 @@ A: Oui, le plugin prend en charge les portefeuilles comme Apple Pay.

    - 9Changelog

    + 10Changelog
    @@ -829,7 +878,7 @@ A: Oui, le plugin prend en charge les portefeuilles comme Apple Pay.

    - 10Contribuer

    + 11Contribuer
    @@ -840,7 +889,7 @@ A: Oui, le plugin prend en charge les portefeuilles comme Apple Pay.

    - 11Support

    + 12Support
    @@ -896,133 +945,150 @@ A: Oui, le plugin prend en charge les portefeuilles comme Apple Pay.

    diff --git a/docs/it/documentation.html b/docs/it/documentation.html index d4fb81b..2b54fda 100644 --- a/docs/it/documentation.html +++ b/docs/it/documentation.html @@ -23,7 +23,7 @@
  • - + Source
  • @@ -191,10 +191,59 @@ php bin/console plugin:install --activate --clearCache VRPayment
    +
    +
    +

    + 5Aggiornamento

    +
    +
    +
    +
    +

    + 5.1Tramite Amministrazione

    +
    +
    +
    +
      +
    1. +

      Vai su Shopware Admin > Estensioni > Le mie estensioni.

      +
    2. +
    3. +

      Trova VRPaymentPayment.

      +
    4. +
    5. +

      Clicca su Aggiorna.

      +
    6. +
    +
    +
    +
    +

    + 5.2Tramite CLI

    +
    +
    +
    +
      +
    1. +

      Distribuisci i nuovi file del plugin (sostituisci la cartella custom/plugins/VRPaymentPayment oppure carica/installa un nuovo ZIP).

      +
    2. +
    3. +

      Esegui:

      +
      +
      +
      bin/console plugin:refresh
      +bin/console plugin:update --clearCache VRPaymentPayment
      +bin/console cache:clear
      +
      +
      +
    4. +
    +
    +

    - 5Guida Rapida al Portale

    + 6Guida Rapida al Portale
    @@ -213,7 +262,7 @@ Selezionate il piano di abbonamento appropriato: dovrebbe supportare le transazi

    - 5.1Create la chiave API:

    + 6.1Create la chiave API:
    @@ -299,7 +348,7 @@ Si prega di notare che il caricamento dei ruoli potrebbe richiedere alcuni secon

    - 5.2Configurate i Metodi di Pagamento

    + 6.2Configurate i Metodi di Pagamento
    @@ -361,7 +410,7 @@ Si prega di notare che i connettori sembrano duplicati, ma è perché uno è per

    - 6Guida Rapida al Shop

    + 7Guida Rapida al Shop
    @@ -500,7 +549,7 @@ Si prega di notare che se non utilizzate lo Space View Id, questa opzione dovreb

    - 7Grafico dello Stato della Transazione

    + 8Grafico dello Stato della Transazione
    @@ -510,7 +559,7 @@ Si prega di notare che se non utilizzate lo Space View Id, questa opzione dovreb

    - 7.1Mappatura degli Stati degli Ordini di Shopware

    + 8.1Mappatura degli Stati degli Ordini di Shopware
    @@ -518,7 +567,7 @@ Si prega di notare che se non utilizzate lo Space View Id, questa opzione dovreb

    - 7.1.1Osservazioni Generali Riguardo agli Stati degli Ordini

    + 8.1.1Osservazioni Generali Riguardo agli Stati degli Ordini
    @@ -528,7 +577,7 @@ Si prega di notare che se non utilizzate lo Space View Id, questa opzione dovreb

    - 7.2Mappatura dello Stato di Pagamento di Shopware

    + 8.2Mappatura dello Stato di Pagamento di Shopware
    @@ -555,7 +604,7 @@ Si prega di notare che se non utilizzate lo Space View Id, questa opzione dovreb

    - 7.2.1Osservazioni Generali Riguardo agli Stati di Pagamento

    + 8.2.1Osservazioni Generali Riguardo agli Stati di Pagamento
    @@ -565,7 +614,7 @@ Si prega di notare che se non utilizzate lo Space View Id, questa opzione dovreb

    - 7.3Mappatura dello Stato di Spedizione di Shopware

    + 8.3Mappatura dello Stato di Spedizione di Shopware
    @@ -591,7 +640,7 @@ Si prega di notare che se non utilizzate lo Space View Id, questa opzione dovreb

    - 8Gestione delle Transazioni

    + 9Gestione delle Transazioni
    @@ -599,7 +648,7 @@ Si prega di notare che se non utilizzate lo Space View Id, questa opzione dovreb

    - 8.1Completare (Acquisire) un Ordine

    + 9.1Completare (Acquisire) un Ordine
    @@ -631,7 +680,7 @@ Quando il completamento è in sospeso in VR Payment, l’ordine rimarrà nel

    - 8.2Annullare una transazione

    + 9.2Annullare una transazione
    @@ -655,7 +704,7 @@ Puoi annullare solo le transazioni che non sono ancora state completate

    - 8.3Rimborso di una Transazione

    + 9.3Rimborso di una Transazione
    @@ -681,7 +730,7 @@ Potrebbe volerci un po' di tempo prima che vediate il rimborso in Shopware. I ri

    - 8.4Ordini in Attesa

    + 9.4Ordini in Attesa
    @@ -703,7 +752,7 @@ Potrebbe volerci un po' di tempo prima che vediate il rimborso in Shopware. I ri

    - 8.5Limitazioni della Sincronizzazione tra VR Payment e Shopware

    + 9.5Limitazioni della Sincronizzazione tra VR Payment e Shopware
    @@ -714,7 +763,7 @@ Potrebbe volerci un po' di tempo prima che vediate il rimborso in Shopware. I ri

    - 8.6Tokenization

    + 9.6Tokenization
    @@ -734,7 +783,7 @@ La tokenizzazione non è disponibile per i checkout degli ospiti.

    - 8.7Pagamenti ricorrenti

    + 9.7Pagamenti ricorrenti
    @@ -743,7 +792,7 @@ La tokenizzazione non è disponibile per i checkout degli ospiti.

    - 8.8Key Features

    + 9.8Key Features
    @@ -768,7 +817,7 @@ La tokenizzazione non è disponibile per i checkout degli ospiti.

    - 8.9Risoluzione dei Problemi

    + 9.9Risoluzione dei Problemi
    @@ -799,7 +848,7 @@ La tokenizzazione non è disponibile per i checkout degli ospiti.

    - 8.10FAQs

    + 9.10FAQs
    @@ -831,7 +880,7 @@ La tokenizzazione non è disponibile per i checkout degli ospiti.

    - 9Changelog

    + 10Changelog
    @@ -840,7 +889,7 @@ La tokenizzazione non è disponibile per i checkout degli ospiti.

    - 10Contribuzione

    + 11Contribuzione
    @@ -851,7 +900,7 @@ La tokenizzazione non è disponibile per i checkout degli ospiti.

    - 11Support

    + 12Support
    @@ -907,133 +956,150 @@ La tokenizzazione non è disponibile per i checkout degli ospiti. diff --git a/src/Core/Api/Transaction/Entity/TransactionEntityDefinition.php b/src/Core/Api/Transaction/Entity/TransactionEntityDefinition.php index 3dcb045..391ffaa 100644 --- a/src/Core/Api/Transaction/Entity/TransactionEntityDefinition.php +++ b/src/Core/Api/Transaction/Entity/TransactionEntityDefinition.php @@ -32,7 +32,7 @@ use VRPaymentPayment\Core\Api\Refund\Entity\RefundEntityDefinition; */ class TransactionEntityDefinition extends EntityDefinition { - public const ENTITY_NAME = 'vrpayment_transaction'; + public const ENTITY_NAME = 'vrpayment_transaction_data'; /** * @return string diff --git a/src/Core/Storefront/Checkout/Subscriber/CheckoutSubscriber.php b/src/Core/Storefront/Checkout/Subscriber/CheckoutSubscriber.php index 91e402f..05abe15 100644 --- a/src/Core/Storefront/Checkout/Subscriber/CheckoutSubscriber.php +++ b/src/Core/Storefront/Checkout/Subscriber/CheckoutSubscriber.php @@ -39,6 +39,7 @@ use VRPaymentPayment\Sdk\{Model\AddressCreate, Model\TransactionCreate, Model\TransactionPending}; use Shopware\Core\Framework\Struct\ArrayEntity; +use Shopware\Core\Framework\DataAbstractionLayer\Search\Sorting\FieldSorting; /** * Class CheckoutSubscriber @@ -337,6 +338,7 @@ class CheckoutSubscriber implements EventSubscriberInterface $criteria->addFilter( new EqualsFilter('salesChannels.id', $event->getSalesChannelContext()->getSalesChannelId()) ); + $criteria->addSorting(new FieldSorting('position', FieldSorting::ASCENDING)); $result = $this->paymentMethodRepository->search($criteria, $event->getContext()); foreach ($result->getEntities() as $method) { diff --git a/src/Core/Util/Analytics/Analytics.php b/src/Core/Util/Analytics/Analytics.php index 95c0e0b..7e7400b 100644 --- a/src/Core/Util/Analytics/Analytics.php +++ b/src/Core/Util/Analytics/Analytics.php @@ -26,7 +26,7 @@ class Analytics { self::SHOP_SYSTEM => 'shopware', self::SHOP_SYSTEM_VERSION => '6', self::SHOP_SYSTEM_AND_VERSION => 'shopware-6', - self::PLUGIN_SYSTEM_VERSION => '7.1.6', + self::PLUGIN_SYSTEM_VERSION => '7.2.0', ]; } diff --git a/src/Migration/Migration1590156974TransactionEntity.php b/src/Migration/Migration1590156974TransactionEntity.php index 16b93c5..ecdc068 100644 --- a/src/Migration/Migration1590156974TransactionEntity.php +++ b/src/Migration/Migration1590156974TransactionEntity.php @@ -31,7 +31,7 @@ class Migration1590156974TransactionEntity extends MigrationStep { public function update(Connection $connection): void { $connection->executeStatement(' - CREATE TABLE IF NOT EXISTS `vrpayment_transaction` ( + CREATE TABLE IF NOT EXISTS `vrpayment_transaction_tmp` ( `id` BINARY(16) NOT NULL, `data` JSON NOT NULL, `payment_method_id` BINARY(16) NOT NULL, diff --git a/src/Migration/Migration1590646356RefundEntity.php b/src/Migration/Migration1590646356RefundEntity.php index 272d2ec..0f7cade 100644 --- a/src/Migration/Migration1590646356RefundEntity.php +++ b/src/Migration/Migration1590646356RefundEntity.php @@ -42,7 +42,7 @@ class Migration1590646356RefundEntity extends MigrationStep { PRIMARY KEY (`id`), UNIQUE KEY `refund_id_UNIQUE` (`refund_id`), KEY `fk.vrp_refund.transaction_id` (`transaction_id`), - CONSTRAINT `fk.vrp_refund.transaction_id` FOREIGN KEY (`transaction_id`) REFERENCES `vrpayment_transaction` (`transaction_id`) ON DELETE CASCADE + CONSTRAINT `fk.vrp_refund.transaction_id` FOREIGN KEY (`transaction_id`) REFERENCES `vrpayment_transaction_tmp` (`transaction_id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; '); } diff --git a/src/Migration/Migration1590646356TransactionEntity.php b/src/Migration/Migration1590646356TransactionEntity.php index 1e36e65..0173632 100644 --- a/src/Migration/Migration1590646356TransactionEntity.php +++ b/src/Migration/Migration1590646356TransactionEntity.php @@ -30,7 +30,7 @@ class Migration1590646356TransactionEntity extends MigrationStep { public function update(Connection $connection): void { try { - $connection->executeStatement('ALTER TABLE `vrpayment_transaction` ADD COLUMN `confirmation_email_sent` TINYINT(1) NOT NULL DEFAULT 0 AFTER `id`;'); + $connection->executeStatement('ALTER TABLE `vrpayment_transaction_tmp` ADD COLUMN `confirmation_email_sent` TINYINT(1) NOT NULL DEFAULT 0 AFTER `id`;'); }catch (\Exception $exception){ // column probably exists } diff --git a/src/Migration/Migration1605701048TransactionEntity.php b/src/Migration/Migration1605701048TransactionEntity.php index 5368d14..5d994e1 100644 --- a/src/Migration/Migration1605701048TransactionEntity.php +++ b/src/Migration/Migration1605701048TransactionEntity.php @@ -33,19 +33,19 @@ class Migration1605701048TransactionEntity extends MigrationStep try { $connection->executeStatement(' - ALTER TABLE `vrpayment_transaction` + ALTER TABLE `vrpayment_transaction_tmp` ADD `order_version_id` binary(16) NOT NULL AFTER `transaction_id`; '); $connection->executeStatement(' - UPDATE `vrpayment_transaction` t1 + UPDATE `vrpayment_transaction_tmp` t1 INNER JOIN `order` t2 ON t1.order_id = t2.id SET t1.order_version_id = t2.version_id; '); $connection->executeStatement(' - ALTER TABLE `vrpayment_transaction` + ALTER TABLE `vrpayment_transaction_tmp` DROP FOREIGN KEY `fk.vrp_transaction.order_id`, DROP FOREIGN KEY `fk.vrp_transaction.order_transaction_id`, DROP FOREIGN KEY `fk.vrp_transaction.payment_method_id`, @@ -53,7 +53,7 @@ class Migration1605701048TransactionEntity extends MigrationStep '); $connection->executeStatement(' - ALTER TABLE `vrpayment_transaction` + ALTER TABLE `vrpayment_transaction_tmp` ADD CONSTRAINT `fk.vrp_transaction_order_id` FOREIGN KEY (`order_id`, `order_version_id`) REFERENCES `order` (`id`, `version_id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `fk.vrp_transaction_payment_method_id` FOREIGN KEY (`payment_method_id`) diff --git a/src/Migration/Migration1684240994TransactionEntity.php b/src/Migration/Migration1684240994TransactionEntity.php index 2fc4bf9..0b9a5a0 100644 --- a/src/Migration/Migration1684240994TransactionEntity.php +++ b/src/Migration/Migration1684240994TransactionEntity.php @@ -30,7 +30,7 @@ class Migration1684240994TransactionEntity extends MigrationStep { public function update(Connection $connection): void { try { - $connection->executeStatement('ALTER TABLE `vrpayment_transaction` ADD COLUMN `erp_merchant_id` VARCHAR(255) DEFAULT NULL AFTER `confirmation_email_sent`;'); + $connection->executeStatement('ALTER TABLE `vrpayment_transaction_tmp` ADD COLUMN `erp_merchant_id` VARCHAR(255) DEFAULT NULL AFTER `confirmation_email_sent`;'); }catch (\Exception $exception){ // column probably exists } diff --git a/src/Migration/Migration1766067106TransactionEntity.php b/src/Migration/Migration1766067106TransactionEntity.php new file mode 100644 index 0000000..335c929 --- /dev/null +++ b/src/Migration/Migration1766067106TransactionEntity.php @@ -0,0 +1,323 @@ +pushHandler(new StreamHandler(dirname(__DIR__, 5) . '/var/log/vrpayment-migration.log')); + $logger->info( + 'Migration start', [ + 'old_table_exists' => $this->tableExists($connection, $oldTableName), + 'temp_table_exists' => $this->tableExists($connection, $tempTableName), + 'real_table_exists' => $this->tableExists($connection, $realTableName), + ] + ); + if ($this->tableExists($connection, $tempTableName)) { + // If _temp table exists, it means that this is a fresh installation. + $logger->info('Fresh installation detected.'); + $connection->executeStatement( + sprintf('RENAME TABLE `%s` TO `%s`', $tempTableName, $realTableName) + ); + $logger->info('Fresh installation finished.'); + } else { + // If _temp does not exist, it means that this could be a version upgrade. + $logger->info('Possible plugin upgrade detected.'); + if ($this->tableExists($connection, $oldTableName) && !$this->isOldPluginTable($connection, $oldTableName)) { + $logger->info('Old vrpayment_transaction table detected.'); + // If vrpayment_transaction already exists and does not belong to old plugin, + // it means that this is indeed a version update. + $this->syncTransactionTable($connection, $oldTableName); + $logger->info('Old vrpayment_transaction table sync finished.'); + $this->syncRefundTable($connection, $oldTableName); + $logger->info('Old vrpayment_refund table sync finished.'); + $connection->executeStatement( + sprintf('RENAME TABLE `%s` TO `%s`', $oldTableName, $realTableName) + ); + $logger->info('Old vrpayment_transaction table renaming completed.'); + } + $logger->info('Possible plugin upgrade finished.'); + // If vrpayment_transaction exists and it does belong to old plugin, + // it means we must run it in parallel. + } + $logger->info('Migration finished.'); + return; + } + + /** + * Check if table exists. + * + * @param \Doctrine\DBAL\Connection $connection + * @param string $table + * + * @return bool + */ + public function tableExists(Connection $connection, string $table): bool { + $result = $connection->fetchOne('SHOW TABLES LIKE :table', ['table' => $table]); + return $result !== false && $result !== null; + } + + /** + * Check if table belongs to old plugin. + * + * @param \Doctrine\DBAL\Connection $connection + * @param string $table + * + * @return bool + */ + public function isOldPluginTable(Connection $connection, string $table): bool { + $oldTableExclusiveColumns = [ + 'finalized_at' => 'datetime', + 'refunded_at' => 'datetime', + 'initial_transaction_mode' => 'varchar', + 'manual_capture' => 'tinyint', + 'partial_refunded_at' => 'datetime', + 'refunded_amount' => 'double', + 'amount_to_refund' => 'double', + ]; + $resultColumns = $connection->fetchAllAssociative( + 'SELECT LOWER(COLUMN_NAME) AS column_name, LOWER(DATA_TYPE) AS data_type + FROM information_schema.COLUMNS + WHERE TABLE_SCHEMA = DATABASE() + AND TABLE_NAME = :table', + ['table' => $table] + ); + $dbColumns = []; + foreach($resultColumns as $column) { + $dbColumns[$column['column_name']] = $column['data_type']; + } + + $oldPluginTable = true; + foreach($oldTableExclusiveColumns as $columnName => $columnType) { + if(!isset($dbColumns[$columnName])) { + $oldPluginTable = false; + break; + } + if ($dbColumns[$columnName] !== $columnType) { + $oldPluginTable = false; + break; + } + } + return $oldPluginTable; + } + + /** + * Synchronizes the transaction table with the current/latest version. + * + * @param \Doctrine\DBAL\Connection $connection + * @param string $table + */ + private function syncTransactionTable(Connection $connection, string $table): void { + $this->addColumnIfMissing($connection, $table, 'confirmation_email_sent', "TINYINT(1) NOT NULL DEFAULT 0 AFTER `id`"); + $this->addColumnIfMissing($connection, $table, 'erp_merchant_id', "VARCHAR(255) DEFAULT NULL AFTER `confirmation_email_sent`"); + $this->addColumnIfMissing($connection, $table, 'data', "LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`data`)) AFTER `erp_merchant_id`"); + $this->addColumnIfMissing($connection, $table, 'payment_method_id', "BINARY(16) NOT NULL"); + $this->addColumnIfMissing($connection, $table, 'order_id', "BINARY(16) NOT NULL"); + $this->addColumnIfMissing($connection, $table, 'order_transaction_id', "BINARY(16) NOT NULL"); + $this->addColumnIfMissing($connection, $table, 'space_id', "INT(10) UNSIGNED NOT NULL"); + $this->addColumnIfMissing($connection, $table, 'state', "VARCHAR(255) NOT NULL"); + $this->addColumnIfMissing($connection, $table, 'sales_channel_id', "BINARY(16) NOT NULL"); + $this->addColumnIfMissing($connection, $table, 'transaction_id', "INT(10) UNSIGNED NOT NULL"); + $this->addColumnIfMissing($connection, $table, 'order_version_id', "BINARY(16) NOT NULL AFTER `transaction_id`"); + + $this->addColumnIfMissing($connection, $table, 'created_at', "DATETIME(3) NOT NULL"); + $this->addColumnIfMissing($connection, $table, 'updated_at', "DATETIME(3) DEFAULT NULL"); + + $this->ensureIndexBySql($connection, $table, 'fk.vrp_transaction.order_id', "KEY `fk.vrp_transaction.order_id` (`order_id`)"); + $this->ensureIndexBySql($connection, $table, 'fk.vrp_transaction.order_transaction_id', "KEY `fk.vrp_transaction.order_transaction_id` (`order_transaction_id`)"); + $this->ensureIndexBySql($connection, $table, 'fk.vrp_transaction.payment_method_id', "KEY `fk.vrp_transaction.payment_method_id` (`payment_method_id`)"); + $this->ensureIndexBySql($connection, $table, 'fk.vrp_transaction.sales_channel_id', "KEY `fk.vrp_transaction.sales_channel_id` (`sales_channel_id`)"); + $this->ensureIndexBySql($connection, $table, 'fk.vrp_transaction', "KEY `fk.vrp_transaction` (`order_id`,`order_version_id`)"); + + $this->ensureForeignKey( + $connection, + $table, + 'fk.vrp_transaction_order_id', + ['order_id', 'order_version_id'], + 'order', + ['id', 'version_id'], + 'CASCADE', + 'CASCADE' + ); + $this->ensureForeignKey( + $connection, + $table, + 'fk.vrp_transaction_payment_method_id', + ['payment_method_id'], + 'payment_method', + ['id'], + 'RESTRICT', + 'CASCADE' + ); + $this->ensureForeignKey( + $connection, + $table, + 'fk.vrp_transaction_sales_channel_id', + ['sales_channel_id'], + 'sales_channel', + ['id'], + 'RESTRICT', + 'CASCADE' + ); + } + + /** + * Synchronizes the parts of the refund table related to transactions with the current/latest version. + * + * @param \Doctrine\DBAL\Connection $connection + * @param string $table + */ + private function syncRefundTable(Connection $connection, string $table): void { + $refundTable = 'vrpayment_refund'; + $this->ensureIndexBySql($connection, $refundTable, 'fk.vrp_refund.transaction_id', "KEY `fk.vrp_refund.transaction_id` (`transaction_id`)"); + $this->ensureForeignKey( + $connection, + $refundTable, + 'fk.vrp_refund.transaction_id', + ['transaction_id'], + $table, + ['transaction_id'], + 'CASCADE', + null + ); + } + + /** + * Adds column to the table if it's missing. + * + * @param \Doctrine\DBAL\Connection $connection + * @param string $table + * @param string $column + * @param string $sqlFragment + */ + private function addColumnIfMissing(Connection $connection, string $table, string $column, string $sqlFragment): void { + if ($this->columnExists($connection, $table, $column)) { + return; + } + $connection->executeStatement( + sprintf("ALTER TABLE `%s` ADD COLUMN `%s` %s", $table, $column, $sqlFragment) + ); + } + + /** + * Adds index to the table if it's missing. + * + * @param \Doctrine\DBAL\Connection $connection + * @param string $table + * @param string $indexName + * @param string $sqlFragment + */ + private function ensureIndexBySql(Connection $connection, string $table, string $indexName, string $sqlFragment): void { + if ($this->indexExists($connection, $table, $indexName)) { + return; + } + $connection->executeStatement( + sprintf("ALTER TABLE `%s` ADD %s", $table, $sqlFragment) + ); + } + + /** + * Adds foreign key constraint to the table if it's missing. + * + * @param \Doctrine\DBAL\Connection $connection + * @param string $table + * @param string $constraintName + * @param string $columns + * @param string $refTable + * @param string $refColumns + * @param string|null $onDelete + * @param string|null $onUpdate + */ + private function ensureForeignKey( + Connection $connection, + string $table, + string $constraintName, + array $columns, + string $refTable, + array $refColumns, + ?string $onDelete, + ?string $onUpdate + ): void { + if ($this->foreignKeyExists($connection, $table, $constraintName)) { + return; + } + $columnsList = '`' . implode('`,`', $columns) . '`'; + $refColumnsList = '`' . implode('`,`', $refColumns) . '`'; + $connection->executeStatement( + sprintf( + "ALTER TABLE `%s` + ADD CONSTRAINT `%s` FOREIGN KEY (%s) + REFERENCES `%s` (%s)%s%s", + $table, + $constraintName, + $columnsList, + $refTable, + $refColumnsList, + $onDelete ? " ON DELETE {$onDelete}" : "", + $onUpdate ? " ON UPDATE {$onUpdate}" : "" + ) + ); + } + + /** + * Check if foreign key constraint exists. + * + * @param \Doctrine\DBAL\Connection $connection + * @param string $table + * @param string $constraintName + * + * @return bool + */ + private function foreignKeyExists(Connection $connection, string $table, $constraintName): bool { + $result = $connection->fetchOne( + "SELECT 1 FROM information_schema.referential_constraints + WHERE constraint_schema = DATABASE() + AND table_name = ? + AND constraint_name = ? + LIMIT 1", + [$table,$constraintName] + ); + return $result !== false && $result !== null; + } + + /** + * update destructive changes + * + * @param \Doctrine\DBAL\Connection $connection + */ + public function updateDestructive(Connection $connection): void + { + // implement update destructive + } +}