diff --git a/CHANGELOG.md b/CHANGELOG.md index 55d368b..8a56aac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,23 +1,6 @@ -# 7.1.0 -## Feature -- Support subscription payment methods -- Support Shopware 6.7.2.0 - -## Bugfix +# 6.1.15 - Fixed issue with shipping costs not being processed correctly -# 7.0.1 -## Feature -- Add plugin version metric - -## Bugfix -- Fixed error message when refund amount exceeds total -- Fixed bug where only 25 sales channels showed in the dropdown -- Removed erroneous logs - -# 7.0.0 -- Compatibility with Shopware 6.7.0 - # 6.1.14 - Disable Recreate Cart for Headless Storefront Order - Added the correct Exception Type to the finalize method diff --git a/CHANGELOG_de-DE.md b/CHANGELOG_de-DE.md index c9edd2d..d490c5a 100644 --- a/CHANGELOG_de-DE.md +++ b/CHANGELOG_de-DE.md @@ -1,16 +1,5 @@ -# 7.1.0 -– Unterstützung für Abonnement-Zahlungsmethoden -– Support für Shopware 6.7.2.0 -– Problem mit fehlerhafter Bearbeitung der Versandkosten behoben - -# 7.0.1 -- Plugin-Versionsmetrik hinzugefügt -- Fehlermeldung behoben, wenn der Rückerstattungsbetrag den Gesamtbetrag überschreitet -- Fehler behoben, bei dem nur 25 Vertriebskanäle in der Dropdown-Liste angezeigt wurden -- Fehlerhafte Protokolle entfernt - -# 7.0.0 -- Kompatibilität mit Shopware 6.7.0 +# 6.1.15 +- Problem behoben, bei dem die Versandkosten nicht korrekt verarbeitet wurden # 6.1.14 – Warenkorb neu erstellen für Headless Storefront Order deaktivieren diff --git a/README.md b/README.md index 70248b1..19be3f6 100644 --- a/README.md +++ b/README.md @@ -3,20 +3,21 @@ VR Payment Integration for Shopware 6 ============================= -The VR Payment plugin wraps around the VR Payment API. This library facilitates your interaction with various services such as transactions. -Please note that this plugin is for versions 6.5, 6.6 or 6.7. For the 6.4 plugin please visit [our Shopware 6.4 plugin](https://github.com/vr-payment/shopware-6-4). +## **Overview** +The VR Payment Payment Plugin integrates modern payment processing into Shopware 6, offering features like iFrame-based payments, refunds, captures, and PCI compliance. It supports seamless integration with the [VR Payment Portal](https://gateway.vr-payment.de/) for managing transactions and payment methods. ## Requirements -- Shopware 6.7.x, 6.6.x or 6.5.x. See table below. -- PHP minimum version supported by the each shop version. +- **Shopware Version:** 6.5.x or 6.6.x (see [compatibility table](#compatibility)). +- **PHP:** Minimum version as required by your Shopware installation (e.g., 7.4+). +- **VR Payment Account:** Obtain `Space ID`, `User ID`, and `API Key` from the [VR Payment Dashboard](https://gateway.vr-payment.de/). ## Documentation -- For English documentation click [here](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.1.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.1.0/docs/de/documentation.html) -- Pour la documentation Française, cliquez [ici](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.1.0/docs/fr/documentation.html) -- Per la documentazione in tedesco, clicca [qui](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.1.0/docs/it/documentation.html) +- For English documentation click [here](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/6.1.15/docs/en/documentation.html) +- Für die deutsche Dokumentation klicken Sie [hier](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/6.1.15/docs/de/documentation.html) +- Pour la documentation Française, cliquez [ici](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/6.1.15/docs/fr/documentation.html) +- Per la documentazione in tedesco, clicca [qui](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/6.1.15/docs/it/documentation.html) ## Installation @@ -61,15 +62,12 @@ Configure supported methods (e.g., credit cards, Apple Pay) via the [VR Payment **Automatic Updates**: Payment methods sync dynamically via the VRPayment API. -**Subscriptions**: Make recurring payments with Subscriptions (Shopware Commercial) and VRPayment. - ## Compatibiliity ___________________________________________________________________________________ | 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 | Further notice | | Shopware 6.5.x | 5.x | October 2024 | ----------------------------------------------------------------------------------- diff --git a/composer.json b/composer.json index 5392c9e..c0ce698 100644 --- a/composer.json +++ b/composer.json @@ -53,11 +53,11 @@ "ext-json": "*", "ext-mbstring": "*", "php": ">=8.2", - "shopware/core": "~6.7.0", - "shopware/administration": "~6.7.0", - "shopware/storefront":"~6.7.0", + "shopware/core": "~6.6.0", + "shopware/administration": "~6.6.0", + "shopware/storefront":"~6.6.0", "vrpayment/sdk": "^4.0.0" }, "type": "shopware-platform-plugin", - "version": "7.1.0" + "version": "6.1.15" } diff --git a/docs/de/documentation.html b/docs/de/documentation.html index 71cbaae..3ba5c4f 100644 --- a/docs/de/documentation.html +++ b/docs/de/documentation.html @@ -23,7 +23,7 @@
  • - + Source
  • @@ -52,7 +52,7 @@
    @@ -720,20 +714,10 @@ Die Tokenisierung ist für Gast-Checkouts nicht verfügbar -
    -
    -

    - 8.7Wiederkehrende Zahlungen

    -
    -
    -
    -

    Shopware bietet das Paket "Shopware Commercial" mit zusätzlichen Funktionen, unter anderem Abonnements. Dieses Plugin unterstützt Zahlungen, die für Abonnements geeignet sind. Solange der Konnektor der Zahlungsmethode -Tokenisierung unterstützt, kann er für Abonnements verwendet werden. Die wiederkehrende Zahlung wird vollständig vom Shopware Commercial Plugin verwaltet. Weitere Informationen finden Sie in deren Dokumentation.

    -

    - 8.8Hauptfunktionen

    + 8.7Hauptfunktionen
    @@ -750,15 +734,12 @@ Tokenisierung unterstützt, kann er für Abonnements verwendet werden. Die wiede
  • Automatic Updates: Zahlungsmethoden werden dynamisch über die VR Payment API synchronisiert.

  • -
  • -

    Wiederkehrende Zahlungen: Führen Sie wiederkehrende Zahlungen mit Abonnements (Shopware Commercial) und VRPayment durch.

    -
  • - 8.9Fehlerbehebung

    + 8.8Fehlerbehebung
    @@ -790,7 +771,7 @@ tail -f var/log/whitelabelname_payment*.log

    - 8.10FAQs

    + 8.9FAQs
    @@ -983,24 +964,19 @@ A: Ja, das Plugin unterstützt Wallets wie Apple Pay.

    8.6 Tokenisierung - diff --git a/docs/de/resource/api-key.png b/docs/de/resource/api-key.png deleted file mode 100644 index c74fe13..0000000 Binary files a/docs/de/resource/api-key.png and /dev/null differ diff --git a/docs/de/resource/application-users.png b/docs/de/resource/application-users.png deleted file mode 100644 index 51a97b9..0000000 Binary files a/docs/de/resource/application-users.png and /dev/null differ diff --git a/docs/de/resource/assign-role.png b/docs/de/resource/assign-role.png deleted file mode 100644 index 616a1dd..0000000 Binary files a/docs/de/resource/assign-role.png and /dev/null differ diff --git a/docs/de/resource/bogus-processor.png b/docs/de/resource/bogus-processor.png deleted file mode 100644 index db79bb1..0000000 Binary files a/docs/de/resource/bogus-processor.png and /dev/null differ diff --git a/docs/de/resource/capture-transaction.png b/docs/de/resource/capture-transaction.png deleted file mode 100644 index 5fb2044..0000000 Binary files a/docs/de/resource/capture-transaction.png and /dev/null differ diff --git a/docs/de/resource/cc-disable.png b/docs/de/resource/cc-disable.png deleted file mode 100644 index 88048c8..0000000 Binary files a/docs/de/resource/cc-disable.png and /dev/null differ diff --git a/docs/de/resource/cc-enable.png b/docs/de/resource/cc-enable.png deleted file mode 100644 index 9b7e655..0000000 Binary files a/docs/de/resource/cc-enable.png and /dev/null differ diff --git a/docs/de/resource/connectors.png b/docs/de/resource/connectors.png deleted file mode 100644 index 056a892..0000000 Binary files a/docs/de/resource/connectors.png and /dev/null differ diff --git a/docs/de/resource/loading-roles.png b/docs/de/resource/loading-roles.png deleted file mode 100644 index 5d0d501..0000000 Binary files a/docs/de/resource/loading-roles.png and /dev/null differ diff --git a/docs/de/resource/name-processor.png b/docs/de/resource/name-processor.png deleted file mode 100644 index d028107..0000000 Binary files a/docs/de/resource/name-processor.png and /dev/null differ diff --git a/docs/de/resource/order-confirmation-email.png b/docs/de/resource/order-confirmation-email.png deleted file mode 100644 index b7e8d57..0000000 Binary files a/docs/de/resource/order-confirmation-email.png and /dev/null differ diff --git a/docs/de/resource/payment-method-configuration.png b/docs/de/resource/payment-method-configuration.png deleted file mode 100644 index c84e6c0..0000000 Binary files a/docs/de/resource/payment-method-configuration.png and /dev/null differ diff --git a/docs/de/resource/payment-methods.png b/docs/de/resource/payment-methods.png deleted file mode 100644 index 4bbea90..0000000 Binary files a/docs/de/resource/payment-methods.png and /dev/null differ diff --git a/docs/de/resource/payment-settings.png b/docs/de/resource/payment-settings.png deleted file mode 100644 index bd758a5..0000000 Binary files a/docs/de/resource/payment-settings.png and /dev/null differ diff --git a/docs/de/resource/plugin-configuration.png b/docs/de/resource/plugin-configuration.png deleted file mode 100644 index 1fa6bd4..0000000 Binary files a/docs/de/resource/plugin-configuration.png and /dev/null differ diff --git a/docs/de/resource/plugin-installation.png b/docs/de/resource/plugin-installation.png deleted file mode 100644 index 5b32274..0000000 Binary files a/docs/de/resource/plugin-installation.png and /dev/null differ diff --git a/docs/de/resource/refund-transaction.png b/docs/de/resource/refund-transaction.png deleted file mode 100644 index a03d38c..0000000 Binary files a/docs/de/resource/refund-transaction.png and /dev/null differ diff --git a/docs/de/resource/roles.png b/docs/de/resource/roles.png deleted file mode 100644 index 6dd3548..0000000 Binary files a/docs/de/resource/roles.png and /dev/null differ diff --git a/docs/de/resource/save-role.png b/docs/de/resource/save-role.png deleted file mode 100644 index b5d30cb..0000000 Binary files a/docs/de/resource/save-role.png and /dev/null differ diff --git a/docs/de/resource/shopware_6_stage_graph_delivery.svg b/docs/de/resource/shopware_6_stage_graph_delivery.svg deleted file mode 100644 index 03e5a1d..0000000 --- a/docs/de/resource/shopware_6_stage_graph_delivery.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -
    Hold
    Hold
    Open
    Open
    Open
    Open
    Transaction fullfil 
    Transaction ful...
    Transaction confirm
    Transaction c...
    Canceled
    Canceled
    Transaction decline / fail / void
    Transaction de...
    1
    1
    2
    2
    3
    3
    Viewer does not support full SVG 1.1
    \ No newline at end of file diff --git a/docs/de/resource/shopware_6_stage_graph_order.svg b/docs/de/resource/shopware_6_stage_graph_order.svg deleted file mode 100644 index 89a9ea7..0000000 --- a/docs/de/resource/shopware_6_stage_graph_order.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -
    In Progress
    In Progress
    Paid
    Paid
    Open
    Open
    Transaction Invoice paid / not applicable
    Transaction Inv...
    Transaction authorized
    Transaction a...
    Transaction failed
    Transaction fai...
    Canceled
    Canceled
    Transaction decline / void
    Transaction de...
    Failed
    Failed
    1
    1
    4
    4
    2
    2
    3
    3
    Viewer does not support full SVG 1.1
    \ No newline at end of file diff --git a/docs/de/resource/state_graph_order.svg b/docs/de/resource/state_graph_order.svg deleted file mode 100644 index 46dbc35..0000000 --- a/docs/de/resource/state_graph_order.svg +++ /dev/null @@ -1,2 +0,0 @@ - -
    Clarification required
    [Not supported by viewer]
    Ready for delivery
    [Not supported by viewer]
    Open
    [Not supported by viewer]
    Transaction fulfill
    [Not supported by viewer]
    Transaction authorized
    [Not supported by viewer]
    Transaction failed
    [Not supported by viewer]
    Canceled / Rejected
    [Not supported by viewer]
    Depending on configuration
    [Not supported by viewer]
    Transaction decline / void
    [Not supported by viewer]
    Order is
    removed
    [Not supported by viewer]
    1
    [Not supported by viewer]
    4
    [Not supported by viewer]
    5
    [Not supported by viewer]
    2
    [Not supported by viewer]
    3
    [Not supported by viewer]
    \ No newline at end of file diff --git a/docs/de/resource/state_graph_payment_state.svg b/docs/de/resource/state_graph_payment_state.svg deleted file mode 100644 index d09a614..0000000 --- a/docs/de/resource/state_graph_payment_state.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -
    In Progress
    In Progress
    Paid
    Paid
    Open
    Open
    Transaction complete / fulfill
    Transaction com...
    Transaction authorized
    Transaction a...
    Transaction failed
    Transaction fai...
    Canceled
    Canceled
    Transaction decline / void
    Transaction de...
    Failed
    Failed
    1
    1
    4
    4
    2
    2
    3
    3
    Viewer does not support full SVG 1.1
    \ No newline at end of file diff --git a/docs/de/resource/token.png b/docs/de/resource/token.png deleted file mode 100644 index 15be72e..0000000 Binary files a/docs/de/resource/token.png and /dev/null differ diff --git a/docs/de/resource/user.png b/docs/de/resource/user.png deleted file mode 100644 index 5673a04..0000000 Binary files a/docs/de/resource/user.png and /dev/null differ diff --git a/docs/de/resource/void-transaction.png b/docs/de/resource/void-transaction.png deleted file mode 100644 index 8037d28..0000000 Binary files a/docs/de/resource/void-transaction.png and /dev/null differ diff --git a/docs/de/resource/webhook-listeners.png b/docs/de/resource/webhook-listeners.png deleted file mode 100644 index 7b7f2b4..0000000 Binary files a/docs/de/resource/webhook-listeners.png and /dev/null differ diff --git a/docs/de/resource/webhooks.png b/docs/de/resource/webhooks.png deleted file mode 100644 index 27a58e1..0000000 Binary files a/docs/de/resource/webhooks.png and /dev/null differ diff --git a/docs/en/documentation.html b/docs/en/documentation.html index 01a0e55..90a3080 100644 --- a/docs/en/documentation.html +++ b/docs/en/documentation.html @@ -23,7 +23,7 @@
  • - + Source
  • @@ -50,13 +50,11 @@
    -

    Shopware Version: 6.5.x, 6.6.x or 6.7.x (see compatibility table).

    +

    Shopware Version: 6.5.x or 6.6.x (see compatibility table).

    PHP: Minimum version as required by your Shopware installation (e.g., 7.4+).

    VR Payment Account: Obtain Space ID, User ID, and API Key from VR Payment Portal (see Portal Start-up Guide).

    -
    -

    For using recurring payments, you also need Showpare Commercial package, which is a paid product.

    @@ -79,16 +77,10 @@

    Support Until

    -

    6.7.x

    -

    7.x.x

    -

    PHP 8.2 and 8.3

    -

    Ongoing

    - -

    6.6.x

    6.x.x

    PHP 8.2 and 8.3

    -

    December 2025

    +

    Ongoing

    6.5.x - Deprecated

    @@ -735,20 +727,10 @@ Tokenization is not available for guest checkouts.
    -
    -
    -

    - 8.7Recurring payments

    -
    -
    -
    -

    Shopware provides the package "Shopware Commercial" with additional features, among others, subscriptions. This plugin supports making payments that are suitable for subscriptions. As long as the payment method’s conector supports -tokenization, it can be used for subscriptions. The recurring payment is fully managed by Shopware Commercial plugin. Please refer to their documentation for more information.

    -

    - 8.8Key Features

    + 8.7Key Features
    @@ -765,15 +747,12 @@ tokenization, it can be used for subscriptions. The recurring payment is fully m
  • Automatic Updates: Payment methods sync dynamically via the VR Payment API.

  • -
  • -

    Recurring payments: Make recurring payments with Subscriptions (Shopware Commercial) and VRPayment.

    -
  • - 8.9Troubleshooting

    + 8.8Troubleshooting
    @@ -804,7 +783,7 @@ tokenization, it can be used for subscriptions. The recurring payment is fully m

    - 8.10FAQs

    + 8.9FAQs
    @@ -1000,24 +979,19 @@ tokenization, it can be used for subscriptions. The recurring payment is fully m 8.6 Tokenization - diff --git a/docs/en/resource/api-key.png b/docs/en/resource/api-key.png deleted file mode 100644 index c74fe13..0000000 Binary files a/docs/en/resource/api-key.png and /dev/null differ diff --git a/docs/en/resource/application-users.png b/docs/en/resource/application-users.png deleted file mode 100644 index 51a97b9..0000000 Binary files a/docs/en/resource/application-users.png and /dev/null differ diff --git a/docs/en/resource/assign-role.png b/docs/en/resource/assign-role.png deleted file mode 100644 index 616a1dd..0000000 Binary files a/docs/en/resource/assign-role.png and /dev/null differ diff --git a/docs/en/resource/bogus-processor.png b/docs/en/resource/bogus-processor.png deleted file mode 100644 index db79bb1..0000000 Binary files a/docs/en/resource/bogus-processor.png and /dev/null differ diff --git a/docs/en/resource/capture-transaction.png b/docs/en/resource/capture-transaction.png deleted file mode 100644 index 5fb2044..0000000 Binary files a/docs/en/resource/capture-transaction.png and /dev/null differ diff --git a/docs/en/resource/cc-disable.png b/docs/en/resource/cc-disable.png deleted file mode 100644 index 88048c8..0000000 Binary files a/docs/en/resource/cc-disable.png and /dev/null differ diff --git a/docs/en/resource/cc-enable.png b/docs/en/resource/cc-enable.png deleted file mode 100644 index 9b7e655..0000000 Binary files a/docs/en/resource/cc-enable.png and /dev/null differ diff --git a/docs/en/resource/connectors.png b/docs/en/resource/connectors.png deleted file mode 100644 index 056a892..0000000 Binary files a/docs/en/resource/connectors.png and /dev/null differ diff --git a/docs/en/resource/loading-roles.png b/docs/en/resource/loading-roles.png deleted file mode 100644 index 5d0d501..0000000 Binary files a/docs/en/resource/loading-roles.png and /dev/null differ diff --git a/docs/en/resource/name-processor.png b/docs/en/resource/name-processor.png deleted file mode 100644 index d028107..0000000 Binary files a/docs/en/resource/name-processor.png and /dev/null differ diff --git a/docs/en/resource/order-confirmation-email.png b/docs/en/resource/order-confirmation-email.png deleted file mode 100644 index b7e8d57..0000000 Binary files a/docs/en/resource/order-confirmation-email.png and /dev/null differ diff --git a/docs/en/resource/payment-method-configuration.png b/docs/en/resource/payment-method-configuration.png deleted file mode 100644 index c84e6c0..0000000 Binary files a/docs/en/resource/payment-method-configuration.png and /dev/null differ diff --git a/docs/en/resource/payment-methods.png b/docs/en/resource/payment-methods.png deleted file mode 100644 index 4bbea90..0000000 Binary files a/docs/en/resource/payment-methods.png and /dev/null differ diff --git a/docs/en/resource/payment-settings.png b/docs/en/resource/payment-settings.png deleted file mode 100644 index bd758a5..0000000 Binary files a/docs/en/resource/payment-settings.png and /dev/null differ diff --git a/docs/en/resource/plugin-configuration.png b/docs/en/resource/plugin-configuration.png deleted file mode 100644 index 1fa6bd4..0000000 Binary files a/docs/en/resource/plugin-configuration.png and /dev/null differ diff --git a/docs/en/resource/plugin-installation.png b/docs/en/resource/plugin-installation.png deleted file mode 100644 index 5b32274..0000000 Binary files a/docs/en/resource/plugin-installation.png and /dev/null differ diff --git a/docs/en/resource/refund-transaction.png b/docs/en/resource/refund-transaction.png deleted file mode 100644 index a03d38c..0000000 Binary files a/docs/en/resource/refund-transaction.png and /dev/null differ diff --git a/docs/en/resource/roles.png b/docs/en/resource/roles.png deleted file mode 100644 index 6dd3548..0000000 Binary files a/docs/en/resource/roles.png and /dev/null differ diff --git a/docs/en/resource/save-role.png b/docs/en/resource/save-role.png deleted file mode 100644 index b5d30cb..0000000 Binary files a/docs/en/resource/save-role.png and /dev/null differ diff --git a/docs/en/resource/shopware_6_stage_graph_delivery.svg b/docs/en/resource/shopware_6_stage_graph_delivery.svg deleted file mode 100644 index 03e5a1d..0000000 --- a/docs/en/resource/shopware_6_stage_graph_delivery.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -
    Hold
    Hold
    Open
    Open
    Open
    Open
    Transaction fullfil 
    Transaction ful...
    Transaction confirm
    Transaction c...
    Canceled
    Canceled
    Transaction decline / fail / void
    Transaction de...
    1
    1
    2
    2
    3
    3
    Viewer does not support full SVG 1.1
    \ No newline at end of file diff --git a/docs/en/resource/shopware_6_stage_graph_order.svg b/docs/en/resource/shopware_6_stage_graph_order.svg deleted file mode 100644 index 89a9ea7..0000000 --- a/docs/en/resource/shopware_6_stage_graph_order.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -
    In Progress
    In Progress
    Paid
    Paid
    Open
    Open
    Transaction Invoice paid / not applicable
    Transaction Inv...
    Transaction authorized
    Transaction a...
    Transaction failed
    Transaction fai...
    Canceled
    Canceled
    Transaction decline / void
    Transaction de...
    Failed
    Failed
    1
    1
    4
    4
    2
    2
    3
    3
    Viewer does not support full SVG 1.1
    \ No newline at end of file diff --git a/docs/en/resource/state_graph_order.svg b/docs/en/resource/state_graph_order.svg deleted file mode 100644 index 46dbc35..0000000 --- a/docs/en/resource/state_graph_order.svg +++ /dev/null @@ -1,2 +0,0 @@ - -
    Clarification required
    [Not supported by viewer]
    Ready for delivery
    [Not supported by viewer]
    Open
    [Not supported by viewer]
    Transaction fulfill
    [Not supported by viewer]
    Transaction authorized
    [Not supported by viewer]
    Transaction failed
    [Not supported by viewer]
    Canceled / Rejected
    [Not supported by viewer]
    Depending on configuration
    [Not supported by viewer]
    Transaction decline / void
    [Not supported by viewer]
    Order is
    removed
    [Not supported by viewer]
    1
    [Not supported by viewer]
    4
    [Not supported by viewer]
    5
    [Not supported by viewer]
    2
    [Not supported by viewer]
    3
    [Not supported by viewer]
    \ No newline at end of file diff --git a/docs/en/resource/state_graph_payment_state.svg b/docs/en/resource/state_graph_payment_state.svg deleted file mode 100644 index d09a614..0000000 --- a/docs/en/resource/state_graph_payment_state.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -
    In Progress
    In Progress
    Paid
    Paid
    Open
    Open
    Transaction complete / fulfill
    Transaction com...
    Transaction authorized
    Transaction a...
    Transaction failed
    Transaction fai...
    Canceled
    Canceled
    Transaction decline / void
    Transaction de...
    Failed
    Failed
    1
    1
    4
    4
    2
    2
    3
    3
    Viewer does not support full SVG 1.1
    \ No newline at end of file diff --git a/docs/en/resource/token.png b/docs/en/resource/token.png deleted file mode 100644 index 15be72e..0000000 Binary files a/docs/en/resource/token.png and /dev/null differ diff --git a/docs/en/resource/user.png b/docs/en/resource/user.png deleted file mode 100644 index 5673a04..0000000 Binary files a/docs/en/resource/user.png and /dev/null differ diff --git a/docs/en/resource/void-transaction.png b/docs/en/resource/void-transaction.png deleted file mode 100644 index 8037d28..0000000 Binary files a/docs/en/resource/void-transaction.png and /dev/null differ diff --git a/docs/en/resource/webhook-listeners.png b/docs/en/resource/webhook-listeners.png deleted file mode 100644 index 7b7f2b4..0000000 Binary files a/docs/en/resource/webhook-listeners.png and /dev/null differ diff --git a/docs/en/resource/webhooks.png b/docs/en/resource/webhooks.png deleted file mode 100644 index 27a58e1..0000000 Binary files a/docs/en/resource/webhooks.png and /dev/null differ diff --git a/docs/fr/documentation.html b/docs/fr/documentation.html index ead0cae..1d72dcc 100644 --- a/docs/fr/documentation.html +++ b/docs/fr/documentation.html @@ -23,7 +23,7 @@
  • - + Source
  • @@ -50,7 +50,7 @@
    -

    Shopware Version: 6.5.x, 6.6.x or 6.7.x (voir tableau de compatibilité).

    +

    Shopware Version: 6.5.x or 6.6.x (voir tableau de compatibilité).

    PHP: Version minimale requise pour votre installation Shopware (e.g., 7.4+).

    @@ -71,28 +71,22 @@ -

    Version Shopware

    -

    Version du Plugin

    -

    Version PHP

    -

    Support jusqu’à

    - - -

    6.7.x

    -

    7.x.x

    -

    PHP 8.2 et 8.3

    -

    En cours

    +

    Shopware Version

    +

    Plugin Version

    +

    PHP Version

    +

    Support Until

    6.6.x

    6.x.x

    -

    PHP 8.2 et 8.3

    -

    Décembre 2025

    +

    PHP 8.2 and 8.3

    +

    En cours

    -

    6.5.x – Obsolète

    +

    6.5.x - Deprecated

    5.x.x

    -

    PHP 8.2 et 8.3

    -

    Octobre 2024

    +

    PHP 8.2 and 8.3

    +

    October 2024

    @@ -711,19 +705,10 @@ La tokenisation n’est pas disponible pour les paiements par les invités.
    -
    -
    -

    - 8.7Paiements récurrents

    -
    -
    -
    -

    Shopware fournit le package "Shopware Commercial" avec des fonctionnalités supplémentaires, entre autres, les abonnements. Ce plugin prend en charge les paiements adaptés aux abonnements. Tant que le connecteur de la méthode de paiement prend en charge la tokenisation, il peut être utilisé pour les abonnements. Le paiement récurrent est entièrement géré par le plugin Shopware Commercial. Veuillez vous référer à leur documentation pour plus d’informations.

    -

    - 8.8Caractéristiques Pricinpales

    + 8.7Caractéristiques Pricinpales
    @@ -740,15 +725,12 @@ La tokenisation n’est pas disponible pour les paiements par les invités.
  • Mises à jour automatiques: Les méthodes de paiement se synchronisent dynamiquement via l’API Wallee.

  • -
  • -

    Paiements récurrents: Effectuez des paiements récurrents avec les abonnements (Shopware Commercial) et VRPayment.

    -
  • - 8.9Troubleshooting

    + 8.8Troubleshooting
    @@ -779,7 +761,7 @@ La tokenisation n’est pas disponible pour les paiements par les invités.

    - 8.10FAQs

    + 8.9FAQs
    @@ -971,24 +953,19 @@ A: Oui, le plugin prend en charge les portefeuilles comme Apple Pay.

    8.6 Tokenisation - diff --git a/docs/fr/resource/api-key.png b/docs/fr/resource/api-key.png deleted file mode 100644 index c74fe13..0000000 Binary files a/docs/fr/resource/api-key.png and /dev/null differ diff --git a/docs/fr/resource/application-users.png b/docs/fr/resource/application-users.png deleted file mode 100644 index 51a97b9..0000000 Binary files a/docs/fr/resource/application-users.png and /dev/null differ diff --git a/docs/fr/resource/assign-role.png b/docs/fr/resource/assign-role.png deleted file mode 100644 index 616a1dd..0000000 Binary files a/docs/fr/resource/assign-role.png and /dev/null differ diff --git a/docs/fr/resource/bogus-processor.png b/docs/fr/resource/bogus-processor.png deleted file mode 100644 index db79bb1..0000000 Binary files a/docs/fr/resource/bogus-processor.png and /dev/null differ diff --git a/docs/fr/resource/capture-transaction.png b/docs/fr/resource/capture-transaction.png deleted file mode 100644 index 5fb2044..0000000 Binary files a/docs/fr/resource/capture-transaction.png and /dev/null differ diff --git a/docs/fr/resource/cc-disable.png b/docs/fr/resource/cc-disable.png deleted file mode 100644 index 88048c8..0000000 Binary files a/docs/fr/resource/cc-disable.png and /dev/null differ diff --git a/docs/fr/resource/cc-enable.png b/docs/fr/resource/cc-enable.png deleted file mode 100644 index 9b7e655..0000000 Binary files a/docs/fr/resource/cc-enable.png and /dev/null differ diff --git a/docs/fr/resource/connectors.png b/docs/fr/resource/connectors.png deleted file mode 100644 index 056a892..0000000 Binary files a/docs/fr/resource/connectors.png and /dev/null differ diff --git a/docs/fr/resource/loading-roles.png b/docs/fr/resource/loading-roles.png deleted file mode 100644 index 5d0d501..0000000 Binary files a/docs/fr/resource/loading-roles.png and /dev/null differ diff --git a/docs/fr/resource/name-processor.png b/docs/fr/resource/name-processor.png deleted file mode 100644 index d028107..0000000 Binary files a/docs/fr/resource/name-processor.png and /dev/null differ diff --git a/docs/fr/resource/order-confirmation-email.png b/docs/fr/resource/order-confirmation-email.png deleted file mode 100644 index b7e8d57..0000000 Binary files a/docs/fr/resource/order-confirmation-email.png and /dev/null differ diff --git a/docs/fr/resource/payment-method-configuration.png b/docs/fr/resource/payment-method-configuration.png deleted file mode 100644 index c84e6c0..0000000 Binary files a/docs/fr/resource/payment-method-configuration.png and /dev/null differ diff --git a/docs/fr/resource/payment-methods.png b/docs/fr/resource/payment-methods.png deleted file mode 100644 index 4bbea90..0000000 Binary files a/docs/fr/resource/payment-methods.png and /dev/null differ diff --git a/docs/fr/resource/payment-settings.png b/docs/fr/resource/payment-settings.png deleted file mode 100644 index bd758a5..0000000 Binary files a/docs/fr/resource/payment-settings.png and /dev/null differ diff --git a/docs/fr/resource/plugin-configuration.png b/docs/fr/resource/plugin-configuration.png deleted file mode 100644 index 1fa6bd4..0000000 Binary files a/docs/fr/resource/plugin-configuration.png and /dev/null differ diff --git a/docs/fr/resource/plugin-installation.png b/docs/fr/resource/plugin-installation.png deleted file mode 100644 index 5b32274..0000000 Binary files a/docs/fr/resource/plugin-installation.png and /dev/null differ diff --git a/docs/fr/resource/refund-transaction.png b/docs/fr/resource/refund-transaction.png deleted file mode 100644 index a03d38c..0000000 Binary files a/docs/fr/resource/refund-transaction.png and /dev/null differ diff --git a/docs/fr/resource/roles.png b/docs/fr/resource/roles.png deleted file mode 100644 index 6dd3548..0000000 Binary files a/docs/fr/resource/roles.png and /dev/null differ diff --git a/docs/fr/resource/save-role.png b/docs/fr/resource/save-role.png deleted file mode 100644 index b5d30cb..0000000 Binary files a/docs/fr/resource/save-role.png and /dev/null differ diff --git a/docs/fr/resource/shopware_6_stage_graph_delivery.svg b/docs/fr/resource/shopware_6_stage_graph_delivery.svg deleted file mode 100644 index 03e5a1d..0000000 --- a/docs/fr/resource/shopware_6_stage_graph_delivery.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -
    Hold
    Hold
    Open
    Open
    Open
    Open
    Transaction fullfil 
    Transaction ful...
    Transaction confirm
    Transaction c...
    Canceled
    Canceled
    Transaction decline / fail / void
    Transaction de...
    1
    1
    2
    2
    3
    3
    Viewer does not support full SVG 1.1
    \ No newline at end of file diff --git a/docs/fr/resource/shopware_6_stage_graph_order.svg b/docs/fr/resource/shopware_6_stage_graph_order.svg deleted file mode 100644 index 89a9ea7..0000000 --- a/docs/fr/resource/shopware_6_stage_graph_order.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -
    In Progress
    In Progress
    Paid
    Paid
    Open
    Open
    Transaction Invoice paid / not applicable
    Transaction Inv...
    Transaction authorized
    Transaction a...
    Transaction failed
    Transaction fai...
    Canceled
    Canceled
    Transaction decline / void
    Transaction de...
    Failed
    Failed
    1
    1
    4
    4
    2
    2
    3
    3
    Viewer does not support full SVG 1.1
    \ No newline at end of file diff --git a/docs/fr/resource/state_graph_order.svg b/docs/fr/resource/state_graph_order.svg deleted file mode 100644 index 46dbc35..0000000 --- a/docs/fr/resource/state_graph_order.svg +++ /dev/null @@ -1,2 +0,0 @@ - -
    Clarification required
    [Not supported by viewer]
    Ready for delivery
    [Not supported by viewer]
    Open
    [Not supported by viewer]
    Transaction fulfill
    [Not supported by viewer]
    Transaction authorized
    [Not supported by viewer]
    Transaction failed
    [Not supported by viewer]
    Canceled / Rejected
    [Not supported by viewer]
    Depending on configuration
    [Not supported by viewer]
    Transaction decline / void
    [Not supported by viewer]
    Order is
    removed
    [Not supported by viewer]
    1
    [Not supported by viewer]
    4
    [Not supported by viewer]
    5
    [Not supported by viewer]
    2
    [Not supported by viewer]
    3
    [Not supported by viewer]
    \ No newline at end of file diff --git a/docs/fr/resource/state_graph_payment_state.svg b/docs/fr/resource/state_graph_payment_state.svg deleted file mode 100644 index d09a614..0000000 --- a/docs/fr/resource/state_graph_payment_state.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -
    In Progress
    In Progress
    Paid
    Paid
    Open
    Open
    Transaction complete / fulfill
    Transaction com...
    Transaction authorized
    Transaction a...
    Transaction failed
    Transaction fai...
    Canceled
    Canceled
    Transaction decline / void
    Transaction de...
    Failed
    Failed
    1
    1
    4
    4
    2
    2
    3
    3
    Viewer does not support full SVG 1.1
    \ No newline at end of file diff --git a/docs/fr/resource/token.png b/docs/fr/resource/token.png deleted file mode 100644 index 15be72e..0000000 Binary files a/docs/fr/resource/token.png and /dev/null differ diff --git a/docs/fr/resource/user.png b/docs/fr/resource/user.png deleted file mode 100644 index 5673a04..0000000 Binary files a/docs/fr/resource/user.png and /dev/null differ diff --git a/docs/fr/resource/void-transaction.png b/docs/fr/resource/void-transaction.png deleted file mode 100644 index 8037d28..0000000 Binary files a/docs/fr/resource/void-transaction.png and /dev/null differ diff --git a/docs/fr/resource/webhook-listeners.png b/docs/fr/resource/webhook-listeners.png deleted file mode 100644 index 7b7f2b4..0000000 Binary files a/docs/fr/resource/webhook-listeners.png and /dev/null differ diff --git a/docs/fr/resource/webhooks.png b/docs/fr/resource/webhooks.png deleted file mode 100644 index 27a58e1..0000000 Binary files a/docs/fr/resource/webhooks.png and /dev/null differ diff --git a/docs/it/documentation.html b/docs/it/documentation.html index 59bb277..e9d8543 100644 --- a/docs/it/documentation.html +++ b/docs/it/documentation.html @@ -23,7 +23,7 @@
  • - + Source
  • @@ -50,7 +50,7 @@
    -

    Versione di Shopware: 6.5.x, 6.6.x o 6.7.x (vedere la tabella di compatibilità).

    +

    Versione di Shopware: 6.5.x o 6.6.x (vedere la tabella di compatibilità).

    PHP: Versione minima richiesta dalla vostra installazione di Shopware (ad es. 7.4+).

    @@ -71,28 +71,22 @@ -

    Versione Shopware

    -

    Versione Plugin

    -

    Versione PHP

    -

    Supporto fino a

    - - -

    6.7.x

    -

    7.x.x

    -

    PHP 8.2 e 8.3

    -

    In corso

    +

    Shopware Version

    +

    Plugin Version

    +

    PHP Version

    +

    Support Until

    6.6.x

    6.x.x

    -

    PHP 8.2 e 8.3

    -

    Dicembre 2025

    +

    PHP 8.2 and 8.3

    +

    Ongoing

    -

    6.5.x – Deprecato

    +

    6.5.x - Deprecated

    5.x.x

    -

    PHP 8.2 e 8.3

    -

    Ottobre 2024

    +

    PHP 8.2 and 8.3

    +

    October 2024

    @@ -718,19 +712,10 @@ La tokenizzazione non è disponibile per i checkout degli ospiti.
    -
    -
    -

    - 8.7Pagamenti ricorrenti

    -
    -
    -
    -

    Shopware fornisce il pacchetto "Shopware Commercial" con funzionalità aggiuntive, tra cui gli abbonamenti. Questo plugin supporta l’esecuzione di pagamenti adatti per gli abbonamenti. Finché il connettore del metodo di pagamento supporta la tokenizzazione, può essere utilizzato per gli abbonamenti. Il pagamento ricorrente è completamente gestito dal plugin Shopware Commercial. Si prega di fare riferimento alla loro documentazione per maggiori informazioni.

    -

    - 8.8Key Features

    + 8.7Key Features
    @@ -747,15 +732,12 @@ La tokenizzazione non è disponibile per i checkout degli ospiti.
  • Automatic Updates: I metodi di pagamento si sincronizzano dinamicamente tramite l’API VR Payment.

  • -
  • -

    Pagamenti ricorrenti: Effettua pagamenti ricorrenti con Abbonamenti (Shopware Commercial) e VRPayment.

    -
  • - 8.9Risoluzione dei Problemi

    + 8.8Risoluzione dei Problemi
    @@ -786,7 +768,7 @@ La tokenizzazione non è disponibile per i checkout degli ospiti.

    - 8.10FAQs

    + 8.9FAQs
    @@ -982,24 +964,19 @@ La tokenizzazione non è disponibile per i checkout degli ospiti. 8.6 Tokenization - diff --git a/docs/it/resource/api-key.png b/docs/it/resource/api-key.png deleted file mode 100644 index c74fe13..0000000 Binary files a/docs/it/resource/api-key.png and /dev/null differ diff --git a/docs/it/resource/application-users.png b/docs/it/resource/application-users.png deleted file mode 100644 index 51a97b9..0000000 Binary files a/docs/it/resource/application-users.png and /dev/null differ diff --git a/docs/it/resource/assign-role.png b/docs/it/resource/assign-role.png deleted file mode 100644 index 616a1dd..0000000 Binary files a/docs/it/resource/assign-role.png and /dev/null differ diff --git a/docs/it/resource/bogus-processor.png b/docs/it/resource/bogus-processor.png deleted file mode 100644 index db79bb1..0000000 Binary files a/docs/it/resource/bogus-processor.png and /dev/null differ diff --git a/docs/it/resource/capture-transaction.png b/docs/it/resource/capture-transaction.png deleted file mode 100644 index 5fb2044..0000000 Binary files a/docs/it/resource/capture-transaction.png and /dev/null differ diff --git a/docs/it/resource/cc-disable.png b/docs/it/resource/cc-disable.png deleted file mode 100644 index 88048c8..0000000 Binary files a/docs/it/resource/cc-disable.png and /dev/null differ diff --git a/docs/it/resource/cc-enable.png b/docs/it/resource/cc-enable.png deleted file mode 100644 index 9b7e655..0000000 Binary files a/docs/it/resource/cc-enable.png and /dev/null differ diff --git a/docs/it/resource/connectors.png b/docs/it/resource/connectors.png deleted file mode 100644 index 056a892..0000000 Binary files a/docs/it/resource/connectors.png and /dev/null differ diff --git a/docs/it/resource/loading-roles.png b/docs/it/resource/loading-roles.png deleted file mode 100644 index 5d0d501..0000000 Binary files a/docs/it/resource/loading-roles.png and /dev/null differ diff --git a/docs/it/resource/name-processor.png b/docs/it/resource/name-processor.png deleted file mode 100644 index d028107..0000000 Binary files a/docs/it/resource/name-processor.png and /dev/null differ diff --git a/docs/it/resource/order-confirmation-email.png b/docs/it/resource/order-confirmation-email.png deleted file mode 100644 index b7e8d57..0000000 Binary files a/docs/it/resource/order-confirmation-email.png and /dev/null differ diff --git a/docs/it/resource/payment-method-configuration.png b/docs/it/resource/payment-method-configuration.png deleted file mode 100644 index c84e6c0..0000000 Binary files a/docs/it/resource/payment-method-configuration.png and /dev/null differ diff --git a/docs/it/resource/payment-methods.png b/docs/it/resource/payment-methods.png deleted file mode 100644 index 4bbea90..0000000 Binary files a/docs/it/resource/payment-methods.png and /dev/null differ diff --git a/docs/it/resource/payment-settings.png b/docs/it/resource/payment-settings.png deleted file mode 100644 index bd758a5..0000000 Binary files a/docs/it/resource/payment-settings.png and /dev/null differ diff --git a/docs/it/resource/plugin-configuration.png b/docs/it/resource/plugin-configuration.png deleted file mode 100644 index 1fa6bd4..0000000 Binary files a/docs/it/resource/plugin-configuration.png and /dev/null differ diff --git a/docs/it/resource/plugin-installation.png b/docs/it/resource/plugin-installation.png deleted file mode 100644 index 5b32274..0000000 Binary files a/docs/it/resource/plugin-installation.png and /dev/null differ diff --git a/docs/it/resource/refund-transaction.png b/docs/it/resource/refund-transaction.png deleted file mode 100644 index a03d38c..0000000 Binary files a/docs/it/resource/refund-transaction.png and /dev/null differ diff --git a/docs/it/resource/roles.png b/docs/it/resource/roles.png deleted file mode 100644 index 6dd3548..0000000 Binary files a/docs/it/resource/roles.png and /dev/null differ diff --git a/docs/it/resource/save-role.png b/docs/it/resource/save-role.png deleted file mode 100644 index b5d30cb..0000000 Binary files a/docs/it/resource/save-role.png and /dev/null differ diff --git a/docs/it/resource/shopware_6_stage_graph_delivery.svg b/docs/it/resource/shopware_6_stage_graph_delivery.svg deleted file mode 100644 index 03e5a1d..0000000 --- a/docs/it/resource/shopware_6_stage_graph_delivery.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -
    Hold
    Hold
    Open
    Open
    Open
    Open
    Transaction fullfil 
    Transaction ful...
    Transaction confirm
    Transaction c...
    Canceled
    Canceled
    Transaction decline / fail / void
    Transaction de...
    1
    1
    2
    2
    3
    3
    Viewer does not support full SVG 1.1
    \ No newline at end of file diff --git a/docs/it/resource/shopware_6_stage_graph_order.svg b/docs/it/resource/shopware_6_stage_graph_order.svg deleted file mode 100644 index 89a9ea7..0000000 --- a/docs/it/resource/shopware_6_stage_graph_order.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -
    In Progress
    In Progress
    Paid
    Paid
    Open
    Open
    Transaction Invoice paid / not applicable
    Transaction Inv...
    Transaction authorized
    Transaction a...
    Transaction failed
    Transaction fai...
    Canceled
    Canceled
    Transaction decline / void
    Transaction de...
    Failed
    Failed
    1
    1
    4
    4
    2
    2
    3
    3
    Viewer does not support full SVG 1.1
    \ No newline at end of file diff --git a/docs/it/resource/state_graph_order.svg b/docs/it/resource/state_graph_order.svg deleted file mode 100644 index 46dbc35..0000000 --- a/docs/it/resource/state_graph_order.svg +++ /dev/null @@ -1,2 +0,0 @@ - -
    Clarification required
    [Not supported by viewer]
    Ready for delivery
    [Not supported by viewer]
    Open
    [Not supported by viewer]
    Transaction fulfill
    [Not supported by viewer]
    Transaction authorized
    [Not supported by viewer]
    Transaction failed
    [Not supported by viewer]
    Canceled / Rejected
    [Not supported by viewer]
    Depending on configuration
    [Not supported by viewer]
    Transaction decline / void
    [Not supported by viewer]
    Order is
    removed
    [Not supported by viewer]
    1
    [Not supported by viewer]
    4
    [Not supported by viewer]
    5
    [Not supported by viewer]
    2
    [Not supported by viewer]
    3
    [Not supported by viewer]
    \ No newline at end of file diff --git a/docs/it/resource/state_graph_payment_state.svg b/docs/it/resource/state_graph_payment_state.svg deleted file mode 100644 index d09a614..0000000 --- a/docs/it/resource/state_graph_payment_state.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -
    In Progress
    In Progress
    Paid
    Paid
    Open
    Open
    Transaction complete / fulfill
    Transaction com...
    Transaction authorized
    Transaction a...
    Transaction failed
    Transaction fai...
    Canceled
    Canceled
    Transaction decline / void
    Transaction de...
    Failed
    Failed
    1
    1
    4
    4
    2
    2
    3
    3
    Viewer does not support full SVG 1.1
    \ No newline at end of file diff --git a/docs/it/resource/token.png b/docs/it/resource/token.png deleted file mode 100644 index 15be72e..0000000 Binary files a/docs/it/resource/token.png and /dev/null differ diff --git a/docs/it/resource/user.png b/docs/it/resource/user.png deleted file mode 100644 index 5673a04..0000000 Binary files a/docs/it/resource/user.png and /dev/null differ diff --git a/docs/it/resource/void-transaction.png b/docs/it/resource/void-transaction.png deleted file mode 100644 index 8037d28..0000000 Binary files a/docs/it/resource/void-transaction.png and /dev/null differ diff --git a/docs/it/resource/webhook-listeners.png b/docs/it/resource/webhook-listeners.png deleted file mode 100644 index 7b7f2b4..0000000 Binary files a/docs/it/resource/webhook-listeners.png and /dev/null differ diff --git a/docs/it/resource/webhooks.png b/docs/it/resource/webhooks.png deleted file mode 100644 index 27a58e1..0000000 Binary files a/docs/it/resource/webhooks.png and /dev/null differ diff --git a/src/Core/Api/PaymentMethodConfiguration/Service/PaymentMethodConfigurationService.php b/src/Core/Api/PaymentMethodConfiguration/Service/PaymentMethodConfigurationService.php index 60ec19b..508f807 100644 --- a/src/Core/Api/PaymentMethodConfiguration/Service/PaymentMethodConfigurationService.php +++ b/src/Core/Api/PaymentMethodConfiguration/Service/PaymentMethodConfigurationService.php @@ -499,7 +499,6 @@ class PaymentMethodConfigurationService { 'afterOrderEnabled' => true, 'active' => true, 'translations' => $this->getPaymentMethodConfigurationTranslation($paymentMethodConfiguration, $context), - 'technicalName' => $paymentMethodConfiguration->getName(), ]; $data['mediaId'] = $this->upsertMedia($id, $paymentMethodConfiguration, $context); diff --git a/src/Core/Api/Refund/Controller/RefundController.php b/src/Core/Api/Refund/Controller/RefundController.php index b6b8661..0133c85 100644 --- a/src/Core/Api/Refund/Controller/RefundController.php +++ b/src/Core/Api/Refund/Controller/RefundController.php @@ -115,11 +115,7 @@ class RefundController extends AbstractController $apiClient = $settings->getApiClient(); $transaction = $apiClient->getTransactionService()->read($settings->getSpaceId(), $transactionId); - $refund = $this->refundService->createRefundByAmount($transaction, $refundableAmount, $context); - - if ($refund === null) { - return new Response('refundExceedsAmount', Response::HTTP_BAD_REQUEST); - } + $this->refundService->createRefundByAmount($transaction, $refundableAmount, $context); return new Response(null, Response::HTTP_NO_CONTENT); } diff --git a/src/Core/Api/Transaction/Service/TransactionService.php b/src/Core/Api/Transaction/Service/TransactionService.php index f8ea0dd..64f4754 100644 --- a/src/Core/Api/Transaction/Service/TransactionService.php +++ b/src/Core/Api/Transaction/Service/TransactionService.php @@ -8,7 +8,7 @@ use Shopware\Core\{ Checkout\Cart\CartException, Checkout\Cart\LineItem\LineItem, Checkout\Order\OrderEntity, - Checkout\Payment\Cart\PaymentTransactionStruct, + Checkout\Payment\Cart\AsyncPaymentTransactionStruct, Framework\Context, Framework\DataAbstractionLayer\Search\Criteria, Framework\DataAbstractionLayer\Search\Filter\EqualsFilter, @@ -16,23 +16,22 @@ use Shopware\Core\{ }; use Shopware\Storefront\Page\Checkout\Confirm\CheckoutConfirmPageLoadedEvent; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use VRPayment\Sdk\Model\{ - AddressCreate, - ChargeAttempt, - CreationEntityState, - CriteriaOperator, - EntityQuery, - EntityQueryFilter, - EntityQueryFilterType, - Gender, - LineItemAttributeCreate, - LineItemCreate, - LineItemType, - TokenizationMode, - Transaction, - TransactionCreate, - TransactionPending, - TransactionState, +use VRPayment\Sdk\{ + Model\AddressCreate, + Model\ChargeAttempt, + Model\CreationEntityState, + Model\CriteriaOperator, + Model\EntityQuery, + Model\EntityQueryFilter, + Model\EntityQueryFilterType, + Model\Gender, + Model\LineItemAttributeCreate, + Model\LineItemCreate, + Model\LineItemType, + Model\Transaction, + Model\TransactionCreate, + Model\TransactionPending, + Model\TransactionState, }; use VRPaymentPayment\Core\{ Api\OrderDeliveryState\Handler\OrderDeliveryStateHandler, @@ -116,7 +115,7 @@ class TransactionService * * A redirect to the url will be performed * - * @param \Shopware\Core\Checkout\Payment\Cart\PaymentTransactionStruct $transaction + * @param \Shopware\Core\Checkout\Payment\Cart\AsyncPaymentTransactionStruct $transaction * @param \Shopware\Core\System\SalesChannel\SalesChannelContext $salesChannelContext * * @return string @@ -125,14 +124,10 @@ class TransactionService * @throws \VRPayment\Sdk\VersioningException */ public function create( - PaymentTransactionStruct $transaction, - SalesChannelContext $salesChannelContext + AsyncPaymentTransactionStruct $transaction, + SalesChannelContext $salesChannelContext ): string { - $criteria = new Criteria([$transaction->getOrderTransactionId()]); - $criteria->addAssociation('order'); - $orderTransaction = $this->container->get('order_transaction.repository')->search($criteria, $salesChannelContext->getContext())->first(); - $salesChannelId = $salesChannelContext->getSalesChannel()->getId(); $settings = $this->settingsService->getSettings($salesChannelId); $apiClient = $settings->getApiClient(); @@ -170,7 +165,7 @@ class TransactionService $redirectUrl = $this->container->get('router')->generate( 'frontend.vrpayment.checkout.pay', - ['orderId' => $orderTransaction->getOrder()->getId(),], + ['orderId' => $transaction->getOrder()->getId(),], UrlGeneratorInterface::ABSOLUTE_URL ); @@ -182,8 +177,8 @@ class TransactionService $this->upsert( $createdTransaction, $salesChannelContext->getContext(), - $orderTransaction->getPaymentMethodId(), - $orderTransaction->getOrder()->getSalesChannelId() + $transaction->getOrderTransaction()->getPaymentMethodId(), + $transaction->getOrder()->getSalesChannelId() ); $_SESSION['transactionId'] = null; $_SESSION['arrayOfPossibleMethods'] = null; @@ -191,45 +186,26 @@ class TransactionService $_SESSION['currencyCheck'] = null; - $this->holdDelivery($orderTransaction->getOrder()->getId(), $salesChannelContext->getContext()); + $this->holdDelivery($transaction->getOrder()->getId(), $salesChannelContext->getContext()); return $redirectUrl; } /** - * Creates the transaction in the portal using the SDK. - * - * @return void - */ - public function createRecurringTransaction(TransactionCreate $sdkTransactionCreate, string $spaceId = ""): Transaction { - $settings = $this->settingsService->getSettings(); - if (empty($spaceId)) { - $spaceId = $settings->getSpaceId(); - } - - $sdkTransaction = $settings->getApiClient()->getTransactionService()->create($spaceId, $sdkTransactionCreate); - if ($sdkTransaction->valid()) { - return $settings->getApiClient()->getTransactionService()->processWithoutUserInteraction($spaceId, $sdkTransaction->getId()); - } - - throw new \Exception("The transacion is not valid and could not be created."); - } - - /** - * @param \Shopware\Core\Checkout\Payment\Cart\PaymentTransactionStruct $transaction + * @param \Shopware\Core\Checkout\Payment\Cart\AsyncPaymentTransactionStruct $transaction * @param \Shopware\Core\Framework\Context $context * @param int $vrpaymentTransactionId * @param int $spaceId */ protected function addVRPaymentTransactionId( - PaymentTransactionStruct $transaction, + AsyncPaymentTransactionStruct $transaction, Context $context, int $vrpaymentTransactionId, int $spaceId ): void { $data = [ - 'id' => $transaction->getOrderTransactionId(), + 'id' => $transaction->getOrderTransaction()->getId(), 'customFields' => [ TransactionPayload::ORDER_TRANSACTION_CUSTOM_FIELDS_VRPAYMENT_TRANSACTION_ID => $vrpaymentTransactionId, TransactionPayload::ORDER_TRANSACTION_CUSTOM_FIELDS_VRPAYMENT_SPACE_ID => $spaceId, @@ -367,7 +343,7 @@ class TransactionService * * @return \Shopware\Core\Checkout\Order\OrderEntity */ - protected function getOrderEntity(string $orderId, Context $context): OrderEntity + private function getOrderEntity(string $orderId, Context $context): OrderEntity { try { $criteria = (new Criteria([$orderId]))->addAssociations(['deliveries']); @@ -411,7 +387,7 @@ class TransactionService * @throws \VRPayment\Sdk\Http\ConnectionException * @throws \VRPayment\Sdk\VersioningException */ - public function read(int $transactionId, string $salesChannelId = ""): Transaction + public function read(int $transactionId, string $salesChannelId): Transaction { $settings = $this->settingsService->getSettings($salesChannelId); return $settings->getApiClient()->getTransactionService()->read($settings->getSpaceId(), $transactionId); @@ -618,8 +594,7 @@ class TransactionService ->setCustomerEmailAddress($customer->getEmail()) ->setCustomerId($customerId) ->setSuccessUrl($homeUrl . '?success') - ->setFailedUrl($homeUrl . '?fail') - ->setTokenizationMode(TokenizationMode::FORCE_CREATION); + ->setFailedUrl($homeUrl . '?fail'); $transactionService = $settings->getApiClient()->getTransactionService(); $transaction = $transactionService->create($settings->getSpaceId(), $transactionPayload); diff --git a/src/Core/Api/WebHooks/Strategy/WebHookTransactionStrategy.php b/src/Core/Api/WebHooks/Strategy/WebHookTransactionStrategy.php index f0b75f7..a100f45 100644 --- a/src/Core/Api/WebHooks/Strategy/WebHookTransactionStrategy.php +++ b/src/Core/Api/WebHooks/Strategy/WebHookTransactionStrategy.php @@ -9,13 +9,12 @@ use Shopware\Core\{ Checkout\Cart\CartException, Framework\Context, System\StateMachine\Exception\IllegalTransitionException}; -use VRPayment\Sdk\Model\{ - RefundState, - Transaction, - TransactionInvoiceState, - TransactionState, - TransactionInvoice, - Token}; +use VRPayment\Sdk\{ + Model\RefundState, + Model\Transaction, + Model\TransactionInvoiceState, + Model\TransactionState, + Model\TransactionInvoice,}; use VRPaymentPayment\Core\{ Api\WebHooks\Service\WebHooksService, Api\WebHooks\Struct\WebHookRequest, @@ -52,7 +51,7 @@ class WebHookTransactionStrategy extends WebHookStrategyBase implements WebhookS * @throws \VRPayment\Sdk\Http\ConnectionException ConnectionException. * @throws \VRPayment\Sdk\VersioningException VersioningException. */ - public function getTransaction(WebHookRequest $request): Transaction { + public function getTransaction(WebHookRequest $request) { return $this->settings->getApiClient() ->getTransactionService() ->read($request->getSpaceId(), $request->getEntityId()); @@ -61,7 +60,7 @@ class WebHookTransactionStrategy extends WebHookStrategyBase implements WebhookS /** * @inheritDoc */ - public function getOrderIdByTransaction(Transaction $transaction): string + public function getOrderIdByTransaction($transaction): string { /** @var \VRPayment\Sdk\Model\Transaction $transaction */ return $transaction->getMetaData()[TransactionPayload::VRPAYMENT_METADATA_ORDER_ID]; @@ -97,7 +96,7 @@ class WebHookTransactionStrategy extends WebHookStrategyBase implements WebhookS */ public function process(WebHookRequest $request): Response { - return $this->processTransaction($request, $this->getContext()); + return $this->updateTransaction($request, $this->getContext()); } /** @@ -108,17 +107,16 @@ class WebHookTransactionStrategy extends WebHookStrategyBase implements WebhookS * @param Context $context The operational context providing settings and environment for transaction processing. * @return Response Returns a JSON response indicating the result of the transaction update operation. */ - private function processTransaction(WebHookRequest $request, Context $context): Response + private function updateTransaction(WebHookRequest $request, Context $context): Response { $status = Response::HTTP_UNPROCESSABLE_ENTITY; try { /** @var \Shopware\Core\Checkout\Order\OrderEntity $order */ $transaction = $this->getTransaction($request); - $token = $transaction->getToken(); - $orderId = $transaction->getMetaData()[TransactionPayload::VRPAYMENT_METADATA_ORDER_ID]; - if (!empty($orderId) && !$transaction->getParent()) { - $this->executeLocked($orderId, $context, function () use ($orderId, $transaction, $context, $request, $token) { + $orderId = $transaction->getMetaData()[TransactionPayload::VRPAYMENT_METADATA_ORDER_ID]; + if(!empty($orderId) && !$transaction->getParent()) { + $this->executeLocked($orderId, $context, function () use ($orderId, $transaction, $context, $request) { $this->transactionService->upsert($transaction, $context); $orderTransactionId = $transaction->getMetaData()[TransactionPayload::VRPAYMENT_METADATA_ORDER_TRANSACTION_ID]; $orderTransaction = $this->getOrderTransaction($orderId, $context); @@ -145,16 +143,6 @@ class WebHookTransactionStrategy extends WebHookStrategyBase implements WebhookS $this->unholdDelivery($orderId, $context); break; case TransactionState::AUTHORIZED: - if ($token instanceof Token) { - // Update orderTransaction with the authorized token: - $data = [ - 'id' => $orderTransactionId, - 'customFields' => [ - TransactionPayload::ORDER_TRANSACTION_CUSTOM_FIELDS_VRPAYMENT_TOKEN => $token->getId(), - ], - ]; - $this->container->get('order_transaction.repository')->update([$data], $context); - } $this->orderTransactionStateHandler->process($orderTransactionId, $context); $this->sendEmail($transaction, $context, $orderId); break; diff --git a/src/Core/Api/WebHooks/Strategy/WebhookStrategyActionsInterface.php b/src/Core/Api/WebHooks/Strategy/WebhookStrategyActionsInterface.php index 250db67..a2e25de 100644 --- a/src/Core/Api/WebHooks/Strategy/WebhookStrategyActionsInterface.php +++ b/src/Core/Api/WebHooks/Strategy/WebhookStrategyActionsInterface.php @@ -57,5 +57,5 @@ interface WebhookStrategyActionsInterface { * @param Transaction|TransactionInvoiceState|Refund|mixed $transaction The transaction object from which the order ID should be extracted. * @return string The order ID as a string. */ - public function getOrderIdByTransaction(Transaction $transaction): string; + public function getOrderIdByTransaction($transaction): string; } diff --git a/src/Core/Checkout/Cart/CustomCartPersister.php b/src/Core/Checkout/Cart/CustomCartPersister.php deleted file mode 100644 index 584dd1e..0000000 --- a/src/Core/Checkout/Cart/CustomCartPersister.php +++ /dev/null @@ -1,59 +0,0 @@ -inner = $inner; - } - - public function delete(string $token, SalesChannelContext $context): void - { - if (!$context->getContext()->hasState('do-cart-delete') && $this->isWhiteLabelPayment($context)) { - return; - } - - $this->inner->delete($token, $context); - } - - public function load(string $token, SalesChannelContext $context): Cart - { - return $this->inner->load($token, $context); - } - - public function save(Cart $cart, SalesChannelContext $context): void - { - $this->inner->save($cart, $context); - } - - public function replace(string $oldToken, string $newToken, SalesChannelContext $context): void - { - $this->inner->replace($oldToken, $newToken, $context); - } - - public function getDecorated(): AbstractCartPersister - { - return $this->inner; - } - - private function isWhiteLabelPayment(SalesChannelContext $context): bool - { - $paymentMethod = $context->getPaymentMethod(); - - if (!$paymentMethod instanceof PaymentMethodEntity) { - return false; - } - - return $paymentMethod->getHandlerIdentifier() === VRPaymentPaymentHandler::class; - } -} diff --git a/src/Core/Checkout/PaymentHandler/VRPaymentPaymentHandler.php b/src/Core/Checkout/PaymentHandler/VRPaymentPaymentHandler.php index fd8c9bb..669ad23 100644 --- a/src/Core/Checkout/PaymentHandler/VRPaymentPaymentHandler.php +++ b/src/Core/Checkout/PaymentHandler/VRPaymentPaymentHandler.php @@ -4,42 +4,22 @@ namespace VRPaymentPayment\Core\Checkout\PaymentHandler; use Psr\Log\LoggerInterface; use Shopware\Core\{ - Checkout\Order\OrderEntity, - Checkout\Order\Aggregate\OrderTransaction\OrderTransactionEntity, Checkout\Order\Aggregate\OrderTransaction\OrderTransactionStateHandler, - Checkout\Order\Aggregate\OrderTransaction\OrderTransactionStates, - Checkout\Payment\Cart\PaymentTransactionStruct, - Checkout\Payment\Cart\PaymentHandler\AbstractPaymentHandler, - Checkout\Payment\Cart\PaymentHandler\PaymentHandlerType, + Checkout\Payment\Cart\AsyncPaymentTransactionStruct, + Checkout\Payment\Cart\PaymentHandler\AsynchronousPaymentHandlerInterface, + Checkout\Payment\Exception\AsyncPaymentFinalizeException, + Checkout\Payment\Exception\AsyncPaymentProcessException, Checkout\Payment\PaymentException, Checkout\Payment\Exception\CustomerCanceledAsyncPaymentException, - Framework\App\AppException, - Framework\Api\Context\SalesChannelApiSource, - Framework\Context, - Framework\DataAbstractionLayer\EntityRepository, - Framework\DataAbstractionLayer\Search\Criteria, - Framework\DataAbstractionLayer\Search\Filter\EqualsFilter, - Framework\DataAbstractionLayer\Search\Sorting\FieldSorting, - Framework\Struct\Struct, Framework\Validation\DataBag\RequestDataBag, - System\StateMachine\Aggregation\StateMachineState\StateMachineStateEntity, - System\SalesChannel\Context\SalesChannelContextService, - System\SalesChannel\Context\SalesChannelContextServiceParameters + System\SalesChannel\SalesChannelContext }; -use Shopware\Core\Framework\Util\Random; -use VRPaymentPayment\Core\Checkout\Cart\CustomCartPersister; -use Shopware\Core\Checkout\Cart\Cart; -use Shopware\Core\Checkout\Cart\CartPersister; -use Shopware\Core\System\SalesChannel\SalesChannelContext; - use Symfony\Component\{ HttpFoundation\RedirectResponse, HttpFoundation\Request }; use VRPayment\Sdk\Model\TransactionState; -use VRPaymentPayment\Core\Api\Transaction\Service\TransactionService as PluginTransactionService; -use VRPaymentPayment\Core\Util\Payload\TransactionPayload; - +use VRPaymentPayment\Core\Api\Transaction\Service\TransactionService; /** @@ -47,18 +27,13 @@ use VRPaymentPayment\Core\Util\Payload\TransactionPayload; * * @package VRPaymentPayment\Core\Checkout\PaymentHandler */ -class VRPaymentPaymentHandler extends AbstractPaymentHandler +class VRPaymentPaymentHandler implements AsynchronousPaymentHandlerInterface { /** - * @var CustomCartPersister + * @var \VRPaymentPayment\Core\Api\Transaction\Service\TransactionService */ - private CustomCartPersister $cartPersister; - - /** - * @var \VRPaymentPayment\Core\Api\Transaction\Service\PluginTransactionService - */ - protected $pluginTransactionService; + protected $transactionService; /** * @var \Psr\Log\LoggerInterface @@ -69,32 +44,22 @@ class VRPaymentPaymentHandler extends AbstractPaymentHandler */ private $orderTransactionStateHandler; - protected SalesChannelContextService $salesChannelContextService; - - protected EntityRepository $orderTransactionRepository; - - protected ?EntityRepository $subscriptionRepository; - /** * VRPaymentPaymentHandler constructor. + * + * @param \VRPaymentPayment\Core\Api\Transaction\Service\TransactionService $transactionService + * @param \Shopware\Core\Checkout\Order\Aggregate\OrderTransaction\OrderTransactionStateHandler $orderTransactionStateHandler */ - public function __construct( - CustomCartPersister $cartPersister, - PluginTransactionService $pluginTransactionService, - OrderTransactionStateHandler $orderTransactionStateHandler, - SalesChannelContextService $salesChannelContextService, - EntityRepository $orderTransactionRepository, - ?EntityRepository $subscriptionRepository, - ) { - $this->cartPersister = $cartPersister; - $this->pluginTransactionService = $pluginTransactionService; + public function __construct(TransactionService $transactionService, OrderTransactionStateHandler $orderTransactionStateHandler) + { + $this->transactionService = $transactionService; $this->orderTransactionStateHandler = $orderTransactionStateHandler; - $this->salesChannelContextService = $salesChannelContextService; - $this->orderTransactionRepository = $orderTransactionRepository; - $this->subscriptionRepository = $subscriptionRepository; } + /** * @param \Psr\Log\LoggerInterface $logger + * @internal + * @required * */ public function setLogger(LoggerInterface $logger): void @@ -108,352 +73,78 @@ class VRPaymentPaymentHandler extends AbstractPaymentHandler * * A redirect to the url will be performed * - * @param \Symfony\Component\HttpFoundation\Request - * @param \Shopware\Core\Checkout\Payment\Cart\PaymentTransactionStruct $transaction - * @param \Shopware\Core\Framework\Context $context - * @param \Shopware\Core\Framework\Struct\Struct $validateStruct + * @param \Shopware\Core\Checkout\Payment\Cart\AsyncPaymentTransactionStruct $transaction + * @param \Shopware\Core\Framework\Validation\DataBag\RequestDataBag $dataBag + * @param \Shopware\Core\System\SalesChannel\SalesChannelContext $salesChannelContext * @return \Symfony\Component\HttpFoundation\RedirectResponse */ public function pay( - Request $request, - PaymentTransactionStruct $transaction, - Context $context, - ?Struct $validateStruct + AsyncPaymentTransactionStruct $transaction, + RequestDataBag $dataBag, + SalesChannelContext $salesChannelContext ): RedirectResponse { try { - $orderTransactionId = $transaction->getOrderTransactionId(); - $orderTransaction = $this->orderTransactionRepository->search( - (new Criteria([$orderTransactionId])) - ->addAssociation('order'), $context - )->getEntities()->first(); - - $contextSource = $context->getSource(); - if ($contextSource instanceof SalesChannelApiSource) { - $salesChannelContextId = $contextSource->getSalesChannelId(); - } - - $parameters = new SalesChannelContextServiceParameters($salesChannelContextId, $request->getSession()->get("sw-context-token", Random::getAlphanumericString(32)), originalContext: $context); - $salesChannelContext = $this->salesChannelContextService->get($parameters); $redirectUrl = $transaction->getReturnUrl(); - - if ($orderTransaction->getOrder()->getAmountTotal() > 0) { - $transactionId = $request->getSession()->get('transactionId'); + if ($transaction->getOrder()->getAmountTotal() > 0) { + $transactionId = $_SESSION['transactionId'] ?? null; if ($transactionId === null) { - $this->pluginTransactionService->createPendingTransaction($salesChannelContext); + $this->transactionService->createPendingTransaction($salesChannelContext); } - $redirectUrl = $this->pluginTransactionService->create($transaction, $salesChannelContext); + $redirectUrl = $this->transactionService->create($transaction, $salesChannelContext); } return new RedirectResponse($redirectUrl); - } catch (\Throwable $e) { - $request->getSession()->remove('transactionId'); + + } catch (\Exception $e) { + unset($_SESSION['transactionId']); $errorMessage = 'An error occurred during the communication with external payment gateway : ' . $e->getMessage(); $this->logger->critical($errorMessage); - throw PaymentException::customerCanceled($transaction->getOrderTransaction()->getId(), $errorMessage); + throw new \Exception($transaction->getOrderTransaction()->getId() . ': ' . $errorMessage); } } /** * The finalize function will be called when the user is redirected back to shop from the payment gateway. * + * Throw a @param \Shopware\Core\Checkout\Payment\Cart\AsyncPaymentTransactionStruct $transaction * @param \Symfony\Component\HttpFoundation\Request $request - * @param \Shopware\Core\Checkout\Payment\Cart\PaymentTransactionStruct $transaction - * @param \Shopware\Core\Framework\Context $context + * @param \Shopware\Core\System\SalesChannel\SalesChannelContext $salesChannelContext * @throws \VRPayment\Sdk\ApiException * @throws \VRPayment\Sdk\Http\ConnectionException * @throws \VRPayment\Sdk\VersioningException - * @throws \Exception when the payment was canceled by the customer + * @see AsyncPaymentFinalizeException exception if an error ocurres while calling an external payment API + * Throw a @see CustomerCanceledAsyncPaymentException exception if the customer canceled the payment process on + * payment provider page + * */ public function finalize( - Request $request, - PaymentTransactionStruct $transaction, - Context $context + AsyncPaymentTransactionStruct $transaction, + Request $request, + SalesChannelContext $salesChannelContext ): void { - $orderTransactionId = $transaction->getOrderTransactionId(); - $orderTransaction = $this->orderTransactionRepository->search( - (new Criteria([$orderTransactionId])) - ->addAssociation('order'), $context - )->getEntities()->first(); - - if ($orderTransaction->getOrder()->getAmountTotal() > 0) { - $transactionEntity = $this->pluginTransactionService->getByOrderId( - $orderTransaction->getOrder()->getId(), - $context + if ($transaction->getOrder()->getAmountTotal() > 0) { + $transactionEntity = $this->transactionService->getByOrderId( + $transaction->getOrder()->getId(), + $salesChannelContext->getContext() ); - $vRPaymentTransaction = $this->pluginTransactionService->read( + $vRPaymentTransaction = $this->transactionService->read( $transactionEntity->getTransactionId(), - $transactionEntity->getSalesChannelId() + $salesChannelContext->getSalesChannel()->getId() ); if (in_array($vRPaymentTransaction->getState(), [TransactionState::FAILED])) { $errorMessage = strtr('Customer canceled payment for :orderId on SalesChannel :salesChannelName', [ - ':orderId' => $orderTransaction->getOrder()->getId(), - ':salesChannelName' => $transactionEntity->getSalesChannelId(), + ':orderId' => $transaction->getOrder()->getId(), + ':salesChannelName' => $salesChannelContext->getSalesChannel()->getName(), ]); - $request->getSession()->remove('transactionId'); + unset($_SESSION['transactionId']); $this->logger->info($errorMessage); throw PaymentException::customerCanceled($transaction->getOrderTransaction()->getId(), $errorMessage); } } else { - $this->orderTransactionStateHandler->paid($orderTransaction->getId(), $context); + $this->orderTransactionStateHandler->paid($transaction->getOrderTransaction()->getId(), $salesChannelContext->getContext()); } - - $token = $request->getSession()->get('sw-context-token'); - if ($token) { - $salesChannelId = $transactionEntity->getSalesChannelId(); - $parameters = new SalesChannelContextServiceParameters($salesChannelId, $token, originalContext: $context); - $salesChannelContext = $this->salesChannelContextService->get($parameters); - - $salesChannelContext->getContext()->addState('do-cart-delete'); - $this->logger->info('Clearing cart with token: ' . $token); - $this->cartPersister->delete($salesChannelContext->getToken(), $salesChannelContext); - } - } - - /** - * {@inheritDoc} - */ - public function supports( - PaymentHandlerType $type, - string $paymentMethodId, - Context $context - ): bool { - // Both PaymentHandlerType::RECURRING and PaymentHandlerType::REFUND are supported - //TODO: check that the payment method really supports recurring. - // In order to do that, we need to get this information in when synching the payment methods. - // The payment methods in the portal are managed by their Connectors. The Connectors need - // to support the recurrin and the refunding. These values are 1453357059666L and 1453351315899L for - // tokenization and refunding respectively. - return true; - } - - public function recurring( - PaymentTransactionStruct $transaction, - Context $context - ): void { - if ($this->subscriptionRepository === null || !class_exists(\Shopware\Commercial\Subscription\Entity\Subscription\SubscriptionEntity::class)) { - throw PaymentException::paymentTypeUnsupported( - $transaction->getOrderTransactionId(), - 'Shopware Commercial plugin with Subscription feature is not installed or active. Recurring payments cannot be processed.' - ); - } - - if ($transaction->isRecurring() === false) { - //TODO: Provide payment-method-id instead of order-transaction-id - throw PaymentException::paymentTypeUnsupported($transaction->getOrderTransaction()->getId(), PaymentHandlerType::RECURRING); - } - - $recurringData = $transaction->getRecurring(); - $newTransactionId = $transaction->getOrderTransactionId(); - - if ($recurringData === null) { - throw PaymentException::recurringInterrupted($newTransactionId, 'Recurring payment data is missing from the transaction struct.'); - } - - try { - // Get information about the subscription - $subscriptionId = $recurringData->getSubscriptionId(); - $criteria = new Criteria([$subscriptionId]); - $criteria->addAssociation('orders.transactions.stateMachineState'); - - /** @var SubscriptionEntity|null $subscription */ - $subscription = $this->subscriptionRepository->search($criteria, $context)->get($subscriptionId); - - if ($subscription === null) { - throw PaymentException::recurringInterrupted($newTransactionId, sprintf('Subscription with ID "%s" could not be found.', $subscriptionId)); - } - - // Find the original order and transaction - $orders = $subscription->getOrders(); - if ($orders === null || $orders->count() === 0) { - throw PaymentException::recurringInterrupted($newTransactionId, 'No orders found associated with the subscription.'); - } - - $orders->sort(fn (OrderEntity $a, OrderEntity $b) => $a->getCreatedAt() <=> $b->getCreatedAt()); - /** @var OrderEntity|null $originalOrder */ - $originalOrder = $orders->first(); - - $originalTransactions = $originalOrder->getTransactions(); - - if ($originalTransactions === null) { - throw PaymentException::recurringInterrupted($newTransactionId, 'No transactions found on the original order.'); - } - - /** @var OrderTransactionEntity|null $originalTransaction */ - $originalTransaction = $originalTransactions->filter( - fn (OrderTransactionEntity $t) => $t->getStateMachineState()?->getTechnicalName() === OrderTransactionStates::STATE_PAID - )->first(); - - if ($originalTransaction === null) { - throw PaymentException::recurringInterrupted($newTransactionId, 'A successful, paid transaction could not be found on the original order to retrieve payment details.'); - } - - $newOrderTransaction = $this->orderTransactionRepository->search( - (new Criteria([$newTransactionId])) - ->addAssociation('order'), $context - )->getEntities()->first(); - $orderNumber = $newOrderTransaction->getOrder()->getOrderNumber(); - - // Access the custom fields for getting the original transaction details - $customFields = $originalTransaction->getCustomFields(); - // The tokenReference is not really needed because it's also stored in the original transaction - $tokenReference = $customFields[TransactionPayload::ORDER_TRANSACTION_CUSTOM_FIELDS_VRPAYMENT_TOKEN] ?? null; - $spaceId = (string) $customFields[TransactionPayload::ORDER_TRANSACTION_CUSTOM_FIELDS_VRPAYMENT_SPACE_ID] ?? null; - $sdkTransactionId = $customFields[TransactionPayload::ORDER_TRANSACTION_CUSTOM_FIELDS_VRPAYMENT_TRANSACTION_ID] ?? null; - - if ($sdkTransactionId === null || $spaceId === null) { - throw PaymentException::recurringInterrupted($newTransactionId, 'Required original transaction ID and spaceId is missing from order transaction custom fields.'); - } - - /** @var \VRPayment\Sdk\Model\Transaction $originalSdkTransaction */ - $originalSdkTransaction = $this->pluginTransactionService->read($sdkTransactionId, ""); - - //TODO: Consider moving this logic to its own function for improved readability - $sdkTransactionCreate = new \VRPayment\Sdk\Model\TransactionCreate; - - // Build the new transaction based on the original transaction - $sdkTransactionCreate->setCurrency($originalSdkTransaction->getCurrency()); - $sdkTransactionCreate->setBillingAddress($this->addressCreateFromSdk($originalSdkTransaction->getBillingAddress())); - $sdkTransactionCreate->setShippingAddress($this->addressCreateFromSdk($originalSdkTransaction->getShippingAddress())); - $sdkTransactionCreate->setShippingMethod($originalSdkTransaction->getShippingMethod()); - $sdkTransactionCreate->setCustomerEmailAddress($originalSdkTransaction->getCustomerEmailAddress()); - $sdkTransactionCreate->setCustomerId($originalSdkTransaction->getCustomerId()); - $sdkTransactionCreate->setLanguage($originalSdkTransaction->getLanguage()); - // Get the merchant reference from the new Order, not the original one - $sdkTransactionCreate->setMerchantReference($orderNumber); - $sdkTransactionCreate->setInvoiceMerchantReference($originalSdkTransaction->getInvoiceMerchantReference()); - - $lineItems = $originalSdkTransaction->getLineItems(); - $lineItemsCreate = []; - foreach ($lineItems as $lineItem) { - $lineItemsCreate[] = $this->lineItemCreateFromSdk($lineItem); - } - if (count($lineItemsCreate) > 0) { - $sdkTransactionCreate->setLineItems($lineItemsCreate); - } - - $sdkTransactionCreate->setSuccessUrl($originalSdkTransaction->getSuccessUrl()); - $sdkTransactionCreate->setToken($originalSdkTransaction->getToken()); - $sdkTransactionCreate->setTokenizationMode($originalSdkTransaction->getTokenizationMode()); - $sdkTransactionCreate->setMetaData($originalSdkTransaction->getMetaData()); - - // Create the new recurring transaction - $newSdkTransaction = $this->pluginTransactionService->createRecurringTransaction($sdkTransactionCreate, $spaceId); - - // Set the new state for the new order transaction - if (in_array($newSdkTransaction->getState(), [TransactionState::AUTHORIZED, TransactionState::COMPLETED, TransactionState::CONFIRMED, TransactionState::FULFILL])) { - $this->orderTransactionStateHandler->paid($newTransactionId, $context); - } elseif (in_array($newSdkTransaction->getState(), [TransactionState::DECLINE, TransactionState::FAILED, TransactionState::VOIDED])) { - $this->orderTransactionStateHandler->fail($newTransactionId, $context); - } elseif (in_array($newSdkTransaction->getState(), [TransactionState::PENDING, TransactionState::PROCESSING])) { - $this->orderTransactionStateHandler->process($newTransactionId, $context); - } else { - $this->orderTransactionStateHandler->reopen($newTransactionId, $context); - } - - $data = [ - 'id' => $newTransactionId, - 'customFields' => [ - TransactionPayload::ORDER_TRANSACTION_CUSTOM_FIELDS_VRPAYMENT_TRANSACTION_ID => $newSdkTransaction->getId(), - TransactionPayload::ORDER_TRANSACTION_CUSTOM_FIELDS_VRPAYMENT_SPACE_ID => $spaceId, - TransactionPayload::ORDER_TRANSACTION_CUSTOM_FIELDS_VRPAYMENT_TOKEN => $tokenReference, - ], - ]; - - // Update the new order transaction with the new transaction details - $this->orderTransactionRepository->update([$data], $context); - $this->pluginTransactionService->upsert($newSdkTransaction, $context); - } - catch (\Throwable $e) { - $errorMessage = 'An error occurred during the communication with external payment gateway : ' . $e->getMessage(); - $this->logger->critical($errorMessage); - throw PaymentException::recurringInterrupted($transaction->getOrderTransactionId(), $errorMessage); - } - } - - /** - * Creates a new AddressCreate instance from the given SDK Address model. - * - * @param \VRPayment\Sdk\Model\Address $address The address model from the SDK. - * @return \VRPayment\Sdk\Model\AddressCreate The newly created AddressCreate instance. - */ - private function addressCreateFromSdk(\VRPayment\Sdk\Model\Address $address): \VRPayment\Sdk\Model\AddressCreate { - $addressCreate = new \VRPayment\Sdk\Model\AddressCreate; - - $addressCreate->setCity($address->getCity()); - $addressCreate->setCommercialRegisterNumber($address->getCommercialRegisterNumber()); - $addressCreate->setCountry($address->getCountry()); - $addressCreate->setDateOfBirth($address->getDateOfBirth()); - $addressCreate->setDependentLocality($address->getDependentLocality()); - $addressCreate->setEmailAddress($address->getEmailAddress()); - $addressCreate->setFamilyName($address->getFamilyName()); - $addressCreate->setGender($address->getGender()); - $addressCreate->setGivenName($address->getGivenName()); - $addressCreate->setMobilePhoneNumber($address->getMobilePhoneNumber()); - $addressCreate->setOrganizationName($address->getOrganizationName()); - $addressCreate->setPhoneNumber($address->getPhoneNumber()); - $addressCreate->setPostalState($address->getPostalState()); - $addressCreate->setPostcode($address->getPostcode()); - $addressCreate->setSalesTaxNumber($address->getSalesTaxNumber()); - $addressCreate->setSalutation($address->getSalutation()); - $addressCreate->setSocialSecurityNumber($address->getSocialSecurityNumber()); - $addressCreate->setSortingCode($address->getSortingCode()); - $addressCreate->setStreet($address->getStreet()); - - return $addressCreate; - } - - /** - * Creates a LineItemCreate object from a given SDK LineItem. - * - * This method takes a \VRPayment\Sdk\Model\LineItem instance and transforms it into a - * \VRPayment\Sdk\Model\LineItemCreate object, which can be used for further processing - * or integration with the VRPayment payment SDK. - * - * @param \VRPayment\Sdk\Model\LineItem $lineItem The line item from the SDK to convert. - * @return \VRPayment\Sdk\Model\LineItemCreate The created LineItemCreate object. - */ - private function lineItemCreateFromSdk(\VRPayment\Sdk\Model\LineItem $lineItem): \VRPayment\Sdk\Model\LineItemCreate - { - $lineItemCreate = new \VRPayment\Sdk\Model\LineItemCreate(); - - $lineItemCreate->setAmountIncludingTax($lineItem->getAmountIncludingTax()); - - $attributes = $lineItem->getAttributes(); - $attributesCreate = []; - foreach ($attributes as $id => $attribute) { - $attributeCreate = new \VRPayment\Sdk\Model\LineItemAttributeCreate(); - $attributeCreate->setLabel($attribute->getLabel()); - $attributeCreate->setValue($attribute->getValue()); - $attributesCreate[$id] = $attributeCreate; - } - if (count($attributesCreate) > 0) { - $lineItemCreate->setAttributes($attributesCreate); - } - - $lineItemCreate->setDiscountIncludingTax($lineItem->getDiscountIncludingTax()); - $lineItemCreate->setName($lineItem->getName()); - $lineItemCreate->setQuantity($lineItem->getQuantity()); - $lineItemCreate->setShippingRequired($lineItem->getShippingRequired()); - $lineItemCreate->setSku($lineItem->getSku()); - - $taxes = $lineItem->getTaxes(); - $taxesCreate = []; - foreach ($taxes as $tax) { - $taxCreate = new \VRPayment\Sdk\Model\TaxCreate(); - $taxCreate->setRate($tax->getRate()); - $taxCreate->setTitle($tax->getTitle()); - $taxesCreate[] = $taxCreate; - } - if (count($taxesCreate) > 0) { - $lineItemCreate->setTaxes($taxesCreate); - } - - $lineItemCreate->setType($lineItem->getType()); - $lineItemCreate->setUniqueId($lineItem->getUniqueId()); - - return $lineItemCreate; } } diff --git a/src/Core/Checkout/Subscription/Command/GenerateSubscriptionOrderCommand.php b/src/Core/Checkout/Subscription/Command/GenerateSubscriptionOrderCommand.php deleted file mode 100644 index 8719a5b..0000000 --- a/src/Core/Checkout/Subscription/Command/GenerateSubscriptionOrderCommand.php +++ /dev/null @@ -1,116 +0,0 @@ -addArgument('subscriptionIdentifier', InputArgument::REQUIRED, 'The ID or Number of the subscription to process.'); - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new ShopwareStyle($input, $output); - - if ($this->subscriptionRepository === null || !class_exists(\Shopware\Commercial\Subscription\Entity\Subscription\SubscriptionEntity::class)) { - $io->error('Subscription functionality is not available in this Shopware instance. Please ensure the Subscription plugin is installed and enabled.'); - return self::FAILURE; - } - - $identifier = $input->getArgument('subscriptionIdentifier'); - - if (!is_string($identifier)) { - $io->error('Invalid Subscription ID provided.'); - return self::FAILURE; - } - $subscriptionId = $this->findSubscriptionId($identifier, $io); - - if ($subscriptionId === null) { - // Error message is already printed in findSubscriptionId - return self::FAILURE; - } - - $io->text(sprintf('Forcing next schedule for subscription ID: %s', $subscriptionId)); - $this->forceNextSchedule($subscriptionId); - - $io->title('Subscription Order Generation'); - $io->text(sprintf('Dispatching GenerateSubscriptionOrder message for subscription ID: %s', $subscriptionId)); - - $this->bus->dispatch(new GenerateSubscriptionOrder($subscriptionId)); - - $io->success('Message dispatched successfully!'); - $io->note('Ensure a message consumer is running to process the queue: "bin/console messenger:consume async"'); - - return self::SUCCESS; - } - - /** - * Set the next schedule date to the current time, so it will be processed immediately. - * - * @param string $subscriptionId - * @return void - */ - private function forceNextSchedule(string $subscriptionId): void - { - $context = Context::createDefaultContext(); - $this->subscriptionRepository->update([ - [ - 'id' => $subscriptionId, - 'nextSchedule' => (new \DateTime())->format(Defaults::STORAGE_DATE_TIME_FORMAT), - ] - ], $context); - } - - private function findSubscriptionId(string $identifier, ShopwareStyle $io): ?string - { - $context = Context::createDefaultContext(); - if (Uuid::isValid($identifier)) { - // Check if a subscription with this ID actually exists - $result = $this->subscriptionRepository->searchIds(new Criteria([$identifier]), $context); - if ($result->firstId()) { - return $identifier; - } - $io->error(sprintf('No subscription found with ID "%s".', $identifier)); - return null; - } - - // If not a UUID, assume it's a subscription number - $criteria = new Criteria(); - $criteria->addFilter(new EqualsFilter('subscriptionNumber', $identifier)); - $result = $this->subscriptionRepository->searchIds($criteria, $context); - - if ($result->firstId() === null) { - $io->error(sprintf('No subscription found with number "%s".', $identifier)); - return null; - } - - return $result->firstId(); - } -} diff --git a/src/Core/Storefront/Checkout/Subscriber/CheckoutSubscriber.php b/src/Core/Storefront/Checkout/Subscriber/CheckoutSubscriber.php index 9109457..9baf214 100644 --- a/src/Core/Storefront/Checkout/Subscriber/CheckoutSubscriber.php +++ b/src/Core/Storefront/Checkout/Subscriber/CheckoutSubscriber.php @@ -100,7 +100,6 @@ class CheckoutSubscriber implements EventSubscriberInterface { return [ CheckoutConfirmPageLoadedEvent::class => ['onConfirmPageLoaded', 1], - "subscription." . CheckoutConfirmPageLoadedEvent::class => ['onConfirmPageLoaded', 1], MailBeforeValidateEvent::class => ['onMailBeforeValidate', 1], ]; } diff --git a/src/Core/Util/Analytics/Analytics.php b/src/Core/Util/Analytics/Analytics.php index 2a02274..cf2fd15 100644 --- a/src/Core/Util/Analytics/Analytics.php +++ b/src/Core/Util/Analytics/Analytics.php @@ -25,7 +25,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.0', + self::PLUGIN_SYSTEM_VERSION => '6.1.15', ]; } diff --git a/src/Core/Util/Payload/TransactionPayload.php b/src/Core/Util/Payload/TransactionPayload.php index 30368e8..8f9bc59 100644 --- a/src/Core/Util/Payload/TransactionPayload.php +++ b/src/Core/Util/Payload/TransactionPayload.php @@ -8,14 +8,10 @@ use Shopware\Core\{Checkout\Cart\Tax\Struct\CalculatedTaxCollection, Checkout\Customer\Aggregate\CustomerAddress\CustomerAddressEntity, Checkout\Customer\CustomerEntity, Checkout\Order\Aggregate\OrderLineItem\OrderLineItemEntity, - Checkout\Order\OrderEntity, - Checkout\Payment\Cart\PaymentTransactionStruct, + Checkout\Payment\Cart\AsyncPaymentTransactionStruct, Framework\DataAbstractionLayer\Search\Criteria, System\SalesChannel\SalesChannelContext }; -use Shopware\Core\Framework\DataAbstractionLayer\EntityRepository; -use Shopware\Core\Framework\DataAbstractionLayer\Search\Filter\EqualsFilter; - use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Contracts\Translation\TranslatorInterface; use VRPayment\Sdk\{Model\AddressCreate, @@ -40,10 +36,6 @@ use VRPaymentPayment\Core\{Api\PaymentMethodConfiguration\Entity\PaymentMethodCo Util\Payload\CustomProducts\CustomProductsLineItemTypes }; -use Shopware\Core\System\SystemConfig\SystemConfigService; -use Shopware\Core\Framework\Context; -use Shopware\Core\System\Tax\TaxEntity; - /** * Class TransactionPayload * @@ -56,7 +48,6 @@ class TransactionPayload extends AbstractPayload public const ORDER_TRANSACTION_CUSTOM_FIELDS_VRPAYMENT_SPACE_ID = 'vrpayment_space_id'; public const ORDER_TRANSACTION_CUSTOM_FIELDS_VRPAYMENT_TRANSACTION_ID = 'vrpayment_transaction_id'; - public const ORDER_TRANSACTION_CUSTOM_FIELDS_VRPAYMENT_TOKEN = 'vrpayment_token'; public const VRPAYMENT_METADATA_SALES_CHANNEL_ID = 'salesChannelId'; public const VRPAYMENT_METADATA_ORDER_ID = 'orderId'; @@ -70,7 +61,7 @@ class TransactionPayload extends AbstractPayload protected $salesChannelContext; /** - * @var \Shopware\Core\Checkout\Payment\Cart\PaymentTransactionStruct + * @var \Shopware\Core\Checkout\Payment\Cart\AsyncPaymentTransactionStruct */ protected $transaction; @@ -94,10 +85,6 @@ class TransactionPayload extends AbstractPayload */ protected $translator; - protected EntityRepository $orderTransactionRepository; - - protected OrderEntity $order; - /** * TransactionPayload constructor. * @@ -105,14 +92,14 @@ class TransactionPayload extends AbstractPayload * @param \VRPaymentPayment\Core\Util\LocaleCodeProvider $localeCodeProvider * @param \Shopware\Core\System\SalesChannel\SalesChannelContext $salesChannelContext * @param \VRPaymentPayment\Core\Settings\Struct\Settings $settings - * @param \Shopware\Core\Checkout\Payment\Cart\PaymentTransactionStruct $transaction + * @param \Shopware\Core\Checkout\Payment\Cart\AsyncPaymentTransactionStruct $transaction */ public function __construct( ContainerInterface $container, LocaleCodeProvider $localeCodeProvider, SalesChannelContext $salesChannelContext, Settings $settings, - PaymentTransactionStruct $transaction + AsyncPaymentTransactionStruct $transaction ) { $this->localeCodeProvider = $localeCodeProvider; @@ -121,23 +108,6 @@ class TransactionPayload extends AbstractPayload $this->transaction = $transaction; $this->container = $container; $this->translator = $this->container->get('translator'); - $this->orderTransactionRepository = $this->container->get('order_transaction.repository'); - - $criteria = (new Criteria()); - $criteria->addFilter(new EqualsFilter('id', $this->transaction->getOrderTransactionId())); - - $orders = $this->orderTransactionRepository->search($criteria, $this->salesChannelContext->getContext())->getEntities(); - $orderId = $orders->first()->getOrderId(); - - $criteria = new Criteria([$orderId]); - $criteria - ->addAssociation('lineItems') - ->addAssociation('orderCustomer') - ->addAssociation('transactions') - ->addAssociation('currency') - ; - - $this->order = $this->container->get('order.repository')->search($criteria, $this->salesChannelContext->getContext())->getEntities()->first(); } /** @@ -148,21 +118,13 @@ class TransactionPayload extends AbstractPayload */ public function get(int $version): TransactionPending { - $customerId = $this->order->getOrderCustomer()->getCustomerId(); - $criteria = new Criteria([$customerId]); - $criteria->addAssociation('activeBillingAddress') - ->addAssociation('activeShippingAddress') - ->addAssociation('activeShippingAddress') - ->addAssociation('defaultBillingAddress') - ->addAssociation('defaultShippingAddress') - ->addAssociation('salutation'); - $customer = $this->container->get('customer.repository')->search($criteria, $this->salesChannelContext->getContext())->getEntities()->first(); + $customer = $this->salesChannelContext->getCustomer(); $lineItems = $this->getLineItems(); - $billingAddress = $this->getAddressPayload($customer, $customer->getActiveBillingAddress()); $shippingAddress = $this->getAddressPayload($customer, $customer->getActiveShippingAddress(), false); + $customerId = null; $customerName = null; if ($customer->getGuest() === false) { @@ -175,14 +137,14 @@ class TransactionPayload extends AbstractPayload } $transactionData = [ - 'currency' => $this->order->getCurrency()->getIsoCode(), - 'customer_email_address' => $customer->getEmail(), + 'currency' => $this->salesChannelContext->getCurrency()->getIsoCode(), + 'customer_email_address' => $billingAddress->getEmailAddress(), 'customer_id' => $customerId, 'language' => $this->localeCodeProvider->getLocaleCodeFromContext($this->salesChannelContext->getContext()) ?? null, - 'merchant_reference' => $this->fixLength($this->order->getOrderNumber(), 100), + 'merchant_reference' => $this->fixLength($this->transaction->getOrder()->getOrderNumber(), 100), 'meta_data' => [ - self::VRPAYMENT_METADATA_ORDER_ID => $this->order->getId(), - self::VRPAYMENT_METADATA_ORDER_TRANSACTION_ID => $this->order->getTransactions()->first()->getId(), + self::VRPAYMENT_METADATA_ORDER_ID => $this->transaction->getOrder()->getId(), + self::VRPAYMENT_METADATA_ORDER_TRANSACTION_ID => $this->transaction->getOrderTransaction()->getId(), self::VRPAYMENT_METADATA_SALES_CHANNEL_ID => $this->salesChannelContext->getSalesChannel()->getId(), self::VRPAYMENT_METADATA_CUSTOMER_NAME => $customerName, ], @@ -199,8 +161,8 @@ class TransactionPayload extends AbstractPayload $transactionData['meta_data']['additionalAddress2'] = $additionalAddress2; } - if (!empty($this->order->getCustomerComment())) { - $transactionData['meta_data']['customer_comment'] = $this->order->getCustomerComment(); + if (!empty($this->transaction->getOrder()->getCustomerComment())) { + $transactionData['meta_data']['customer_comment'] = $this->transaction->getOrder()->getCustomerComment(); } $vatIds = $customer->getVatIds(); @@ -236,7 +198,7 @@ class TransactionPayload extends AbstractPayload $transactionPayload->setAllowedPaymentMethodConfigurations([$paymentConfiguration->getPaymentMethodConfigurationId()]); $successUrl = $this->transaction->getReturnUrl() . '&status=paid'; - $failedUrl = $this->getFailUrl($this->order->getId()) . '&status=fail'; + $failedUrl = $this->getFailUrl($this->transaction->getOrder()->getId()) . '&status=fail'; $transactionPayload->setSuccessUrl($successUrl) ->setFailedUrl($failedUrl); @@ -257,7 +219,7 @@ class TransactionPayload extends AbstractPayload protected function getLineItems(): array { $lineItems = []; - $items = $this->order->getLineItems() ?? []; + $items = $this->transaction->getOrder()->getLineItems(); foreach ($items as $shopLineItem) { if ($this->shouldSkipLineItem($shopLineItem)) { @@ -345,90 +307,27 @@ class TransactionPayload extends AbstractPayload protected function addDiscountLineItem($discount, array &$lineItems): void { $calculatedPrice = $discount->getPrice(); - $discountName = $discount->getLabel() ?? 'Unnamed'; - $definition = $discount->getPriceDefinition(); + $calculatedTaxesCollection = $calculatedPrice->getCalculatedTaxes(); - if ($this->order->getTaxStatus() === 'net' || $definition instanceof \Shopware\Core\Checkout\Cart\Price\Struct\AbsolutePriceDefinition) { - $calculatedTaxesCollection = $calculatedPrice->getCalculatedTaxes(); - foreach ($calculatedTaxesCollection as $calculatedTax) { - $rate = $calculatedTax->getTaxRate(); - $amount = $this->calculateDiscountAmount($calculatedTax); + foreach ($calculatedTaxesCollection as $calculatedTax) { + $rate = $calculatedTax->getTaxRate(); + $lineItem = new LineItemCreate(); + $amount = $this->calculateDiscountAmount($calculatedTax); - $lineItems[] = $this->createDiscountLineItem($discountName, $amount, $rate); - } - } else { - $taxRules = $calculatedPrice->getTaxRules(); + $discountName = $discount->getLabel(); + $lineItem->setAmountIncludingTax($amount) + ->setName(sprintf('DISCOUNT: %s (%s%% tax)', $discount->getLabel(), $rate)) + ->setQuantity(1) + ->setShippingRequired(false) + ->setSku('sku-discount-' . $rate . '-' . $discountName, 200) + ->setType(LineItemType::DISCOUNT) + ->setUniqueId('coupon-sku-discount-' . $rate . '-' . $rate . '-' . $discountName); - if ($taxRules && $taxRules->count() > 0) { - foreach ($taxRules as $taxRule) { - $rate = $taxRule->getTaxRate(); - $amount = $calculatedPrice->getTotalPrice(); - $lineItems[] = $this->createDiscountLineItem($discountName, $amount, $rate); - } - } else { - $rate = $this->getDefaultTaxRate(); - $amount = $calculatedPrice->getTotalPrice(); - $lineItems[] = $this->createDiscountLineItem($discountName, $amount, $rate); - } - } - } - - /** - * @param string $discountName - * @param float $amount - * @param float $rate - * @return LineItemCreate - */ - private function createDiscountLineItem(string $discountName, float $amount, float $rate): LineItemCreate - { - $lineItem = new LineItemCreate(); - - $discountSkuName = 'sku-discount-' . $rate . '-' . $discountName; - $discountTitle = sprintf('DISCOUNT: %s (%s%% tax)', $discountName, $rate); - if ($this->order->getTaxStatus() === 'tax-free') { - $discountSkuName = 'sku-discount-' . $discountName; - $discountTitle = sprintf('DISCOUNT: %s', $discountName); - } - - $lineItem->setAmountIncludingTax($amount) - ->setName($discountTitle) - ->setQuantity(1) - ->setShippingRequired(false) - ->setSku($discountSkuName, 200) - ->setType(LineItemType::DISCOUNT) - ->setUniqueId('coupon-' . $discountSkuName); - - $taxRate = new TaxCreate([ - 'title' => 'Discount Tax: ' . $rate, - 'rate' => $rate, - ]); - - if ($this->order->getTaxStatus() !== 'tax-free') { + $taxRate = new TaxCreate(['title' => 'Discount Tax: ' . $rate, 'rate' => $rate]); $lineItem->setTaxes([$taxRate]); + + $lineItems[] = $lineItem; } - - return $lineItem; - } - - /** - * @return float - */ - private function getDefaultTaxRate(): float - { - /** @var SystemConfigService $systemConfigService */ - $systemConfigService = $this->container->get(SystemConfigService::class); - $taxId = $systemConfigService->get('core.tax.defaultTaxRate'); - - if (!$taxId || !is_string($taxId)) { - return 21.0; - } - - $criteria = new Criteria([$taxId]); - /** @var TaxRepository $taxRepository */ - $taxRepository = $this->container->get('tax.repository'); - $tax = $taxRepository->search($criteria, Context::createDefaultContext())->get($taxId); - - return $tax instanceof TaxEntity ? $tax->getTaxRate() : 21.0; } /** @@ -437,7 +336,7 @@ class TransactionPayload extends AbstractPayload protected function calculateDiscountAmount($calculatedTax): float { $amount = self::round($calculatedTax->getPrice()); - if ($this->order->getTaxStatus() === 'net') { + if ($this->transaction->getOrder()->getTaxStatus() === 'net') { $amount = self::round($amount + $calculatedTax->getTax()); } return $amount; @@ -458,7 +357,9 @@ class TransactionPayload extends AbstractPayload */ protected function addOptionalLineItems(array &$lineItems): void { - if ($this->order->getShippingCosts() && $this->order->getShippingTotal() > 0) { + $shippingCosts = $this->transaction->getOrder()->getShippingCosts(); + + if ($shippingCosts && $this->transaction->getOrder()->getShippingTotal() > 0) { if ($shippingLineItem = $this->getShippingLineItem()) { $lineItems[] = $shippingLineItem; } @@ -480,7 +381,7 @@ class TransactionPayload extends AbstractPayload protected function getCustomProductOptionLabel(string $lineItemParentId): string { $label = ''; - foreach ($this->order->getLineItems() as $shopLineItem) { + foreach ($this->transaction->getOrder()->getLineItems() as $shopLineItem) { if ($shopLineItem->getParentId() === $lineItemParentId && $shopLineItem->getType() === CustomProductsLineItemTypes::LINE_ITEM_TYPE_PRODUCT) { $label = $shopLineItem->getLabel(); break; @@ -505,11 +406,10 @@ class TransactionPayload extends AbstractPayload $sku = $payLoad['productNumber']; } $sku = $this->fixLength($sku, 200); - $amount = $shopLineItem->getTotalPrice() ? self::round($shopLineItem->getTotalPrice()) : 0; //include Tax Excluded for Net Tax display customer group - if ($this->order->getTaxStatus() === 'net') { + if ($this->transaction->getOrder()->getTaxStatus() === 'net') { $amount = self::round($amount + $shopLineItem->getPrice()->getCalculatedTaxes()->getAmount()); } @@ -545,9 +445,7 @@ class TransactionPayload extends AbstractPayload } if (!empty($taxes)) { - if ($this->order->getTaxStatus() !== 'tax-free') { - $lineItem->setTaxes($taxes); - } + $lineItem->setTaxes($taxes); } if ($shopLineItem->getTotalPrice() >= 0) { @@ -623,34 +521,31 @@ class TransactionPayload extends AbstractPayload { try { - $amount = $this->order->getShippingTotal(); + $amount = $this->transaction->getOrder()->getShippingTotal(); $amount = self::round($amount); if ($amount > 0) { $shippingName = $this->salesChannelContext->getShippingMethod()->getName() ?? $this->translator->trans('vrpayment.payload.shipping.name'); $taxes = $this->getTaxes( - $this->order->getShippingCosts()->getCalculatedTaxes(), + $this->transaction->getOrder()->getShippingCosts()->getCalculatedTaxes(), $shippingName ); - if ($this->order->getTaxStatus() === 'net') { - $amount = self::round($amount + $this->order->getShippingCosts()->getCalculatedTaxes()->getAmount()); + if ($this->transaction->getOrder()->getTaxStatus() === 'net') { + $amount = self::round($amount + $this->transaction->getOrder()->getShippingCosts()->getCalculatedTaxes()->getAmount()); } $lineItem = (new LineItemCreate()) ->setAmountIncludingTax($amount) ->setName($this->fixLength($shippingName . ' ' . $this->translator->trans('vrpayment.payload.shipping.lineItem'), 150)) - ->setQuantity($this->order->getShippingCosts()->getQuantity() ?? 1) + ->setQuantity($this->transaction->getOrder()->getShippingCosts()->getQuantity() ?? 1) + ->setTaxes($taxes) ->setSku($this->fixLength($shippingName . '-Shipping', 200)) /** @noinspection PhpParamsInspection */ ->setType(LineItemType::SHIPPING) ->setUniqueId($this->fixLength($shippingName . '-Shipping', 200)); - if ($this->order->getTaxStatus() !== 'tax-free') { - $lineItem->setTaxes($taxes); - } - if (!$lineItem->valid()) { $this->logger->critical('Shipping LineItem payload invalid:', $lineItem->listInvalidProperties()); throw new InvalidPayloadException('Shipping LineItem payload invalid:' . json_encode($lineItem->listInvalidProperties())); @@ -671,15 +566,15 @@ class TransactionPayload extends AbstractPayload protected function getMultipleShippingLineItems(): array { try { - if ($this->order->getShippingTotal() > 0) { + if ($this->transaction->getOrder()->getShippingTotal() > 0) { $lineItems = []; $shippingName = $this->salesChannelContext->getShippingMethod()->getName() ?? $this->translator->trans('vrpayment.payload.shipping.name'); $isFirst = true; - foreach ($this->order->getShippingCosts()->getCalculatedTaxes() as $taxItem) { + foreach ($this->transaction->getOrder()->getShippingCosts()->getCalculatedTaxes() as $taxItem) { $amount = self::round($taxItem->getPrice()); - if ($this->order->getTaxStatus() === 'net') { + if ($this->transaction->getOrder()->getTaxStatus() === 'net') { $amount = self::round($amount + $taxItem->getTax()); } $taxRate = $taxItem->getTaxRate(); @@ -691,15 +586,12 @@ class TransactionPayload extends AbstractPayload $lineItem = (new LineItemCreate()) ->setAmountIncludingTax($amount) ->setName($this->fixLength($name . ' ' . $this->translator->trans('vrpayment.payload.shipping.lineItem'), 150)) - ->setQuantity($this->order->getShippingCosts()->getQuantity() ?? 1) + ->setQuantity($this->transaction->getOrder()->getShippingCosts()->getQuantity() ?? 1) + ->setTaxes([$tax]) ->setSku($this->fixLength($name . '-Shipping', 200)) ->setType($isFirst ? LineItemType::SHIPPING : LineItemType::FEE) // First item as SHIPPING, rest as FEE ->setUniqueId($this->fixLength($name . '-Shipping', 200)); - if ($this->order->getTaxStatus() !== 'tax-free') { - $lineItem->setTaxes([$tax]); - } - if (!$lineItem->valid()) { $this->logger->critical('Shipping LineItem payload invalid:', $lineItem->listInvalidProperties()); throw new InvalidPayloadException('Shipping LineItem payload invalid:' . json_encode($lineItem->listInvalidProperties())); @@ -733,8 +625,9 @@ class TransactionPayload extends AbstractPayload $lineItemPriceTotal = array_sum(array_map(static fn(LineItemCreate $li) => $li->getAmountIncludingTax(), $lineItems)); $this->logger->debug("LineItem price total before adjustment: $lineItemPriceTotal"); + // Get shipping total including taxes from the order - $shippingCosts = $this->order->getShippingCosts(); + $shippingCosts = $this->transaction->getOrder()->getShippingCosts(); $shippingTotal = $shippingCosts ? self::round($shippingCosts->getTotalPrice()) : 0.0; // Add shipping to the line items total if it's not already included @@ -743,13 +636,13 @@ class TransactionPayload extends AbstractPayload $lineItemPriceTotal += $shippingTotal; } - $adjustmentPrice = self::round($this->order->getAmountTotal() - $lineItemPriceTotal); + $adjustmentPrice = self::round($this->transaction->getOrder()->getAmountTotal() - $lineItemPriceTotal); if (abs($adjustmentPrice) != 0) { if ($this->settings->isLineItemConsistencyEnabled()) { $error = strtr('LineItems total :lineItemTotal does not add up to order total :orderTotal', [ ':lineItemTotal' => $lineItemPriceTotal, - ':orderTotal' => $this->order->getAmountTotal(), + ':orderTotal' => $this->transaction->getOrder()->getAmountTotal(), ]); $this->logger->critical($error); throw new \Exception($error); diff --git a/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-completion/index.html.twig b/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-completion/index.html.twig index ec0cc3b..506861f 100644 --- a/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-completion/index.html.twig +++ b/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-completion/index.html.twig @@ -4,21 +4,21 @@ @modal-close="$emit('modal-close')"> {% block vrpayment_order_action_completion_amount %} - - + v-model:value="isCompletion"> + {% endblock %} {% block vrpayment_order_action_completion_confirm_button %} {% endblock %} - + {% endblock %} diff --git a/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-by-amount/index.html.twig b/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-by-amount/index.html.twig index 6f86754..3f00152 100644 --- a/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-by-amount/index.html.twig +++ b/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-by-amount/index.html.twig @@ -4,23 +4,23 @@ @modal-close="$emit('modal-close')"> {% block vrpayment_order_action_refund_amount_by_amount %} - - + {% endblock %} {% block vrpayment_order_action_refund_confirm_button_by_amount %} {% endblock %} - + {% endblock %} diff --git a/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-by-amount/index.js b/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-by-amount/index.js index f11d712..2a0e0ad 100644 --- a/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-by-amount/index.js +++ b/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-by-amount/index.js @@ -70,18 +70,9 @@ Component.register('vrpayment-order-action-refund-by-amount', { }); }).catch((errorResponse) => { try { - var errorTitle; - var errorMessage; - if (errorResponse.response.data == 'refundExceedsAmount') { - errorTitle = this.$tc('vrpayment-order.refundAction.refundExceedsTotalError.title'); - errorMessage = this.$tc('vrpayment-order.refundAction.refundExceedsTotalError.messageRefundAmountExceedsAvailableBalance'); - } else { - errorTitle = errorResponse.response.data.errors[0].title; - errorMessage = errorResponse.response.data.errors[0].detail; - } this.createNotificationError({ - title: errorTitle, - message: errorMessage, + title: errorResponse.response.data.errors[0].title, + message: errorResponse.response.data.errors[0].detail, autoClose: false }); } catch (e) { diff --git a/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-partial/index.html.twig b/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-partial/index.html.twig index 37a7e2b..c3aa0cc 100644 --- a/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-partial/index.html.twig +++ b/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-partial/index.html.twig @@ -4,13 +4,13 @@ @modal-close="$emit('modal-close')"> {% block vrpayment_order_action_refund_amount_partial %} - - +
    {{ $tc('vrpayment-order.refundAction.maxAvailableAmountToRefund') }}: @@ -20,12 +20,12 @@ {% block vrpayment_order_action_refund_confirm_button_partial %} {% endblock %} - + {% endblock %} diff --git a/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-partial/index.js b/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-partial/index.js index d581002..b9274e8 100644 --- a/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-partial/index.js +++ b/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-partial/index.js @@ -47,9 +47,7 @@ Component.register('vrpayment-order-action-refund-partial', { createdComponent() { this.isLoading = false; this.currency = this.transactionData.transactions[0].currency; - if (!this.refundAmount) { - this.refundAmount = this.$parent.$parent.itemRefundableAmount; - } + this.refundAmount = this.$parent.$parent.itemRefundableAmount; }, createPartialRefund(itemUniqueId) { diff --git a/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-selected/index.html.twig b/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-selected/index.html.twig index a2bfbb1..b1cf34d 100644 --- a/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-selected/index.html.twig +++ b/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund-selected/index.html.twig @@ -5,12 +5,12 @@ {% block vrpayment_order_action_refund_confirm_button_selected %} {% endblock %} - + {% endblock %} diff --git a/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund/index.html.twig b/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund/index.html.twig index 2e3e421..d25ef15 100644 --- a/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund/index.html.twig +++ b/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-refund/index.html.twig @@ -5,12 +5,12 @@ {% block vrpayment_order_action_refund_amount %} - - +
    {{ $tc('vrpayment-order.refundAction.maxAvailableItemsToRefund') }}: @@ -20,12 +20,12 @@ {% block vrpayment_order_action_refund_confirm_button %} {% endblock %} - + {% endblock %} diff --git a/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-void/index.html.twig b/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-void/index.html.twig index 62abf11..98c67c1 100644 --- a/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-void/index.html.twig +++ b/src/Resources/app/administration/src/module/vrpayment-order/component/vrpayment-order-action-void/index.html.twig @@ -4,22 +4,21 @@ @modal-close="$emit('modal-close')"> {% block vrpayment_order_action_void_amount %} - {# Review if this v-model:checked="isVoid" needs to change to checked #} - - + v-model:value="isVoid"> + {% endblock %} {% block vrpayment_order_action_void_confirm_button %} {% endblock %} - + {% endblock %} diff --git a/src/Resources/app/administration/src/module/vrpayment-order/extension/sw-order/sw-order.html.twig b/src/Resources/app/administration/src/module/vrpayment-order/extension/sw-order/sw-order.html.twig index aeac916..27d4108 100644 --- a/src/Resources/app/administration/src/module/vrpayment-order/extension/sw-order/sw-order.html.twig +++ b/src/Resources/app/administration/src/module/vrpayment-order/extension/sw-order/sw-order.html.twig @@ -1,7 +1,6 @@ {% block sw_order_detail_content_tabs_general %} {% parent %} -{# sw-tabs-item will dissappear. See: https://github.com/shopware/shopware/blob/trunk/UPGRADE-6.7.md#sw-tabs-is-removed #} diff --git a/src/Resources/app/administration/src/module/vrpayment-order/extension/sw-order/sw-order.scss b/src/Resources/app/administration/src/module/vrpayment-order/extension/sw-order/sw-order.scss index f7ab85e..ff18ca8 100644 --- a/src/Resources/app/administration/src/module/vrpayment-order/extension/sw-order/sw-order.scss +++ b/src/Resources/app/administration/src/module/vrpayment-order/extension/sw-order/sw-order.scss @@ -3,7 +3,7 @@ margin-top: 40px; } - .sw-order-detail-base .mt-card-view__content { + .sw-order-detail-base .sw-card-view__content { overflow-x: visible; overflow-y: visible; } diff --git a/src/Resources/app/administration/src/module/vrpayment-order/page/vrpayment-order-detail/index.html.twig b/src/Resources/app/administration/src/module/vrpayment-order/page/vrpayment-order-detail/index.html.twig index 30d37cc..5d68090 100644 --- a/src/Resources/app/administration/src/module/vrpayment-order/page/vrpayment-order-detail/index.html.twig +++ b/src/Resources/app/administration/src/module/vrpayment-order/page/vrpayment-order-detail/index.html.twig @@ -1,61 +1,61 @@ {% block vrpayment_order_detail %}
    - + - + {% block vrpayment_order_transaction_history_card %} - + - + {% endblock %} {% block vrpayment_order_transaction_line_items_card %} - + - + {% endblock %} {% block vrpayment_order_transaction_refunds_card %} - + - + {% endblock %} {% block vrpayment_order_actions_modal_refund_partial %} {% endblock %}
    - +
    {% endblock %} diff --git a/src/Resources/app/administration/src/module/vrpayment-order/snippet/de-DE.json b/src/Resources/app/administration/src/module/vrpayment-order/snippet/de-DE.json index d712fb1..ecd1e48 100644 --- a/src/Resources/app/administration/src/module/vrpayment-order/snippet/de-DE.json +++ b/src/Resources/app/administration/src/module/vrpayment-order/snippet/de-DE.json @@ -77,11 +77,7 @@ "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." - } + "maxAvailableAmountToRefund": "Maximal verfügbarer Erstattungsbetrag" }, "transactionHistory": { "cardTitle": "Einzelheiten", diff --git a/src/Resources/app/administration/src/module/vrpayment-order/snippet/en-GB.json b/src/Resources/app/administration/src/module/vrpayment-order/snippet/en-GB.json index 370354c..8f3f943 100644 --- a/src/Resources/app/administration/src/module/vrpayment-order/snippet/en-GB.json +++ b/src/Resources/app/administration/src/module/vrpayment-order/snippet/en-GB.json @@ -78,11 +78,7 @@ "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." - } + "maxAvailableAmountToRefund": "Maximum available amount to refund" }, "transactionHistory": { "cardTitle": "Details", diff --git a/src/Resources/app/administration/src/module/vrpayment-order/snippet/fr-FR.json b/src/Resources/app/administration/src/module/vrpayment-order/snippet/fr-FR.json index b4e9f00..97688e3 100644 --- a/src/Resources/app/administration/src/module/vrpayment-order/snippet/fr-FR.json +++ b/src/Resources/app/administration/src/module/vrpayment-order/snippet/fr-FR.json @@ -77,11 +77,7 @@ "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." - } + "maxAvailableAmountToRefund": "Montant maximal disponible pour le remboursement" }, "transactionHistory": { "cardTitle": "Détails", diff --git a/src/Resources/app/administration/src/module/vrpayment-order/snippet/it-IT.json b/src/Resources/app/administration/src/module/vrpayment-order/snippet/it-IT.json index 12a9ac8..12d174b 100644 --- a/src/Resources/app/administration/src/module/vrpayment-order/snippet/it-IT.json +++ b/src/Resources/app/administration/src/module/vrpayment-order/snippet/it-IT.json @@ -77,11 +77,7 @@ "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." - } + "maxAvailableAmountToRefund": "Importo massimo disponibile per il rimborso" }, "transactionHistory": { "cardTitle": "Dettagli", diff --git a/src/Resources/app/administration/src/module/vrpayment-settings/component/sw-vrpayment-advanced-options/index.html.twig b/src/Resources/app/administration/src/module/vrpayment-settings/component/sw-vrpayment-advanced-options/index.html.twig index 68ca180..024b3ff 100644 --- a/src/Resources/app/administration/src/module/vrpayment-settings/component/sw-vrpayment-advanced-options/index.html.twig +++ b/src/Resources/app/administration/src/module/vrpayment-settings/component/sw-vrpayment-advanced-options/index.html.twig @@ -1,4 +1,4 @@ -
    @@ -7,16 +7,16 @@ :inheritedValue="selectedSalesChannelId == null ? null : allConfigs['null'][CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED]" :customInheritationCheckFunction="checkBoolFieldInheritance"> @@ -25,19 +25,19 @@ :inheritedValue="selectedSalesChannelId == null ? null : allConfigs['null'][CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED]" :customInheritationCheckFunction="checkBoolFieldInheritance">
    -
    + diff --git a/src/Resources/app/administration/src/module/vrpayment-settings/component/sw-vrpayment-credentials/index.html.twig b/src/Resources/app/administration/src/module/vrpayment-settings/component/sw-vrpayment-credentials/index.html.twig index 117ac2d..90f9b5e 100644 --- a/src/Resources/app/administration/src/module/vrpayment-settings/component/sw-vrpayment-credentials/index.html.twig +++ b/src/Resources/app/administration/src/module/vrpayment-settings/component/sw-vrpayment-credentials/index.html.twig @@ -1,6 +1,6 @@ {% block vrpayment_settings_content_card_channel_config_credentials %} - @@ -17,17 +17,17 @@ :inheritedValue="selectedSalesChannelId === null ? null : allConfigs['null'][CONFIG_SPACE_ID]" :customInheritationCheckFunction="checkNumberFieldInheritance"> {% endblock %} @@ -38,17 +38,17 @@ :inheritedValue="selectedSalesChannelId === null ? null : allConfigs['null'][CONFIG_USER_ID]" :customInheritationCheckFunction="checkNumberFieldInheritance"> {% endblock %} @@ -59,7 +59,7 @@ :inheritedValue="selectedSalesChannelId === null ? null : allConfigs['null'][CONFIG_APPLICATION_KEY]" :customInheritationCheckFunction="checkTextFieldInheritance"> {% endblock %}
    {% endblock %} - {% verbatim %} - {{ $tc('vrpayment-settings.settingForm.credentials.button.label') }} - + - {% endverbatim %} {% endblock %} - + {% endblock %} diff --git a/src/Resources/app/administration/src/module/vrpayment-settings/component/sw-vrpayment-options/index.html.twig b/src/Resources/app/administration/src/module/vrpayment-settings/component/sw-vrpayment-options/index.html.twig index 252b010..0760ce1 100644 --- a/src/Resources/app/administration/src/module/vrpayment-settings/component/sw-vrpayment-options/index.html.twig +++ b/src/Resources/app/administration/src/module/vrpayment-settings/component/sw-vrpayment-options/index.html.twig @@ -1,5 +1,5 @@ {% block vrpayment_settings_content_card_channel_config_options %} - {% block vrpayment_settings_content_card_channel_config_credentials_card_container %} @@ -14,15 +14,15 @@ :inheritedValue="selectedSalesChannelId === null ? null : allConfigs['null'][CONFIG_SPACE_VIEW_ID]" :customInheritationCheckFunction="checkNumberFieldInheritance"> {% endblock %} @@ -55,16 +55,16 @@ :inheritedValue="selectedSalesChannelId == null ? null : allConfigs['null'][CONFIG_LINE_ITEM_CONSISTENCY_ENABLED]" :customInheritationCheckFunction="checkBoolFieldInheritance"> {% endblock %} @@ -75,16 +75,16 @@ :inheritedValue="selectedSalesChannelId == null ? null : allConfigs['null'][CONFIG_EMAIL_ENABLED]" :customInheritationCheckFunction="checkBoolFieldInheritance"> {% endblock %} @@ -92,6 +92,6 @@ {% endblock %} {% endblock %} - + {% endblock %} diff --git a/src/Resources/app/administration/src/module/vrpayment-settings/component/sw-vrpayment-settings-icon/index.html.twig b/src/Resources/app/administration/src/module/vrpayment-settings/component/sw-vrpayment-settings-icon/index.html.twig index 3fad643..ad1f95e 100644 --- a/src/Resources/app/administration/src/module/vrpayment-settings/component/sw-vrpayment-settings-icon/index.html.twig +++ b/src/Resources/app/administration/src/module/vrpayment-settings/component/sw-vrpayment-settings-icon/index.html.twig @@ -1,5 +1,5 @@ {% block vrpayment_settings_icon %} - +
    @@ -7,19 +7,19 @@ :inheritedValue="selectedSalesChannelId == null ? null : allConfigs['null'][CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED]" :customInheritationCheckFunction="checkBoolFieldInheritance">
    - + diff --git a/src/Resources/app/administration/src/module/vrpayment-settings/page/vrpayment-settings/index.html.twig b/src/Resources/app/administration/src/module/vrpayment-settings/page/vrpayment-settings/index.html.twig index 377d7a2..0fee779 100644 --- a/src/Resources/app/administration/src/module/vrpayment-settings/page/vrpayment-settings/index.html.twig +++ b/src/Resources/app/administration/src/module/vrpayment-settings/page/vrpayment-settings/index.html.twig @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ {% block vrpayment_settings_actions %} {% endblock %} @@ -31,7 +31,7 @@ {% endblock %} @@ -135,12 +134,12 @@ {% endblock %} {% block vrpayment_settings_content_card_loading %} - + {% endblock %} - + {% endblock %} {% endblock %} -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/src/Resources/app/administration/src/module/vrpayment-settings/page/vrpayment-settings/index.js b/src/Resources/app/administration/src/module/vrpayment-settings/page/vrpayment-settings/index.js index 56add61..05b1c95 100644 --- a/src/Resources/app/administration/src/module/vrpayment-settings/page/vrpayment-settings/index.js +++ b/src/Resources/app/administration/src/module/vrpayment-settings/page/vrpayment-settings/index.js @@ -65,6 +65,18 @@ Component.register('vrpayment-settings', { }; }, + created() { + // Registers a listener for the 'check-api-connection-event'. + // Triggered when this event is emitted. + this.$on('check-api-connection-event', this.onCheckApiConnection); + }, + + beforeDestroy() { + // Removes the listener for the 'check-api-connection-event' + // before the component is destroyed to prevent memory leaks. + this.$off('check-api-connection-event', this.onCheckApiConnection); + }, + watch: { config: { handler(configData) { diff --git a/src/Resources/app/storefront/dist/storefront/js/v-r-payment-payment/v-r-payment-payment.js b/src/Resources/app/storefront/dist/storefront/js/v-r-payment-payment/v-r-payment-payment.js deleted file mode 100644 index 7b271f7..0000000 --- a/src/Resources/app/storefront/dist/storefront/js/v-r-payment-payment/v-r-payment-payment.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e={156:e=>{var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==r},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?o(Array.isArray(e)?[]:{},e,t):e}function s(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function i(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function a(e,t){try{return t in e}catch(e){return!1}}function o(e,r,l){(l=l||{}).arrayMerge=l.arrayMerge||s,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=n;var u,c,h=Array.isArray(r);return h!==Array.isArray(e)?n(r,l):h?l.arrayMerge(e,r,l):(c={},(u=l).isMergeableObject(e)&&i(e).forEach(function(t){c[t]=n(e[t],u)}),i(r).forEach(function(t){(!a(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(a(e,t)&&u.isMergeableObject(r[t])?c[t]=(function(e,t){if(!t.customMerge)return o;var r=t.customMerge(e);return"function"==typeof r?r:o})(t,u)(e[t],r[t],u):c[t]=n(r[t],u))}),c)}o.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,r){return o(e,r,t)},{})},e.exports=o}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n=r(156),s=r.n(n);class i{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let r=i.toUpperCamelCase(e,t);return i.lcFirst(r)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>i.ucFirst(e.toLowerCase())).join(""):i.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}class a{constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=new CustomEvent(e,{detail:t,cancelable:r});return this.el.dispatchEvent(n),n}subscribe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this,s=e.split("."),i=r.scope?t.bind(r.scope):t;if(r.once&&!0===r.once){let t=i;i=function(r){n.unsubscribe(e),t(r)}}return this.el.addEventListener(s[0],i),this.listeners.push({splitEventName:s,opts:r,cb:i}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,r)=>([...r.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(r.splitEventName[0],r.cb):e.push(r),e),[]),!0}reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}}class o{constructor(e,t={},r=!1){if(!(e instanceof Node))throw Error("There is no valid element given.");this.el=e,this.$emitter=new a(this.el),this._pluginName=this._getPluginName(r),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}init(){throw Error(`The "init" method for the plugin "${this._pluginName}" is not defined.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let t=[this.constructor.options,this.options,e];return t.push(this._getConfigFromDataAttribute()),t.push(this._getOptionsFromDataAttribute()),s().all(t.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_getConfigFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=i.toDashCase(this._pluginName),r=this.el.getAttribute(`data-${t}-config`);return r?window.PluginConfigManager.get(this._pluginName,r):e}_getOptionsFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=i.toDashCase(this._pluginName),r=this.el.getAttribute(`data-${t}-options`);if(r)try{return JSON.parse(r)}catch(e){console.error(`The data attribute "data-${t}-options" could not be parsed to json: ${e.message}`)}return e}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),e}}class l{constructor(){this._request=null,this._errorHandlingInternal=!1}get(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",n=this._createPreparedRequest("GET",e,r);return this._sendRequest(n,null,t)}post(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let s=this._createPreparedRequest("POST",e,n);return this._sendRequest(s,t,r)}delete(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let s=this._createPreparedRequest("DELETE",e,n);return this._sendRequest(s,t,r)}patch(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let s=this._createPreparedRequest("PATCH",e,n);return this._sendRequest(s,t,r)}abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(e){this._errorHandlingInternal=e}_registerOnLoaded(e,t){t&&(!0===this._errorHandlingInternal?(e.addEventListener("load",()=>{t(e.responseText,e)}),e.addEventListener("abort",()=>{console.warn(`the request to ${e.responseURL} was aborted`)}),e.addEventListener("error",()=>{console.warn(`the request to ${e.responseURL} failed with status ${e.status}`)}),e.addEventListener("timeout",()=>{console.warn(`the request to ${e.responseURL} timed out`)})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,r){return this._registerOnLoaded(e,r),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,r){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),r&&this._request.setRequestHeader("Content-type",r),this._request}}class u extends o{static #e=this.options={payment_method_tabs:"ul.vrpayment-payment-panel li",payment_method_iframe_prefix:"iframe_payment_method_",payment_method_iframe_class:".vrpayment-payment-iframe",payment_method_handler_name:"vrpayment_payment_handler",payment_method_handler_prefix:"vrpayment_handler_",payment_method_handler_status:'input[name="vrpayment_payment_handler_validation_status"]',payment_form:"confirmOrderForm"};init(){this._client=new l(window.accessKey)}}window.PluginManager.register("VRPaymentCheckoutPlugin",u,"[data-vrpayment-checkout-plugin]")})(); \ No newline at end of file diff --git a/src/Resources/config/services/core/checkout.xml b/src/Resources/config/services/core/checkout.xml index ee1861e..e980a67 100644 --- a/src/Resources/config/services/core/checkout.xml +++ b/src/Resources/config/services/core/checkout.xml @@ -5,31 +5,13 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> - - - - - - - - - - - - - - - - - + diff --git a/src/Resources/config/services/core/storefront/checkout.xml b/src/Resources/config/services/core/storefront/checkout.xml index 427f4d5..f022b03 100644 --- a/src/Resources/config/services/core/storefront/checkout.xml +++ b/src/Resources/config/services/core/storefront/checkout.xml @@ -19,10 +19,9 @@ - - + diff --git a/src/Resources/public/administration/.vite/entrypoints.json b/src/Resources/public/administration/.vite/entrypoints.json deleted file mode 100644 index a1b018c..0000000 --- a/src/Resources/public/administration/.vite/entrypoints.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "base": "/bundles/vrpaymentpayment/administration/", - "entryPoints": { - "v-r-payment-payment": { - "css": [ - "/bundles/vrpaymentpayment/administration/assets/v-r-payment-payment-D4AH6HY2.css" - ], - "dynamic": [], - "js": [ - "/bundles/vrpaymentpayment/administration/assets/v-r-payment-payment-C6eiDWfX.js" - ], - "legacy": false, - "preload": [] - } - }, - "legacy": false, - "metadatas": {}, - "version": [ - "7.1.0", - 7, - 1, - 0 - ], - "viteServer": null -} \ No newline at end of file diff --git a/src/Resources/public/administration/.vite/manifest.json b/src/Resources/public/administration/.vite/manifest.json deleted file mode 100644 index 076a386..0000000 --- a/src/Resources/public/administration/.vite/manifest.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "main.js": { - "file": "assets/v-r-payment-payment-C6eiDWfX.js", - "name": "v-r-payment-payment", - "src": "main.js", - "isEntry": true, - "css": [ - "assets/v-r-payment-payment-D4AH6HY2.css" - ] - } -} \ No newline at end of file diff --git a/src/Resources/public/administration/assets/v-r-payment-payment-C6eiDWfX.js b/src/Resources/public/administration/assets/v-r-payment-payment-C6eiDWfX.js deleted file mode 100644 index 4246b25..0000000 --- a/src/Resources/public/administration/assets/v-r-payment-payment-C6eiDWfX.js +++ /dev/null @@ -1,2 +0,0 @@ -const A=`{% block sw_order_detail_content_tabs_general %} {% parent %} {# sw-tabs-item will dissappear. See: https://github.com/shopware/shopware/blob/trunk/UPGRADE-6.7.md#sw-tabs-is-removed #} {{ $tc('vrpayment-order.header') }} {% endblock %} {% block sw_order_detail_actions_slot_smart_bar_actions %} {% endblock %}`,{Component:T,Context:g}=Shopware,P=Shopware.Data.Criteria,D="handler_vrpaymentpayment_vrpaymentpaymenthandler";T.override("sw-order-detail",{template:A,data(){return{isVRPaymentPayment:!1}},computed:{isEditable(){return!this.isVRPaymentPayment||this.$route.name!=="vrpayment.order.detail"},showTabs(){return!0}},watch:{orderId:{deep:!0,handler(){if(!this.orderId){this.setIsVRPaymentPayment(null);return}const e=this.repositoryFactory.create("order"),t=new P(1,1);t.addAssociation("transactions"),e.get(this.orderId,g.api,t).then(a=>{if(a.amountTotal<=0||a.transactions.length<=0||!a.transactions[0].paymentMethodId){this.setIsVRPaymentPayment(null);return}const n=a.transactions[0].paymentMethodId;n!=null&&this.setIsVRPaymentPayment(n)})},immediate:!0}},methods:{setIsVRPaymentPayment(e){if(!e)return;this.repositoryFactory.create("payment_method").get(e,g.api).then(a=>{this.isVRPaymentPayment=a.formattedHandlerIdentifier===D})}}});const N=`{% block vrpayment_order_action_completion %} {% block vrpayment_order_action_completion_amount %} {% endblock %} {% block vrpayment_order_action_completion_confirm_button %} {% endblock %} {% endblock %}`,{Component:k,Mixin:$,Filter:R,Utils:y}=Shopware;k.register("vrpayment-order-action-completion",{template:N,inject:["VRPaymentTransactionCompletionService"],mixins:[$.getByName("notification")],props:{transactionData:{type:Object,required:!0}},data(){return{isLoading:!0,isCompletion:!1}},computed:{dateFilter(){return R.getByName("date")}},created(){this.createdComponent()},methods:{createdComponent(){this.isLoading=!1},completion(){this.isCompletion&&(this.isLoading=!0,this.VRPaymentTransactionCompletionService.createTransactionCompletion(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id).then(()=>{this.createNotificationSuccess({title:this.$tc("vrpayment-order.captureAction.successTitle"),message:this.$tc("vrpayment-order.captureAction.successMessage")}),this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${y.createId()}`)})}).catch(e=>{try{this.createNotificationError({title:e.response.data.errors[0].title,message:e.response.data.errors[0].detail,autoClose:!1})}catch{this.createNotificationError({title:e.title,message:e.message,autoClose:!1})}finally{this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${y.createId()}`)})}}))}}});const x=`{% block vrpayment_order_action_refund %} {% block vrpayment_order_action_refund_amount %}
    {{ $tc('vrpayment-order.refundAction.maxAvailableItemsToRefund') }}: {{ this.$parent.$parent.itemRefundableQuantity }}
    {% endblock %} {% block vrpayment_order_action_refund_confirm_button %} {% endblock %}
    {% endblock %}`,{Component:O,Mixin:F,Filter:V,Utils:f}=Shopware;O.register("vrpayment-order-action-refund",{template:x,inject:["VRPaymentRefundService"],mixins:[F.getByName("notification")],props:{transactionData:{type:Object,required:!0},orderId:{type:String,required:!0}},data(){return{refundQuantity:0,isLoading:!0,currentLineItem:""}},computed:{dateFilter(){return V.getByName("date")}},created(){this.createdComponent()},methods:{createdComponent(){this.isLoading=!1,this.refundQuantity=1},refund(){this.isLoading=!0,this.VRPaymentRefundService.createRefund(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,this.refundQuantity,this.$parent.$parent.currentLineItem).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=${f.createId()}`)})}).catch(e=>{try{this.createNotificationError({title:e.response.data.errors[0].title,message:e.response.data.errors[0].detail,autoClose:!1})}catch{this.createNotificationError({title:e.title,message:e.message,autoClose:!1})}finally{this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${f.createId()}`)})}})}}});const L=`{% block vrpayment_order_action_refund_partial %} {% block vrpayment_order_action_refund_amount_partial %}
    {{ $tc('vrpayment-order.refundAction.maxAvailableAmountToRefund') }}: {{ this.$parent.$parent.itemRefundableAmount }}
    {% endblock %} {% block vrpayment_order_action_refund_confirm_button_partial %} {% endblock %}
    {% endblock %}`,{Component:M,Mixin:B,Filter:z,Utils:b}=Shopware;M.register("vrpayment-order-action-refund-partial",{template:L,inject:["VRPaymentRefundService"],mixins:[B.getByName("notification")],props:{transactionData:{type:Object,required:!0},orderId:{type:String,required:!0}},data(){return{isLoading:!0,currency:this.transactionData.transactions[0].currency,refundAmount:0}},computed:{dateFilter(){return z.getByName("date")}},created(){this.createdComponent()},methods:{createdComponent(){this.isLoading=!1,this.currency=this.transactionData.transactions[0].currency,this.refundAmount||(this.refundAmount=this.$parent.$parent.itemRefundableAmount)},createPartialRefund(e){this.isLoading=!0,this.VRPaymentRefundService.createPartialRefund(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,this.refundAmount,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=${b.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.message,autoClose:!1})}finally{this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${b.createId()}`)})}})}},watch:{refundAmount(e){e!==null&&(this.refundAmount=Math.round(e*100)/100)}}});const G=`{% block vrpayment_order_action_refund_by_amount %} {% block vrpayment_order_action_refund_amount_by_amount %} {% endblock %} {% block vrpayment_order_action_refund_confirm_button_by_amount %} {% endblock %} {% endblock %}`,{Component:U,Mixin:q,Filter:H,Utils:v}=Shopware;U.register("vrpayment-order-action-refund-by-amount",{template:G,inject:["VRPaymentRefundService"],mixins:[q.getByName("notification")],props:{transactionData:{type:Object,required:!0},orderId:{type:String,required:!0}},data(){return{isLoading:!0,currency:this.transactionData.transactions[0].currency,refundAmount:0,refundableAmount:0}},computed:{dateFilter(){return H.getByName("date")}},created(){this.createdComponent()},methods:{createdComponent(){this.isLoading=!1,this.currency=this.transactionData.transactions[0].currency,this.refundAmount=Number(this.transactionData.transactions[0].amountIncludingTax),this.refundableAmount=Number(this.transactionData.transactions[0].amountIncludingTax)},refundByAmount(){this.isLoading=!0,this.VRPaymentRefundService.createRefundByAmount(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,this.refundAmount).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=${v.createId()}`)})}).catch(e=>{try{var t,a;e.response.data=="refundExceedsAmount"?(t=this.$tc("vrpayment-order.refundAction.refundExceedsTotalError.title"),a=this.$tc("vrpayment-order.refundAction.refundExceedsTotalError.messageRefundAmountExceedsAvailableBalance")):(t=e.response.data.errors[0].title,a=e.response.data.errors[0].detail),this.createNotificationError({title:t,message:a,autoClose:!1})}catch{this.createNotificationError({title:e.title,message:e.message,autoClose:!1})}finally{this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${v.createId()}`)})}})}}});const W=`{% block vrpayment_order_action_void %} {% block vrpayment_order_action_void_amount %} {# Review if this v-model:checked="isVoid" needs to change to checked #} {% endblock %} {% block vrpayment_order_action_void_confirm_button %} {% endblock %} {% endblock %}`,{Component:K,Mixin:Q,Filter:Y,Utils:_}=Shopware;K.register("vrpayment-order-action-void",{template:W,inject:["VRPaymentTransactionVoidService"],mixins:[Q.getByName("notification")],props:{transactionData:{type:Object,required:!0}},data(){return{isLoading:!0,isVoid:!1}},computed:{dateFilter(){return Y.getByName("date")},lineItemColumns(){return[{property:"uniqueId",label:this.$tc("vrpayment-order.refund.types.uniqueId"),rawData:!1,allowResize:!0,primary:!0,width:"auto"},{property:"name",label:this.$tc("vrpayment-order.refund.types.name"),rawData:!0,allowResize:!0,sortable:!0,width:"auto"},{property:"quantity",label:this.$tc("vrpayment-order.refund.types.quantity"),rawData:!0,allowResize:!0,width:"auto"},{property:"amountIncludingTax",label:this.$tc("vrpayment-order.refund.types.amountIncludingTax"),rawData:!0,allowResize:!0,inlineEdit:"string",width:"auto"},{property:"type",label:this.$tc("vrpayment-order.refund.types.type"),rawData:!0,allowResize:!0,sortable:!0,width:"auto"},{property:"taxAmount",label:this.$tc("vrpayment-order.refund.types.taxAmount"),rawData:!0,allowResize:!0,width:"auto"}]}},created(){this.createdComponent()},methods:{createdComponent(){this.isLoading=!1,this.currency=this.transactionData.transactions[0].currency,this.refundableAmount=this.transactionData.transactions[0].amountIncludingTax,this.refundAmount=this.transactionData.transactions[0].amountIncludingTax},voidPayment(){this.isVoid&&(this.isLoading=!0,this.VRPaymentTransactionVoidService.createTransactionVoid(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id).then(()=>{this.createNotificationSuccess({title:this.$tc("vrpayment-order.voidAction.successTitle"),message:this.$tc("vrpayment-order.voidAction.successMessage")}),this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${_.createId()}`)})}).catch(e=>{try{this.createNotificationError({title:e.response.data.errors[0].title,message:e.response.data.errors[0].detail,autoClose:!1})}catch{this.createNotificationError({title:e.title,message:e.message,autoClose:!1})}finally{this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${_.createId()}`)})}}))}}});const j=`{% block vrpayment_order_detail %}
    {% block vrpayment_order_transaction_history_card %} {% endblock %} {% block vrpayment_order_transaction_line_items_card %} {% endblock %} {% block vrpayment_order_transaction_refunds_card %} {% endblock %} {% block vrpayment_order_actions_modal_refund_partial %} {% endblock %} {% block vrpayment_order_actions_modal_refund %} {% endblock %} {% block vrpayment_order_actions_modal_refund_by_amount %} {% endblock %} {% block vrpayment_order_actions_modal_completion%} {% endblock %} {% block vrpayment_order_actions_modal_void %} {% endblock %}
    {% 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 %} {% block vrpayment_settings_actions %} {% endblock %} {% block vrpayment_settings_content %} {% 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 be=`{% 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 %}
    {% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings_space_id %} {% endblock %} {% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings_user_id %} {% endblock %} {% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings_application_key %} {% endblock %}
    {% endblock %} {% verbatim %} {{ $tc('vrpayment-settings.settingForm.credentials.button.label') }} {% endverbatim %}
    {% endblock %}
    {% endblock %}`,{Component:ve,Mixin:_e}=Shopware;ve.register("sw-vrpayment-credentials",{template:be,name:"VRPaymentCredentials",inject:["acl"],mixins:[_e.getByName("notification")],props:{actualConfigData:{type:Object,required:!0},allConfigs:{type:Object,required:!0},selectedSalesChannelId:{required:!0},spaceIdFilled:{type:Boolean,required:!0},spaceIdErrorState:{required:!0},userIdFilled:{type:Boolean,required:!0},userIdErrorState:{required:!0},applicationKeyFilled:{type:Boolean,required:!0},applicationKeyErrorState:{required:!0},isLoading:{type:Boolean,required:!0},isTesting:{type:Boolean,required:!1}},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"},emitCheckApiConnectionEvent(){const e={spaceId:this.actualConfigData[m.CONFIG_SPACE_ID],userId:this.actualConfigData[m.CONFIG_USER_ID],applicationKey:this.actualConfigData[m.CONFIG_APPLICATION_KEY]};this.$emit("check-api-connection-event",e)}}});const Ie=`{% block vrpayment_settings_content_card_channel_config_options %} {% block vrpayment_settings_content_card_channel_config_credentials_card_container %} {% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings %}
    {% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings_space_view_id %} {% endblock %} {% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings_integration %} {% endblock %} {% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings_line_item_consistency_enabled %} {% endblock %} {% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings_email_enabled %} {% endblock %}
    {% endblock %}
    {% endblock %}
    {% endblock %}`,{Component:Ce,Mixin:Ee}=Shopware;Ce.register("sw-vrpayment-options",{template:Ie,name:"VRPaymentOptions",mixins:[Ee.getByName("notification")],props:{actualConfigData:{type:Object,required:!0},allConfigs:{type:Object,required:!0},selectedSalesChannelId:{required:!0},isLoading:{type:Boolean,required:!0}},data(){return{...m}},computed:{integrationOptions(){return[{id:"payment_page",name:this.$tc("vrpayment-settings.settingForm.options.integration.options.payment_page")},{id:"iframe",name:this.$tc("vrpayment-settings.settingForm.options.integration.options.iframe")}]}},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 Se='{% block vrpayment_settings_icon %} {% endblock %}',{Component:we}=Shopware;we.register("sw-vrpayment-settings-icon",{template:Se});const Ae=`
    `,{Component:Te,Mixin:Pe}=Shopware;Te.register("sw-vrpayment-storefront-options",{template:Ae,name:"VRPaymentStorefrontOptions",mixins:[Pe.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 De=`
    `,{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 S=Shopware.Classes.ApiService;class Be extends S{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=>S.handleResponse(o))}}const w=Shopware.Classes.ApiService;class ze extends w{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=>w.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-C6eiDWfX.js.map diff --git a/src/Resources/public/administration/assets/v-r-payment-payment-C6eiDWfX.js.map b/src/Resources/public/administration/assets/v-r-payment-payment-C6eiDWfX.js.map deleted file mode 100644 index 7aee46e..0000000 --- a/src/Resources/public/administration/assets/v-r-payment-payment-C6eiDWfX.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"v-r-payment-payment-C6eiDWfX.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{% 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{% 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
    \n\t\t\t{{ $tc('vrpayment-order.refundAction.maxAvailableItemsToRefund') }}:\n\t\t\t{{ this.$parent.$parent.itemRefundableQuantity }}\n\t\t
    \n\t{% endblock %}\n\n\t{% block vrpayment_order_action_refund_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n
    \n{% endblock %}\n","/* global Shopware */\n\nimport template from './index.html.twig';\n\nconst {Component, Mixin, Filter, Utils} = Shopware;\n\nComponent.register('vrpayment-order-action-refund', {\n\ttemplate,\n\n\tinject: ['VRPaymentRefundService'],\n\n\tmixins: [\n\t\tMixin.getByName('notification')\n\t],\n\n\tprops: {\n\t\ttransactionData: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\n\t\torderId: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\trefundQuantity: 0,\n\t\t\tisLoading: true,\n\t\t\tcurrentLineItem: '',\n\t\t};\n\t},\n\n\tcomputed: {\n\t\tdateFilter() {\n\t\t\treturn Filter.getByName('date');\n\t\t}\n\t},\n\n\tcreated() {\n\t\tthis.createdComponent();\n\t},\n\n\tmethods: {\n\t\tcreatedComponent() {\n\t\t\tthis.isLoading = false;\n\t\t\tthis.refundQuantity = 1;\n\t\t},\n\n\t\trefund() {\n\t\t\tthis.isLoading = true;\n\t\t\tthis.VRPaymentRefundService.createRefund(\n\t\t\t\tthis.transactionData.transactions[0].metaData.salesChannelId,\n\t\t\t\tthis.transactionData.transactions[0].id,\n\t\t\t\tthis.refundQuantity,\n\t\t\t\tthis.$parent.$parent.currentLineItem\n\t\t\t).then(() => {\n\t\t\t\tthis.createNotificationSuccess({\n\t\t\t\t\ttitle: this.$tc('vrpayment-order.refundAction.successTitle'),\n\t\t\t\t\tmessage: this.$tc('vrpayment-order.refundAction.successMessage')\n\t\t\t\t});\n\t\t\t\tthis.isLoading = false;\n\t\t\t\tthis.$emit('modal-close');\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\tthis.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n\t\t\t\t});\n\t\t\t}).catch((errorResponse) => {\n\t\t\t\ttry {\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\ttitle: errorResponse.response.data.errors[0].title,\n\t\t\t\t\t\tmessage: errorResponse.response.data.errors[0].detail,\n\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t});\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\ttitle: errorResponse.title,\n\t\t\t\t\t\tmessage: errorResponse.message,\n\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t});\n\t\t\t\t} finally {\n\t\t\t\t\tthis.isLoading = false;\n\t\t\t\t\tthis.$emit('modal-close');\n\t\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t\tthis.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n});\n","{% block vrpayment_order_action_refund_partial %}\n\n\n\t{% block vrpayment_order_action_refund_amount_partial %}\n\t\t\n\t\t\n\n\t\t
    \n\t\t\t{{ $tc('vrpayment-order.refundAction.maxAvailableAmountToRefund') }}:\n\t\t\t{{ this.$parent.$parent.itemRefundableAmount }}\n\t\t
    \n\t{% endblock %}\n\n\t{% block vrpayment_order_action_refund_confirm_button_partial %}\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-refund-partial', {\n\ttemplate,\n\n\tinject: ['VRPaymentRefundService'],\n\n\tmixins: [\n\t\tMixin.getByName('notification')\n\t],\n\n\tprops: {\n\t\ttransactionData: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\n\t\torderId: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tisLoading: true,\n\t\t\tcurrency: this.transactionData.transactions[0].currency,\n\t\t\trefundAmount: 0.00,\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 createdComponent() {\n this.isLoading = false;\n this.currency = this.transactionData.transactions[0].currency;\n if (!this.refundAmount) {\n this.refundAmount = this.$parent.$parent.itemRefundableAmount;\n }\n },\n\n\t\tcreatePartialRefund(itemUniqueId) {\n\t\t\tthis.isLoading = true;\n\t\t\tthis.VRPaymentRefundService.createPartialRefund(\n\t\t\t\tthis.transactionData.transactions[0].metaData.salesChannelId,\n\t\t\t\tthis.transactionData.transactions[0].id,\n\t\t\t\tthis.refundAmount,\n\t\t\t\titemUniqueId\n\t\t\t).then(() => {\n\t\t\t\tthis.createNotificationSuccess({\n\t\t\t\t\ttitle: this.$tc('vrpayment-order.refundAction.successTitle'),\n\t\t\t\t\tmessage: this.$tc('vrpayment-order.refundAction.successMessage')\n\t\t\t\t});\n\t\t\t\tthis.isLoading = false;\n\t\t\t\tthis.$emit('modal-close');\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\tthis.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n\t\t\t\t});\n\t\t\t}).catch((errorResponse) => {\n\t\t\t\ttry {\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\ttitle: errorResponse.response.data.errors[0].title,\n\t\t\t\t\t\tmessage: errorResponse.response.data.errors[0].detail,\n\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t});\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\ttitle: errorResponse.title,\n\t\t\t\t\t\tmessage: errorResponse.message,\n\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t});\n\t\t\t\t} finally {\n\t\t\t\t\tthis.isLoading = false;\n\t\t\t\t\tthis.$emit('modal-close');\n\t\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t\tthis.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t},\n\n watch: {\n refundAmount(newValue) {\n if (newValue !== null) {\n this.refundAmount = Math.round(newValue * 100) / 100;\n }\n }\n }\n});\n","{% block vrpayment_order_action_refund_by_amount %}\n\n\n\t{% block vrpayment_order_action_refund_amount_by_amount %}\n\t\t\n\t\t\n\t{% endblock %}\n\n\t{% block vrpayment_order_action_refund_confirm_button_by_amount %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n","/* global Shopware */\n\nimport template from './index.html.twig';\n\nconst {Component, Mixin, Filter, Utils} = Shopware;\n\nComponent.register('vrpayment-order-action-refund-by-amount', {\n\ttemplate,\n\n\tinject: ['VRPaymentRefundService'],\n\n\tmixins: [\n\t\tMixin.getByName('notification')\n\t],\n\n\tprops: {\n\t\ttransactionData: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\n\t\torderId: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tisLoading: true,\n\t\t\tcurrency: this.transactionData.transactions[0].currency,\n\t\t\trefundAmount: 0,\n\t\t\trefundableAmount: 0,\n\t\t};\n\t},\n\n\tcomputed: {\n\t\tdateFilter() {\n\t\t\treturn Filter.getByName('date');\n\t\t}\n\t},\n\n\tcreated() {\n\t\tthis.createdComponent();\n\t},\n\n\tmethods: {\n\t\tcreatedComponent() {\n\t\t\tthis.isLoading = false;\n\t\t\tthis.currency = this.transactionData.transactions[0].currency;\n\t\t\tthis.refundAmount = Number(this.transactionData.transactions[0].amountIncludingTax);\n\t\t\tthis.refundableAmount = Number(this.transactionData.transactions[0].amountIncludingTax);\n\t\t},\n\n\t\trefundByAmount() {\n\t\t\tthis.isLoading = true;\n\t\t\tthis.VRPaymentRefundService.createRefundByAmount(\n\t\t\t\tthis.transactionData.transactions[0].metaData.salesChannelId,\n\t\t\t\tthis.transactionData.transactions[0].id,\n\t\t\t\tthis.refundAmount\n\t\t\t).then(() => {\n\t\t\t\tthis.createNotificationSuccess({\n\t\t\t\t\ttitle: this.$tc('vrpayment-order.refundAction.successTitle'),\n\t\t\t\t\tmessage: this.$tc('vrpayment-order.refundAction.successMessage')\n\t\t\t\t});\n\t\t\t\tthis.isLoading = false;\n\t\t\t\tthis.$emit('modal-close');\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\tthis.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n\t\t\t\t});\n\t\t\t}).catch((errorResponse) => {\n\t\t\t\ttry {\n\t\t\t\t\tvar errorTitle;\n\t\t\t\t\tvar errorMessage;\n\t\t\t\t\tif (errorResponse.response.data == 'refundExceedsAmount') {\n\t\t\t\t\t\terrorTitle = this.$tc('vrpayment-order.refundAction.refundExceedsTotalError.title');\n\t\t\t\t\t\terrorMessage = this.$tc('vrpayment-order.refundAction.refundExceedsTotalError.messageRefundAmountExceedsAvailableBalance');\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrorTitle = errorResponse.response.data.errors[0].title;\n\t\t\t\t\t\terrorMessage = errorResponse.response.data.errors[0].detail;\n\t\t\t\t\t}\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\ttitle: errorTitle,\n\t\t\t\t\t\tmessage: errorMessage,\n\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t});\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\ttitle: errorResponse.title,\n\t\t\t\t\t\tmessage: errorResponse.message,\n\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t});\n\t\t\t\t} finally {\n\t\t\t\t\tthis.isLoading = false;\n\t\t\t\t\tthis.$emit('modal-close');\n\t\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t\tthis.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n});\n","{% block vrpayment_order_action_void %}\n\n\n\t{% block vrpayment_order_action_void_amount %}\n {# Review if this v-model:checked=\"isVoid\" needs to change to checked #}\n\t\t\n \n\t{% endblock %}\n\n\t{% block vrpayment_order_action_void_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n","/* global Shopware */\n\nimport template from './index.html.twig';\n\nconst {Component, Mixin, Filter, Utils} = Shopware;\n\nComponent.register('vrpayment-order-action-void', {\n\ttemplate,\n\n\tinject: ['VRPaymentTransactionVoidService'],\n\n\tmixins: [\n\t\tMixin.getByName('notification')\n\t],\n\n\tprops: {\n\t\ttransactionData: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tisLoading: true,\n\t\t\tisVoid: false\n\t\t};\n\t},\n\n\tcomputed: {\n\t\tdateFilter() {\n\t\t\treturn Filter.getByName('date');\n\t\t},\n\t\tlineItemColumns() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tproperty: 'uniqueId',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.refund.types.uniqueId'),\n\t\t\t\t\trawData: false,\n\t\t\t\t\tallowResize: true,\n\t\t\t\t\tprimary: true,\n\t\t\t\t\twidth: 'auto'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'name',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.refund.types.name'),\n\t\t\t\t\trawData: true,\n\t\t\t\t\tallowResize: true,\n\t\t\t\t\tsortable: true,\n\t\t\t\t\twidth: 'auto'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'quantity',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.refund.types.quantity'),\n\t\t\t\t\trawData: true,\n\t\t\t\t\tallowResize: true,\n\t\t\t\t\twidth: 'auto'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'amountIncludingTax',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.refund.types.amountIncludingTax'),\n\t\t\t\t\trawData: true,\n\t\t\t\t\tallowResize: true,\n\t\t\t\t\tinlineEdit: 'string',\n\t\t\t\t\twidth: 'auto'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'type',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.refund.types.type'),\n\t\t\t\t\trawData: true,\n\t\t\t\t\tallowResize: true,\n\t\t\t\t\tsortable: true,\n\t\t\t\t\twidth: 'auto'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'taxAmount',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.refund.types.taxAmount'),\n\t\t\t\t\trawData: true,\n\t\t\t\t\tallowResize: true,\n\t\t\t\t\twidth: 'auto'\n\t\t\t\t}\n\t\t\t];\n\t\t}\n\t},\n\n\tcreated() {\n\t\tthis.createdComponent();\n\t},\n\n\tmethods: {\n\t\tcreatedComponent() {\n\t\t\tthis.isLoading = false;\n\t\t\tthis.currency = this.transactionData.transactions[0].currency;\n\t\t\tthis.refundableAmount = this.transactionData.transactions[0].amountIncludingTax;\n\t\t\tthis.refundAmount = this.transactionData.transactions[0].amountIncludingTax;\n\t\t},\n\n\t\tvoidPayment() {\n\t\t\tif (this.isVoid) {\n\t\t\t\tthis.isLoading = true;\n\t\t\t\tthis.VRPaymentTransactionVoidService.createTransactionVoid(\n\t\t\t\t\tthis.transactionData.transactions[0].metaData.salesChannelId,\n\t\t\t\t\tthis.transactionData.transactions[0].id\n\t\t\t\t).then(() => {\n\t\t\t\t\tthis.createNotificationSuccess({\n\t\t\t\t\t\ttitle: this.$tc('vrpayment-order.voidAction.successTitle'),\n\t\t\t\t\t\tmessage: this.$tc('vrpayment-order.voidAction.successMessage')\n\t\t\t\t\t});\n\t\t\t\t\tthis.isLoading = false;\n\t\t\t\t\tthis.$emit('modal-close');\n\t\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t\tthis.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n\t\t\t\t\t});\n\t\t\t\t}).catch((errorResponse) => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\ttitle: errorResponse.response.data.errors[0].title,\n\t\t\t\t\t\t\tmessage: errorResponse.response.data.errors[0].detail,\n\t\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\ttitle: errorResponse.title,\n\t\t\t\t\t\t\tmessage: errorResponse.message,\n\t\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t\t});\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tthis.isLoading = false;\n\t\t\t\t\t\tthis.$emit('modal-close');\n\t\t\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t\t\tthis.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n});\n","{% block vrpayment_order_detail %}\n
    \n\t
    \n\t\t\n\t\t\t\n\t\t\n\t\t{% block vrpayment_order_transaction_history_card %}\n\t\t\n\t\t\t\n\n\t\t\n\t\t{% endblock %}\n\t\t{% block vrpayment_order_transaction_line_items_card %}\n \n \n \n\t\t{% endblock %}\n\t\t{% block vrpayment_order_transaction_refunds_card %}\n\t\t 0\">\n\t\t\t\n\n\t\t\n\t\t{% endblock %}\n\t\t{% block vrpayment_order_actions_modal_refund_partial %}\n\t\t\t\n\t\t\t\n\t\t{% endblock %}\n\t\t{% block vrpayment_order_actions_modal_refund %}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block vrpayment_order_actions_modal_refund_by_amount %}\n\t\t\t\n\t\t\t\n\t\t{% endblock %}\n\t\t{% block vrpayment_order_actions_modal_completion%}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block vrpayment_order_actions_modal_void %}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t
    \n\t\n
    \n{% endblock %}\n","/* global Shopware */\n\nimport '../../component/vrpayment-order-action-completion';\nimport '../../component/vrpayment-order-action-refund';\nimport '../../component/vrpayment-order-action-refund-partial';\nimport '../../component/vrpayment-order-action-refund-by-amount';\nimport '../../component/vrpayment-order-action-void';\nimport template from './index.html.twig';\nimport './index.scss';\n\nconst {Component, Mixin, Filter, Context, Utils} = Shopware;\nconst Criteria = Shopware.Data.Criteria;\n\nComponent.register('vrpayment-order-detail', {\n\ttemplate,\n\n\tinject: [\n\t\t'VRPaymentTransactionService',\n\t\t'VRPaymentRefundService',\n\t\t'repositoryFactory'\n\t],\n\n\tmixins: [\n\t\tMixin.getByName('notification')\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\ttransactionData: {\n\t\t\t\ttransactions: [],\n\t\t\t\trefunds: []\n\t\t\t},\n\t\t\ttransaction: {},\n\t\t\tlineItems: [],\n\t\t\trefundableQuantity: 0,\n\t\t\titemRefundableQuantity: 0,\n\t\t\tisLoading: true,\n\t\t\torderId: '',\n\t\t\tcurrency: '',\n\t\t\tmodalType: '',\n\t\t\trefundAmount: 0.00,\n\t\t\trefundableAmount: 0.00,\n\t\t\titemRefundedAmount: 0.00,\n\t\t\titemRefundedQuantity: 0,\n\t\t\titemRefundableAmount: 0.00,\n\t\t\tcurrentLineItem: '',\n\t\t\trefundLineItemQuantity: [],\n\t\t\trefundLineItemAmount: [],\n\t\t\tselectedItems: []\n\t\t};\n\t},\n\n\tmetaInfo() {\n\t\treturn {\n\t\t\ttitle: this.$tc('vrpayment-order.header')\n\t\t};\n\t},\n\n\n\tcomputed: {\n\t\tdateFilter() {\n\t\t\treturn Filter.getByName('date');\n\t\t},\n\n\t\trelatedResourceColumns() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tproperty: 'paymentMethodName',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.transactionHistory.types.payment_method'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'state',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.transactionHistory.types.state'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'currency',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.transactionHistory.types.currency'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'authorized_amount',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.transactionHistory.types.authorized_amount'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'id',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.transactionHistory.types.transaction'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'customerId',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.transactionHistory.types.customer'),\n\t\t\t\t\trawData: true\n\t\t\t\t}\n\t\t\t];\n\t\t},\n\n\t\tlineItemColumns() {\n\t\t\treturn [\n\t\t\t // It must be set in order to have correctly working checkbox mechanism\n\t\t\t\t{\n\t\t\t\t\tproperty: 'id',\n\t\t\t\t\trawData: true,\n\t\t\t\t\tvisible: false,\n\t\t\t\t\tprimary: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'uniqueId',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.lineItem.types.uniqueId'),\n\t\t\t\t\trawData: true,\n\t\t\t\t\tvisible: false,\n\t\t\t\t\tprimary: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'name',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.lineItem.types.name'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'quantity',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.lineItem.types.quantity'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'amountIncludingTax',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.lineItem.types.amountIncludingTax'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'type',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.lineItem.types.type'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'taxAmount',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.lineItem.types.taxAmount'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'refundableQuantity',\n\t\t\t\t\trawData: true,\n\t\t\t\t\tvisible: false,\n\t\t\t\t},\n\t\t\t];\n\t\t},\n\n\t\trefundColumns() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tproperty: 'id',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.refund.types.id'),\n\t\t\t\t\trawData: true,\n\t\t\t\t\tvisible: true,\n\t\t\t\t\tprimary: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'amount',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.refund.types.amount'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'state',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.refund.types.state'),\n\t\t\t\t\trawData: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tproperty: 'createdOn',\n\t\t\t\t\tlabel: this.$tc('vrpayment-order.refund.types.createdOn'),\n\t\t\t\t\trawData: true\n\t\t\t\t}\n\t\t\t];\n\t\t}\n\t},\n\n\twatch: {\n\t\t'$route'() {\n\t\t\tthis.resetDataAttributes();\n\t\t\tthis.createdComponent();\n\t\t}\n\t},\n\n\tcreated() {\n\t\tthis.createdComponent();\n\t},\n\n\tmethods: {\n\t\tcreatedComponent() {\n\t\t\tthis.orderId = this.$route.params.id;\n\t\t\tconst orderRepository = this.repositoryFactory.create('order');\n\t\t\tconst orderCriteria = new Criteria(1, 1);\n\t\t\torderCriteria.addAssociation('transactions');\n\t\t\torderCriteria.getAssociation('transactions').addSorting(Criteria.sort('createdAt', 'DESC'));\n\n\t\t\torderRepository.get(this.orderId, Context.api, orderCriteria).then((order) => {\n\t\t\t\tthis.order = order;\n\t\t\t\tthis.isLoading = false;\n\t\t\t\tvar totalAmountTemp = 0;\n\t\t\t\tvar refundsAmountTemp = 0;\n\t\t\t\tconst vrpaymentTransactionId = order.transactions[0].customFields.vrpayment_transaction_id;\n\t\t\t\tthis.VRPaymentTransactionService.getTransactionData(order.salesChannelId, vrpaymentTransactionId)\n\t\t\t\t\t.then((VRPaymentTransaction) => {\n\t\t\t\t\t\tthis.currency = VRPaymentTransaction.transactions[0].currency;\n\n\t\t\t\t\t\tVRPaymentTransaction.transactions[0].authorized_amount = Utils.format.currency(\n\t\t\t\t\t\t\tVRPaymentTransaction.transactions[0].authorizationAmount,\n\t\t\t\t\t\t\tthis.currency\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tVRPaymentTransaction.refunds.forEach((refund) => {\n\t\t\t\t\t\t\trefundsAmountTemp = parseFloat(parseFloat(refundsAmountTemp) + parseFloat(refund.amount));\n\t\t\t\t\t\t\trefund.amount = Utils.format.currency(\n\t\t\t\t\t\t\t\trefund.amount,\n\t\t\t\t\t\t\t\tthis.currency\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\trefund.reductions.forEach((reduction) => {\n\t\t\t\t\t\t\t if (reduction.quantityReduction > 0) {\n if (this.refundLineItemQuantity[reduction.lineItemUniqueId] === undefined) {\n this.refundLineItemQuantity[reduction.lineItemUniqueId] = reduction.quantityReduction;\n } else {\n this.refundLineItemQuantity[reduction.lineItemUniqueId] += reduction.quantityReduction;\n }\n\t\t\t\t\t\t\t }\n if (reduction.unitPriceReduction > 0) {\n if (this.refundLineItemAmount[reduction.lineItemUniqueId] === undefined) {\n this.refundLineItemAmount[reduction.lineItemUniqueId] = reduction.unitPriceReduction;\n } else {\n this.refundLineItemAmount[reduction.lineItemUniqueId] += reduction.unitPriceReduction;\n }\n }\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tVRPaymentTransaction.transactions[0].lineItems.forEach((lineItem) => {\n\t\t\t\t\t\t\tif (!lineItem.id) {\n\t\t\t\t\t\t\t\tlineItem.id = lineItem.uniqueId;\n }\n\n lineItem.itemRefundedAmount = parseFloat(this.refundLineItemAmount[lineItem.uniqueId] || 0) * parseInt(lineItem.quantity);\n lineItem.amountIncludingTax = parseFloat(lineItem.amountIncludingTax) || 0;\n\n lineItem.itemRefundedQuantity = parseInt(this.refundLineItemQuantity[lineItem.uniqueId]) || 0;\n lineItem.refundableAmount = parseFloat(\n (lineItem.amountIncludingTax - lineItem.itemRefundedAmount).toFixed(2)\n );\n\n\t\t\t\t\t\t\tlineItem.amountIncludingTax = Utils.format.currency(\n\t\t\t\t\t\t\t\tlineItem.amountIncludingTax,\n\t\t\t\t\t\t\t\tthis.currency\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tlineItem.taxAmount = Utils.format.currency(\n\t\t\t\t\t\t\t\tlineItem.taxAmount,\n\t\t\t\t\t\t\t\tthis.currency\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\ttotalAmountTemp = parseFloat(parseFloat(totalAmountTemp) + parseFloat(lineItem.unitPriceIncludingTax * lineItem.quantity));\n\n\t\t\t\t\t\t\tlineItem.refundableQuantity = parseInt(\n\t\t\t\t\t\t\t\tparseInt(lineItem.quantity) - parseInt(this.refundLineItemQuantity[lineItem.uniqueId] || 0)\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tthis.lineItems = VRPaymentTransaction.transactions[0].lineItems;\n\t\t\t\t\t\tthis.transactionData = VRPaymentTransaction;\n\t\t\t\t\t\tthis.transaction = this.transactionData.transactions[0];\n\t\t\t\t\t\tthis.refundAmount = Number(this.transactionData.transactions[0].amountIncludingTax);\n\t\t\t\t\t\tthis.refundableAmount = parseFloat(parseFloat(totalAmountTemp) - parseFloat(refundsAmountTemp));\n\n\t\t\t\t\t}).catch((errorResponse) => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\ttitle: this.$tc('vrpayment-order.paymentDetails.error.title'),\n\t\t\t\t\t\t\tmessage: errorResponse.message,\n\t\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\ttitle: this.$tc('vrpayment-order.paymentDetails.error.title'),\n\t\t\t\t\t\t\tmessage: errorResponse.message,\n\t\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t\t});\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tthis.isLoading = false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tdownloadPackingSlip() {\n\t\t\twindow.open(\n\t\t\t\tthis.VRPaymentTransactionService.getPackingSlip(\n\t\t\t\t\tthis.transaction.metaData.salesChannelId,\n\t\t\t\t\tthis.transaction.id\n\t\t\t\t),\n\t\t\t\t'_blank'\n\t\t\t);\n\t\t},\n\n\t\tdownloadInvoice() {\n\t\t\twindow.open(\n\t\t\t\tthis.VRPaymentTransactionService.getInvoiceDocument(\n\t\t\t\t\tthis.transaction.metaData.salesChannelId,\n\t\t\t\t\tthis.transaction.id\n\t\t\t\t),\n\t\t\t\t'_blank'\n\t\t\t);\n\t\t},\n\n\t\tresetDataAttributes() {\n\t\t\tthis.transactionData = {\n\t\t\t\ttransactions: [],\n\t\t\t\trefunds: []\n\t\t\t};\n\t\t\tthis.lineItems = [];\n\t\t\tthis.refundLineItemQuantity = [];\n\t\t\tthis.refundLineItemAmount = [];\n\t\t\tthis.isLoading = true;\n\t\t},\n\n\t\tspawnModal(modalType, lineItemId, refundableQuantity, itemRefundableAmount) {\n\t\t\tthis.modalType = modalType;\n\t\t\tthis.currentLineItem = lineItemId;\n\t\t\tthis.itemRefundableQuantity = refundableQuantity;\n this.itemRefundableAmount = !isNaN(itemRefundableAmount) ? Math.round(itemRefundableAmount * 100) / 100 : 0;\n\t\t},\n\n\t\tcloseModal() {\n\t\t\tthis.modalType = '';\n\t\t},\n\n\t\tlineItemRefund(lineItemId) {\n\t\t\tthis.isLoading = true;\n\t\t\tthis.VRPaymentRefundService.createRefund(\n\t\t\t\tthis.transactionData.transactions[0].metaData.salesChannelId,\n\t\t\t\tthis.transactionData.transactions[0].id,\n\t\t\t\t0,\n\t\t\t\tlineItemId\n\t\t\t).then(() => {\n\t\t\t\tthis.createNotificationSuccess({\n\t\t\t\t\ttitle: this.$tc('vrpayment-order.refundAction.successTitle'),\n\t\t\t\t\tmessage: this.$tc('vrpayment-order.refundAction.successMessage')\n\t\t\t\t});\n this.isLoading = false;\n this.$emit('modal-close');\n this.$nextTick(() => {\n this.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n });\n\t\t\t}).catch((errorResponse) => {\n\t\t\t\ttry {\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\ttitle: errorResponse.response.data.errors[0].title,\n\t\t\t\t\t\tmessage: errorResponse.response.data.errors[0].detail,\n\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t});\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\ttitle: errorResponse.title,\n\t\t\t\t\t\tmessage: errorResponse.response.data,\n\t\t\t\t\t\tautoClose: false\n\t\t\t\t\t});\n\t\t\t\t} finally {\n this.isLoading = false;\n this.$emit('modal-close');\n this.$nextTick(() => {\n this.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n });\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tisSelectable(item) {\n\t\t\treturn item.refundableQuantity > 0 && item.refundableAmount > 0 && item.itemRefundedAmount == 0 && item.itemRefundedQuantity == 0;\n\t\t},\n\t\tonSelectionChanged(selection) {\n\t\t\tthis.selectedItems = Object.values(selection);\n\t\t},\n onPerformBulkAction() {\n if (this.selectedItems.length) {\n // Set isLoading to true to show the loader\n this.isLoading = true;\n\n // Force the DOM to update before proceeding with the asynchronous operations\n this.$nextTick(() => {\n const refundPromises = this.selectedItems.map((item) => {\n return this.lineItemRefundBulk(item.uniqueId); // Simulated refund action with delay\n });\n\n // Wait for all refund promises to complete\n Promise.all(refundPromises)\n .then(() => {\n // Once all promises are resolved, hide the loader and close the modal\n this.isLoading = false;\n this.$emit('modal-close');\n this.$nextTick(() => {\n this.$router.replace(`${this.$route.path}?hash=${Utils.createId()}`);\n });\n })\n .catch((error) => {\n // Handle any errors during the refund process\n this.createNotificationError({\n title: 'Error',\n message: 'Something went wrong with the refunds',\n autoClose: false\n });\n this.isLoading = false; // Ensure the loader is hidden even on error\n });\n });\n }\n },\n lineItemRefundBulk(lineItemId) {\n return new Promise((resolve, reject) => {\n this.VRPaymentRefundService.createRefund(\n this.transactionData.transactions[0].metaData.salesChannelId,\n this.transactionData.transactions[0].id,\n 0,\n lineItemId\n )\n .then(() => {\n this.createNotificationSuccess({\n title: this.$tc('vrpayment-order.refundAction.successTitle'),\n message: this.$tc('vrpayment-order.refundAction.successMessage')\n });\n resolve();\n })\n .catch((errorResponse) => {\n try {\n this.createNotificationError({\n title: errorResponse.response.data.errors[0].title,\n message: errorResponse.response.data.errors[0].detail,\n autoClose: false\n });\n } catch (e) {\n this.createNotificationError({\n title: errorResponse.title,\n message: errorResponse.response.data,\n autoClose: false\n });\n } finally {\n reject();\n }\n });\n });\n },\n\t}\n});\n","/* global Shopware */\n\nimport './extension/sw-order';\nimport './page/vrpayment-order-detail';\n\nimport deDE from './snippet/de-DE.json';\nimport enGB from './snippet/en-GB.json';\nimport frFR from './snippet/fr-FR.json';\nimport itIT from './snippet/it-IT.json';\n\nconst {Module} = Shopware;\n\nModule.register('vrpayment-order', {\n\ttype: 'plugin',\n\tname: 'VRPayment',\n\ttitle: 'vrpayment-order.general.title',\n\tdescription: 'vrpayment-order.general.descriptionTextModule',\n\tversion: '1.0.1',\n\ttargetVersion: '1.0.1',\n\tcolor: '#2b52ff',\n\n\tsnippets: {\n\t\t'de-DE': deDE,\n\t\t'en-GB': enGB,\n\t\t'fr-FR': frFR,\n\t\t'it-IT': itIT\n\t},\n\n\trouteMiddleware(next, currentRoute) {\n\t\tif (currentRoute.name === 'sw.order.detail') {\n\t\t\tcurrentRoute.children.push({\n\t\t\t\tcomponent: 'vrpayment-order-detail',\n\t\t\t\tname: 'vrpayment.order.detail',\n\t\t\t\tisChildren: true,\n\t\t\t\tpath: '/sw/order/vrpayment/detail/:id'\n\t\t\t});\n\t\t}\n\t\tnext(currentRoute);\n\t}\n});\n","Shopware.Service('privileges').addPrivilegeMappingEntry({\n category: 'permissions',\n parent: 'vrpayment',\n key: 'vrpayment',\n roles: {\n viewer: {\n privileges: [\n 'sales_channel:read',\n 'sales_channel_payment_method:read',\n 'system_config:read'\n ],\n dependencies: []\n },\n editor: {\n privileges: [\n 'sales_channel:update',\n 'sales_channel_payment_method:create',\n 'sales_channel_payment_method:update',\n 'system_config:update',\n 'system_config:create',\n 'system_config:delete'\n ],\n dependencies: [\n 'vrpayment.viewer'\n ]\n }\n }\n});\n\nShopware.Service('privileges').addPrivilegeMappingEntry({\n category: 'permissions',\n parent: null,\n key: 'sales_channel',\n roles: {\n viewer: {\n privileges: [\n 'sales_channel_payment_method:read'\n ]\n },\n editor: {\n privileges: [\n 'payment_method:update'\n ]\n },\n creator: {\n privileges: [\n 'payment_method:create',\n 'shipping_method:create',\n 'delivery_time:create'\n ]\n },\n deleter: {\n privileges: [\n 'payment_method:delete'\n ]\n }\n }\n});\n","{% block vrpayment_settings %}\n\n\n\t{% block vrpayment_settings_header %}\n\t\n\t{% endblock %}\n\n\t{% block vrpayment_settings_actions %}\n\t\n\t{% endblock %}\n\n\t{% block vrpayment_settings_content %}\n\t\n\t{% endblock %}\n\n{% endblock %}\n","export const CONFIG_DOMAIN = 'VRPaymentPayment.config';\nexport const CONFIG_APPLICATION_KEY = CONFIG_DOMAIN + '.' + 'applicationKey';\nexport const CONFIG_EMAIL_ENABLED = CONFIG_DOMAIN + '.' + 'emailEnabled';\nexport const CONFIG_INTEGRATION = CONFIG_DOMAIN + '.' + 'integration';\nexport const CONFIG_LINE_ITEM_CONSISTENCY_ENABLED = CONFIG_DOMAIN + '.' + 'lineItemConsistencyEnabled';\nexport const CONFIG_SPACE_ID = CONFIG_DOMAIN + '.' + 'spaceId';\nexport const CONFIG_SPACE_VIEW_ID = CONFIG_DOMAIN + '.' + 'spaceViewId';\nexport const CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED = CONFIG_DOMAIN + '.' + 'storefrontInvoiceDownloadEnabled';\nexport const CONFIG_USER_ID = CONFIG_DOMAIN + '.' + 'userId';\nexport const CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED = CONFIG_DOMAIN + '.' + 'storefrontWebhooksUpdateEnabled';\nexport const CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED = CONFIG_DOMAIN + '.' + 'storefrontPaymentsUpdateEnabled';\n\nexport default {\n CONFIG_DOMAIN,\n CONFIG_APPLICATION_KEY,\n CONFIG_EMAIL_ENABLED,\n CONFIG_INTEGRATION,\n CONFIG_LINE_ITEM_CONSISTENCY_ENABLED,\n CONFIG_SPACE_ID,\n CONFIG_SPACE_VIEW_ID,\n CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED,\n CONFIG_USER_ID,\n CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED,\n CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED\n};","/* global Shopware */\n\nimport template from './index.html.twig';\nimport constants from './configuration-constants';\n\nconst {Component, Mixin} = Shopware;\n\nComponent.register('vrpayment-settings', {\n\n template: template,\n\n inject: [\n 'acl',\n 'VRPaymentConfigurationService'\n ],\n\n mixins: [\n Mixin.getByName('notification'),\n Mixin.getByName('sw-inline-snippet')\n ],\n\n data() {\n return {\n\n config: {},\n\n isLoading: false,\n isTesting: false,\n\n isSaveSuccessful: false,\n\n applicationKeyFilled: false,\n applicationKeyErrorState: false,\n\n spaceIdFilled: false,\n spaceIdErrorState: false,\n\n userIdFilled: false,\n userIdErrorState: false,\n\n isSetDefaultPaymentSuccessful: false,\n isSettingDefaultPaymentMethods: false,\n\n configIntegrationDefaultValue: 'payment_page',\n configEmailEnabledDefaultValue: true,\n configLineItemConsistencyEnabledDefaultValue: true,\n configStorefrontInvoiceDownloadEnabledEnabledDefaultValue: true,\n configStorefrontWebhooksUpdateEnabledDefaultValue: true,\n configStorefrontPaymentsUpdateEnabledDefaultValue: true,\n\n ...constants\n };\n },\n\n props: {\n isLoading: {\n type: Boolean,\n required: true\n }\n },\n\n metaInfo() {\n return {\n title: this.$createTitle()\n };\n },\n\n watch: {\n config: {\n handler(configData) {\n const defaultConfig = this.$refs.configComponent.allConfigs.null;\n const salesChannelId = this.$refs.configComponent.selectedSalesChannelId;\n if (salesChannelId === null) {\n\n this.applicationKeyFilled = !!this.config[this.CONFIG_APPLICATION_KEY];\n this.spaceIdFilled = !!this.config[this.CONFIG_SPACE_ID];\n this.userIdFilled = !!this.config[this.CONFIG_USER_ID];\n\n if (!(this.CONFIG_INTEGRATION in this.config)) {\n this.config[this.CONFIG_INTEGRATION] = this.configIntegrationDefaultValue;\n }\n\n if (!(this.CONFIG_EMAIL_ENABLED in this.config)) {\n this.config[this.CONFIG_EMAIL_ENABLED] = this.configEmailEnabledDefaultValue;\n }\n\n if (!(this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED in this.config)) {\n this.config[this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED] = this.configLineItemConsistencyEnabledDefaultValue;\n }\n\n if (!(this.CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED in this.config)) {\n this.config[this.CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED] = this.configStorefrontInvoiceDownloadEnabledEnabledDefaultValue;\n }\n\n if (!(this.CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED in this.config)) {\n this.config[this.CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED] = this.configStorefrontWebhooksUpdateEnabledDefaultValue;\n }\n\n if (!(this.CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED in this.config)) {\n this.config[this.CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED] = this.configStorefrontPaymentsUpdateEnabledDefaultValue;\n }\n\n } else {\n\n this.applicationKeyFilled = !!this.config[this.CONFIG_APPLICATION_KEY] || !!defaultConfig[this.CONFIG_APPLICATION_KEY];\n this.spaceIdFilled = !!this.config[this.CONFIG_SPACE_ID] || !!defaultConfig[this.CONFIG_SPACE_ID];\n this.userIdFilled = !!this.config[this.CONFIG_USER_ID] || !!defaultConfig[this.CONFIG_USER_ID];\n\n\n if (!(this.CONFIG_INTEGRATION in this.config) || !(this.CONFIG_INTEGRATION in defaultConfig)) {\n this.config[this.CONFIG_INTEGRATION] = this.configIntegrationDefaultValue;\n }\n\n if (!(this.CONFIG_EMAIL_ENABLED in this.config) || !(this.CONFIG_EMAIL_ENABLED in defaultConfig)) {\n this.config[this.CONFIG_EMAIL_ENABLED] = this.configEmailEnabledDefaultValue;\n }\n\n if (!(this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED in this.config) || !(this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED in defaultConfig)) {\n this.config[this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED] = this.configLineItemConsistencyEnabledDefaultValue;\n }\n\n if (!(this.CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED in this.config) || !(this.CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED in defaultConfig)) {\n this.config[this.CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED] = this.configStorefrontInvoiceDownloadEnabledEnabledDefaultValue;\n }\n\n if (!(this.CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED in this.config) || !(this.CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED in defaultConfig)) {\n this.config[this.CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED] = this.configStorefrontWebhooksUpdateEnabledDefaultValue;\n }\n\n if (!(this.CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED in this.config) || !(this.CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED in defaultConfig)) {\n this.config[this.CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED] = this.configStorefrontPaymentsUpdateEnabledDefaultValue;\n }\n }\n\n this.$emit('salesChannelChanged');\n this.$emit('update:value', configData);\n },\n deep: true\n }\n },\n\n methods: {\n checkTextFieldInheritance(value) {\n if (typeof value !== 'string') {\n return true;\n }\n\n return value.length <= 0;\n },\n\n checkNumberFieldInheritance(value) {\n if (typeof value !== 'number') {\n return true;\n }\n\n return value.length <= 0;\n },\n\n checkBoolFieldInheritance(value) {\n return typeof value !== 'boolean';\n },\n\n getInheritValue(key) {\n if (this.selectedSalesChannelId == null ) {\n return this.actualConfigData[key];\n } else {\n return this.allConfigs['null'][key];\n }\n },\n\n onSave() {\n if (!(this.spaceIdFilled && this.userIdFilled && this.applicationKeyFilled)) {\n this.setErrorStates();\n return;\n }\n this.save();\n },\n\n save() {\n this.isLoading = true;\n\n this.$refs.configComponent.save().then((res) => {\n if (res) {\n this.config = res;\n }\n this.registerWebHooks();\n this.synchronizePaymentMethodConfiguration();\n this.installOrderDeliveryStates();\n }).catch((e) => {\n console.error('Error:', e);\n this.isLoading = false;\n });\n },\n\n registerWebHooks() {\n if (this.config[this.CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED] === false) {\n return false;\n }\n\n this.VRPaymentConfigurationService.registerWebHooks(this.$refs.configComponent.selectedSalesChannelId)\n .then(() => {\n this.createNotificationSuccess({\n title: this.$tc('vrpayment-settings.settingForm.titleSuccess'),\n message: this.$tc('vrpayment-settings.settingForm.messageWebHookUpdated')\n });\n }).catch((e) => {\n this.createNotificationError({\n title: this.$tc('vrpayment-settings.settingForm.titleError'),\n message: this.$tc('vrpayment-settings.settingForm.messageWebHookError')\n });\n this.isLoading = false;\n console.error('Error:', e);\n });\n },\n\n synchronizePaymentMethodConfiguration() {\n if (this.config[this.CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED] === false) {\n return false;\n }\n\n this.VRPaymentConfigurationService.synchronizePaymentMethodConfiguration(this.$refs.configComponent.selectedSalesChannelId)\n .then(() => {\n this.createNotificationSuccess({\n title: this.$tc('vrpayment-settings.settingForm.titleSuccess'),\n message: this.$tc('vrpayment-settings.settingForm.messagePaymentMethodConfigurationUpdated')\n });\n this.isLoading = false;\n }).catch((e) => {\n this.createNotificationError({\n title: this.$tc('vrpayment-settings.settingForm.titleError'),\n message: this.$tc('vrpayment-settings.settingForm.messagePaymentMethodConfigurationError')\n });\n this.isLoading = false;\n console.error('Error:', e);\n });\n },\n\n installOrderDeliveryStates(){\n this.VRPaymentConfigurationService.installOrderDeliveryStates()\n .then(() => {\n this.createNotificationSuccess({\n title: this.$tc('vrpayment-settings.settingForm.titleSuccess'),\n message: this.$tc('vrpayment-settings.settingForm.messageOrderDeliveryStateUpdated')\n });\n this.isLoading = false;\n }).catch(() => {\n this.createNotificationError({\n title: this.$tc('vrpayment-settings.settingForm.titleError'),\n message: this.$tc('vrpayment-settings.settingForm.messageOrderDeliveryStateError')\n });\n this.isLoading = false;\n });\n },\n\n onSetPaymentMethodDefault() {\n this.isSettingDefaultPaymentMethods = true;\n this.VRPaymentConfigurationService.setVRPaymentAsSalesChannelPaymentDefault(\n this.$refs.configComponent.selectedSalesChannelId\n ).then(() => {\n this.isSettingDefaultPaymentMethods = false;\n this.isSetDefaultPaymentSuccessful = true;\n this.createNotificationSuccess({\n title: this.$tc('vrpayment-settings.settingForm.titleSuccess'),\n message: this.$tc('vrpayment-settings.salesChannelCard.messageDefaultPaymentUpdated')\n });\n });\n },\n\n setErrorStates() {\n const messageNotBlankErrorState = {\n code: 1,\n detail: this.$tc('vrpayment-settings.messageNotBlank')\n };\n\n if (!this.spaceIdFilled) {\n this.spaceIdErrorState = messageNotBlankErrorState;\n }\n\n if (!this.userIdFilled) {\n this.userIdErrorState = messageNotBlankErrorState;\n }\n\n if (!this.applicationKeyFilled) {\n this.applicationKeyErrorState = messageNotBlankErrorState;\n }\n },\n\n // Handles the 'check-api-connection-event'.\n // Uses the provided apiConnectionData to perform API connection checks.\n onCheckApiConnection(apiConnectionData) {\n const { spaceId, userId, applicationKey } = apiConnectionData;\n this.isTesting = true;\n\n this.VRPaymentConfigurationService.checkApiConnection(spaceId, userId, applicationKey)\n .then((res) => {\n if (res.result === 200) {\n this.createNotificationSuccess({\n title: this.$tc('vrpayment-settings.settingForm.credentials.alert.title'),\n message: this.$tc('vrpayment-settings.settingForm.credentials.alert.successMessage')\n });\n } else {\n this.createNotificationError({\n title: this.$tc('vrpayment-settings.settingForm.credentials.alert.title'),\n message: this.$tc('vrpayment-settings.settingForm.credentials.alert.errorMessage')\n });\n }\n this.isTesting = false;\n }).catch(() => {\n this.createNotificationError({\n title: this.$tc('vrpayment-settings.settingForm.credentials.alert.title'),\n message: this.$tc('vrpayment-settings.settingForm.credentials.alert.errorMessage')\n });\n this.isTesting = false;\n });\n }\n }\n});\n","{% block vrpayment_settings_content_card_channel_config_credentials %}\n\t\n\n\t\t{% block vrpayment_settings_content_card_channel_config_credentials_card_container %}\n\t\t\t\n\n\t\t\t\t{% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings %}\n\t\t\t\t\t
    \n\n\t\t\t\t\t\t{% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings_space_id %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings_user_id %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings_application_key %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\t\t\t\t\t
    \n\t\t\t\t{% endblock %}\n\n\t\t\t\t{% verbatim %}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{{ $tc('vrpayment-settings.settingForm.credentials.button.label') }}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{% endverbatim %}\n\n\t\t\t
    \n\t\t{% endblock %}\n\t\n\n{% endblock %}\n","/* global Shopware */\n\nimport template from './index.html.twig';\nimport constants from '../../page/vrpayment-settings/configuration-constants'\n\nconst {Component, Mixin} = Shopware;\n\nComponent.register('sw-vrpayment-credentials', {\n template: template,\n\n name: 'VRPaymentCredentials',\n\n inject: [\n 'acl'\n ],\n\n mixins: [\n Mixin.getByName('notification')\n ],\n\n props: {\n actualConfigData: {\n type: Object,\n required: true\n },\n allConfigs: {\n type: Object,\n required: true\n },\n\n selectedSalesChannelId: {\n required: true\n },\n spaceIdFilled: {\n type: Boolean,\n required: true\n },\n spaceIdErrorState: {\n required: true\n },\n userIdFilled: {\n type: Boolean,\n required: true\n },\n userIdErrorState: {\n required: true\n },\n applicationKeyFilled: {\n type: Boolean,\n required: true\n },\n applicationKeyErrorState: {\n required: true\n },\n isLoading: {\n type: Boolean,\n required: true\n },\n isTesting: {\n type: Boolean,\n required: false\n }\n },\n\n data() {\n return {\n ...constants\n };\n },\n\n methods: {\n\n checkTextFieldInheritance(value) {\n if (typeof value !== 'string') {\n return true;\n }\n\n return value.length <= 0;\n },\n\n checkNumberFieldInheritance(value) {\n if (typeof value !== 'number') {\n return true;\n }\n\n return value.length <= 0;\n },\n\n checkBoolFieldInheritance(value) {\n return typeof value !== 'boolean';\n },\n\n // Emits the 'check-api-connection-event' with the current API connection parameters.\n // Used to trigger API connection testing from this component.\n emitCheckApiConnectionEvent() {\n const apiConnectionParams = {\n spaceId: this.actualConfigData[constants.CONFIG_SPACE_ID],\n userId: this.actualConfigData[constants.CONFIG_USER_ID],\n applicationKey: this.actualConfigData[constants.CONFIG_APPLICATION_KEY]\n };\n\n this.$emit('check-api-connection-event', apiConnectionParams);\n }\n }\n});\n","{% block vrpayment_settings_content_card_channel_config_options %}\n\t\n\n\t\t{% block vrpayment_settings_content_card_channel_config_credentials_card_container %}\n\t\t\t\n\n\t\t\t\t{% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings %}\n\t\t\t\t\t
    \n\n\t\t\t\t\t\t{% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings_space_view_id %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings_integration %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings_line_item_consistency_enabled %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings_email_enabled %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\t\t\t\t\t
    \n\t\t\t\t{% endblock %}\n\t\t\t
    \n\t\t{% endblock %}\n\t
    \n\n{% endblock %}\n","/* global Shopware */\n\nimport template from './index.html.twig';\nimport constants from '../../page/vrpayment-settings/configuration-constants'\n\nconst {Component, Mixin} = Shopware;\n\nComponent.register('sw-vrpayment-options', {\n\ttemplate: template,\n\n\tname: 'VRPaymentOptions',\n\n\tmixins: [\n\t\tMixin.getByName('notification')\n\t],\n\n\tprops: {\n\t\tactualConfigData: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tallConfigs: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tselectedSalesChannelId: {\n\t\t\trequired: true\n\t\t},\n\t\tisLoading: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t...constants\n\t\t};\n\t},\n\n\tcomputed: {\n\t\tintegrationOptions() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tid: 'payment_page',\n\t\t\t\t\tname: this.$tc('vrpayment-settings.settingForm.options.integration.options.payment_page')\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'iframe',\n\t\t\t\t\tname: this.$tc('vrpayment-settings.settingForm.options.integration.options.iframe')\n\t\t\t\t}\n\t\t\t];\n\t\t}\n\t},\n\n\tmethods: {\n\t\tcheckTextFieldInheritance(value) {\n\t\t\tif (typeof value !== 'string') {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn value.length <= 0;\n\t\t},\n\n\t\tcheckNumberFieldInheritance(value) {\n\t\t\tif (typeof value !== 'number') {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn value.length <= 0;\n\t\t},\n\n\t\tcheckBoolFieldInheritance(value) {\n\t\t\treturn typeof value !== 'boolean';\n\t\t}\n\t}\n});\n","{% block vrpayment_settings_icon %}\n \n \n\n\n\t\n\n\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\n\n \n{% endblock %}\n","import template from './index.html.twig';\n\nconst { Component } = Shopware;\n\nComponent.register('sw-vrpayment-settings-icon', {\n template\n});\n","\n\t\n\t\t
    \n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
    \n\t
    \n
    \n\n","/* global Shopware */\n\nimport template from './index.html.twig';\nimport constants from '../../page/vrpayment-settings/configuration-constants'\n\nconst {Component, Mixin} = Shopware;\n\nComponent.register('sw-vrpayment-storefront-options', {\n\ttemplate: template,\n\n\tname: 'VRPaymentStorefrontOptions',\n\n\tmixins: [\n\t\tMixin.getByName('notification')\n\t],\n\n\tprops: {\n\t\tactualConfigData: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tallConfigs: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tselectedSalesChannelId: {\n\t\t\trequired: true\n\t\t},\n\t\tisLoading: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t...constants\n\t\t};\n\t},\n\n\tmethods: {\n\t\tcheckTextFieldInheritance(value) {\n\t\t\tif (typeof value !== 'string') {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn value.length <= 0;\n\t\t},\n\n\t\tcheckNumberFieldInheritance(value) {\n\t\t\tif (typeof value !== 'number') {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn value.length <= 0;\n\t\t},\n\n\t\tcheckBoolFieldInheritance(value) {\n\t\t\treturn typeof value !== 'boolean';\n\t\t}\n\t}\n});\n","\n\t\n\t\t
    \n\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
    \n\t
    \n
    \n\n","/* global Shopware */\n\nimport template from './index.html.twig';\nimport constants from '../../page/vrpayment-settings/configuration-constants'\n\nconst {Component, Mixin} = Shopware;\n\nComponent.register('sw-vrpayment-advanced-options', {\n\ttemplate: template,\n\n\tname: 'VRPaymentAdvancedOptions',\n\n\tinject: [\n\t\t'acl'\n\t],\n\n\tmixins: [\n\t\tMixin.getByName('notification')\n\t],\n\n\tprops: {\n\t\tactualConfigData: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tallConfigs: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tselectedSalesChannelId: {\n\t\t\trequired: true\n\t\t},\n\t\tisLoading: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t...constants\n\t\t};\n\t},\n\n\tmethods: {\n\t\tcheckTextFieldInheritance(value) {\n\t\t\tif (typeof value !== 'string') {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn value.length <= 0;\n\t\t},\n\n\t\tcheckNumberFieldInheritance(value) {\n\t\t\tif (typeof value !== 'number') {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn value.length <= 0;\n\t\t},\n\n\t\tcheckBoolFieldInheritance(value) {\n\t\t\treturn typeof value !== 'boolean';\n\t\t}\n\t}\n});\n","/* global Shopware */\n\nimport './acl';\nimport './page/vrpayment-settings';\nimport './component/sw-vrpayment-credentials';\nimport './component/sw-vrpayment-options';\nimport './component/sw-vrpayment-settings-icon';\nimport './component/sw-vrpayment-storefront-options';\nimport './component/sw-vrpayment-advanced-options';\n\nimport deDE from './snippet/de-DE.json';\nimport enGB from './snippet/en-GB.json';\nimport frFR from './snippet/fr-FR.json';\nimport itIT from './snippet/it-IT.json';\n\nconst {Module} = Shopware;\n\nModule.register('vrpayment-settings', {\n\ttype: 'plugin',\n\tname: 'VRPayment',\n\ttitle: 'vrpayment-settings.general.descriptionTextModule',\n\tdescription: 'vrpayment-settings.general.descriptionTextModule',\n\tcolor: '#28d8ff',\n\ticon: 'default-action-settings',\n\tversion: '1.0.1',\n\ttargetVersion: '1.0.1',\n\n snippets: {\n 'de-DE': deDE,\n 'en-GB': enGB,\n 'fr-FR': frFR,\n 'it-IT': itIT,\n },\n\n\troutes: {\n\t\tindex: {\n\t\t\tcomponent: 'vrpayment-settings',\n\t\t\tpath: 'index',\n\t\t\tmeta: {\n\t\t\t\tparentPath: 'sw.settings.index',\n\t\t\t\tprivilege: 'vrpayment.viewer'\n\t\t\t},\n\t\t\tprops: {\n default: (route) => {\n return {\n hash: route.params.hash,\n };\n },\n },\n\t\t}\n\t},\n\n\tsettingsItem: {\n\t\tgroup: 'plugins',\n\t\tto: 'vrpayment.settings.index',\n\t\ticonComponent: 'sw-vrpayment-settings-icon',\n\t\tbackgroundEnabled: true,\n\t\tprivilege: 'vrpayment.viewer'\n\t}\n\n});\n","/* global Shopware */\n\nconst ApiService = Shopware.Classes.ApiService;\n\n/**\n * @class VRPaymentPayment\\Core\\Api\\Config\\Controller\\ConfigurationController\n */\nclass VRPaymentConfigurationService extends ApiService {\n\n\t/**\n\t * VRPaymentConfigurationService constructor\n\t *\n\t * @param httpClient\n\t * @param loginService\n\t * @param apiEndpoint\n\t */\n\tconstructor(httpClient, loginService, apiEndpoint = 'vrpayment') {\n\t\tsuper(httpClient, loginService, apiEndpoint);\n\t}\n\n\t/**\n\t * Register web hooks\n\t *\n\t * @param {String|null} salesChannelId\n\t * @return {*}\n\t */\n\tregisterWebHooks(salesChannelId = null) {\n\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/configuration/register-web-hooks`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tsalesChannelId: salesChannelId\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n\n\t/**\n\t * Test API connection\n\t *\n\t * @param {int|null} spaceId\n\t * @param {int|null} userId\n\t * @param {String|null} applicationId\n\t * @return {*}\n\t */\n\tcheckApiConnection(spaceId = null, userId = null, applicationId = null) {\n\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/configuration/check-api-connection`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tspaceId: spaceId,\n\t\t\t\tuserId: userId,\n\t\t\t\tapplicationId: applicationId\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n\n\t/**\n\t * Set's the default payment method to VRPayment for the given salesChannel id.\n\t *\n\t * @param {String|null} salesChannelId\n\t *\n\t * @returns {Promise}\n\t */\n\tsetVRPaymentAsSalesChannelPaymentDefault(salesChannelId = null) {\n\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/configuration/set-vrpayment-as-sales-channel-payment-default`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tsalesChannelId: salesChannelId\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n\n\t/**\n\t *\n\t * @param salesChannelId\n\t * @return {Promise}\n\t */\n\tsynchronizePaymentMethodConfiguration(salesChannelId = null) {\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/configuration/synchronize-payment-method-configuration`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tsalesChannelId: salesChannelId\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n\n\t/**\n\t *\n\t * @return {*}\n\t */\n\tinstallOrderDeliveryStates() {\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/configuration/install-order-delivery-states`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n}\n\nexport default VRPaymentConfigurationService;\n","/* global Shopware */\n\nconst ApiService = Shopware.Classes.ApiService;\n\n/**\n * @class VRPaymentPayment\\Core\\Api\\Transaction\\Controller\\RefundController\n */\nclass VRPaymentRefundService extends ApiService {\n\n\t/**\n\t * VRPaymentRefundService constructor\n\t *\n\t * @param httpClient\n\t * @param loginService\n\t * @param apiEndpoint\n\t */\n\tconstructor(httpClient, loginService, apiEndpoint = 'vrpayment') {\n\t\tsuper(httpClient, loginService, apiEndpoint);\n\t}\n\n\t/**\n\t * Refund a transaction\n\t *\n\t * @param {String} salesChannelId\n\t * @param {int} transactionId\n\t * @param {int} quantity\n\t * @param {int} lineItemId\n\t * @return {*}\n\t */\n\tcreateRefund(salesChannelId, transactionId, quantity, lineItemId) {\n\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/refund/create-refund/`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tsalesChannelId: salesChannelId,\n\t\t\t\ttransactionId: transactionId,\n\t\t\t\tquantity: quantity,\n\t\t\t\tlineItemId: lineItemId\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n\n\t/**\n\t * Refund a transaction\n\t *\n\t * @param {String} salesChannelId\n\t * @param {int} transactionId\n\t * @param {float} refundableAmount\n\t * @return {*}\n\t */\n\tcreateRefundByAmount(salesChannelId, transactionId, refundableAmount) {\n\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/refund/create-refund-by-amount/`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tsalesChannelId: salesChannelId,\n\t\t\t\ttransactionId: transactionId,\n\t\t\t\trefundableAmount: refundableAmount\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n\n\t/**\n\t * Refund a transaction\n\t *\n\t * @param {String} salesChannelId\n\t * @param {int} transactionId\n\t * @param {float} refundableAmount\n\t * @param {String} lineItemId\n\t * @return {*}\n\t */\n\tcreatePartialRefund(salesChannelId, transactionId, refundableAmount, lineItemId) {\n\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/refund/create-partial-refund/`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tsalesChannelId: salesChannelId,\n\t\t\t\ttransactionId: transactionId,\n\t\t\t\trefundableAmount: refundableAmount,\n\t\t\t\tlineItemId: lineItemId\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n}\n\nexport default VRPaymentRefundService;\n","/* global Shopware */\n\nconst ApiService = Shopware.Classes.ApiService;\n\n/**\n * @class VRPaymentPayment\\Core\\Api\\Transaction\\Controller\\TransactionController\n */\nclass VRPaymentTransactionService extends ApiService {\n\n\t/**\n\t * VRPaymentTransactionService constructor\n\t *\n\t * @param httpClient\n\t * @param loginService\n\t * @param apiEndpoint\n\t */\n\tconstructor(httpClient, loginService, apiEndpoint = 'vrpayment') {\n\t\tsuper(httpClient, loginService, apiEndpoint);\n\t}\n\n\t/**\n\t * Get transaction data\n\t *\n\t * @param {String} salesChannelId\n\t * @param {int} transactionId\n\t * @return {*}\n\t */\n\tgetTransactionData(salesChannelId, transactionId) {\n\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/transaction/get-transaction-data/`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tsalesChannelId: salesChannelId,\n\t\t\t\ttransactionId: transactionId\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n\n\t/**\n\t * Download Invoice Document\n\t *\n\t * @param context\n\t * @param salesChannelId\n\t * @param transactionId\n\t * @return {string}\n\t */\n\tgetInvoiceDocument(salesChannelId, transactionId) {\n\t\treturn `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/transaction/get-invoice-document/${salesChannelId}/${transactionId}`;\n\t}\n\n\t/**\n\t * Download Packing slip\n\t *\n\t * @param salesChannelId\n\t * @param transactionId\n\t * @return {string}\n\t */\n\tgetPackingSlip(salesChannelId, transactionId) {\n\t\treturn `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/transaction/get-packing-slip/${salesChannelId}/${transactionId}`;\n\t}\n}\n\nexport default VRPaymentTransactionService;","/* global Shopware */\n\nconst ApiService = Shopware.Classes.ApiService;\n\n/**\n * @class VRPaymentPayment\\Core\\Api\\Transaction\\Controller\\TransactionCompletionController\n */\nclass VRPaymentTransactionCompletionService extends ApiService {\n\n\t/**\n\t * VRPaymentTransactionCompletionService constructor\n\t *\n\t * @param httpClient\n\t * @param loginService\n\t * @param apiEndpoint\n\t */\n\tconstructor(httpClient, loginService, apiEndpoint = 'vrpayment') {\n\t\tsuper(httpClient, loginService, apiEndpoint);\n\t}\n\n\t/**\n\t * Complete a transaction\n\t *\n\t * @param {String} salesChannelId\n\t * @param {int} transactionId\n\t * @return {*}\n\t */\n\tcreateTransactionCompletion(salesChannelId, transactionId) {\n\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/transaction-completion/create-transaction-completion/`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tsalesChannelId: salesChannelId,\n\t\t\t\ttransactionId: transactionId\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n}\n\nexport default VRPaymentTransactionCompletionService;","/* global Shopware */\n\nconst ApiService = Shopware.Classes.ApiService;\n\n/**\n * @class VRPaymentPayment\\Core\\Api\\Transaction\\Controller\\TransactionVoidController\n */\nclass VRPaymentTransactionVoidService extends ApiService {\n\n\t/**\n\t * VRPaymentTransactionVoidService constructor\n\t *\n\t * @param httpClient\n\t * @param loginService\n\t * @param apiEndpoint\n\t */\n\tconstructor(httpClient, loginService, apiEndpoint = 'vrpayment') {\n\t\tsuper(httpClient, loginService, apiEndpoint);\n\t}\n\n\t/**\n\t * Void a transaction\n\t *\n\t * @param {String} salesChannelId\n\t * @param {int} transactionId\n\t * @return {*}\n\t */\n\tcreateTransactionVoid(salesChannelId, transactionId) {\n\n\t\tconst headers = this.getBasicHeaders();\n\t\tconst apiRoute = `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/transaction-void/create-transaction-void/`;\n\n\t\treturn this.httpClient.post(\n\t\t\tapiRoute,\n\t\t\t{\n\t\t\t\tsalesChannelId: salesChannelId,\n\t\t\t\ttransactionId: transactionId\n\t\t\t},\n\t\t\t{\n\t\t\t\theaders: headers\n\t\t\t}\n\t\t).then((response) => {\n\t\t\treturn ApiService.handleResponse(response);\n\t\t});\n\t}\n}\n\nexport default VRPaymentTransactionVoidService;","/* global Shopware */\n\nimport VRPaymentConfigurationService from '../core/service/api/vrpayment-configuration.service';\nimport VRPaymentRefundService from '../core/service/api/vrpayment-refund.service';\nimport VRPaymentTransactionService from '../core/service/api/vrpayment-transaction.service';\nimport VRPaymentTransactionCompletionService\n\tfrom '../core/service/api/vrpayment-transaction-completion.service';\nimport VRPaymentTransactionVoidService\n\tfrom '../core/service/api/vrpayment-transaction-void.service';\n\n\nconst {Application} = Shopware;\n\n// noinspection JSUnresolvedFunction\nApplication.addServiceProvider('VRPaymentConfigurationService', (container) => {\n\tconst initContainer = Application.getContainer('init');\n\treturn new VRPaymentConfigurationService(initContainer.httpClient, container.loginService);\n});\n\n// noinspection JSUnresolvedFunction\nApplication.addServiceProvider('VRPaymentRefundService', (container) => {\n\tconst initContainer = Application.getContainer('init');\n\treturn new VRPaymentRefundService(initContainer.httpClient, container.loginService);\n});\n\n// noinspection JSUnresolvedFunction\nApplication.addServiceProvider('VRPaymentTransactionService', (container) => {\n\tconst initContainer = Application.getContainer('init');\n\treturn new VRPaymentTransactionService(initContainer.httpClient, container.loginService);\n});\n\n// noinspection JSUnresolvedFunction\nApplication.addServiceProvider('VRPaymentTransactionCompletionService', (container) => {\n\tconst initContainer = Application.getContainer('init');\n\treturn new VRPaymentTransactionCompletionService(initContainer.httpClient, container.loginService);\n});\n\n// noinspection JSUnresolvedFunction\nApplication.addServiceProvider('VRPaymentTransactionVoidService', (container) => {\n\tconst initContainer = Application.getContainer('init');\n\treturn new VRPaymentTransactionVoidService(initContainer.httpClient, container.loginService);\n});"],"names":["template$c","Component","Context","Criteria","vrpaymentFormattedHandlerIdentifier","template","orderRepository","orderCriteria","order","paymentMethodId","paymentMethod","template$b","Mixin","Filter","Utils","errorResponse","template$a","template$9","itemUniqueId","newValue","template$8","errorTitle","errorMessage","template$7","template$6","totalAmountTemp","refundsAmountTemp","vrpaymentTransactionId","VRPaymentTransaction","refund","reduction","lineItem","modalType","lineItemId","refundableQuantity","itemRefundableAmount","item","selection","refundPromises","error","resolve","reject","Module","deDE","enGB","frFR","itIT","next","currentRoute","template$5","CONFIG_DOMAIN","CONFIG_APPLICATION_KEY","CONFIG_EMAIL_ENABLED","CONFIG_INTEGRATION","CONFIG_LINE_ITEM_CONSISTENCY_ENABLED","CONFIG_SPACE_ID","CONFIG_SPACE_VIEW_ID","CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED","CONFIG_USER_ID","CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED","CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED","constants","configData","defaultConfig","value","key","res","messageNotBlankErrorState","apiConnectionData","spaceId","userId","applicationKey","template$4","apiConnectionParams","template$3","template$2","template$1","route","ApiService","VRPaymentConfigurationService","httpClient","loginService","apiEndpoint","salesChannelId","headers","apiRoute","response","applicationId","VRPaymentRefundService","transactionId","quantity","refundableAmount","VRPaymentTransactionService","VRPaymentTransactionCompletionService","VRPaymentTransactionVoidService","Application","container","initContainer"],"mappings":"AAAA,MAAeA,EAAA,4hBCKT,WAACC,EAAS,QAAEC,CAAO,EAAI,SACvBC,EAAW,SAAS,KAAK,SAEzBC,EAAsC,mDAE5CH,EAAU,SAAS,kBAAmB,CACtC,SAACI,EAEA,MAAO,CACN,MAAO,CACN,mBAAoB,EACpB,CACD,EAED,SAAU,CACT,YAAa,CACZ,MAAO,CAAC,KAAK,oBAAsB,KAAK,OAAO,OAAS,wBACxD,EACD,UAAW,CACV,MAAO,EACV,CACE,EAED,MAAO,CACN,QAAS,CACR,KAAM,GACN,SAAU,CACT,GAAI,CAAC,KAAK,QAAS,CAClB,KAAK,sBAAsB,IAAI,EAC/B,MACL,CAEI,MAAMC,EAAkB,KAAK,kBAAkB,OAAO,OAAO,EACvDC,EAAgB,IAAIJ,EAAS,EAAG,CAAC,EACvCI,EAAc,eAAe,cAAc,EAE3CD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CAAW,CAC7C,CASC,sBAAsBC,EAAgBM,EAAe,CAEpD,MAAML,EAAU,KAAK,gBAAiB,EAChCC,EAAW,GAAG,SAAS,QAAQ,IAAI,OAAO,YAAY,KAAK,eAAc,CAAE,6CAEjF,OAAO,KAAK,WAAW,KACtBA,EACA,CACC,eAAgBF,EAChB,cAAeM,CACf,EACD,CACC,QAASL,CACb,CACA,EAAI,KAAME,GACAR,EAAW,eAAeQ,CAAQ,CACzC,CACH,CACA,CClCA,KAAM,CAAC,YAAAS,CAAW,EAAI,SAGtBA,EAAY,mBAAmB,gCAAkCC,GAAc,CAC9E,MAAMC,EAAgBF,EAAY,aAAa,MAAM,EACrD,OAAO,IAAIhB,GAA8BkB,EAAc,WAAYD,EAAU,YAAY,CAC1F,CAAC,EAGDD,EAAY,mBAAmB,yBAA2BC,GAAc,CACvE,MAAMC,EAAgBF,EAAY,aAAa,MAAM,EACrD,OAAO,IAAIP,GAAuBS,EAAc,WAAYD,EAAU,YAAY,CACnF,CAAC,EAGDD,EAAY,mBAAmB,8BAAgCC,GAAc,CAC5E,MAAMC,EAAgBF,EAAY,aAAa,MAAM,EACrD,OAAO,IAAIH,GAA4BK,EAAc,WAAYD,EAAU,YAAY,CACxF,CAAC,EAGDD,EAAY,mBAAmB,wCAA0CC,GAAc,CACtF,MAAMC,EAAgBF,EAAY,aAAa,MAAM,EACrD,OAAO,IAAIF,GAAsCI,EAAc,WAAYD,EAAU,YAAY,CAClG,CAAC,EAGDD,EAAY,mBAAmB,kCAAoCC,GAAc,CAChF,MAAMC,EAAgBF,EAAY,aAAa,MAAM,EACrD,OAAO,IAAID,GAAgCG,EAAc,WAAYD,EAAU,YAAY,CAC5F,CAAC"} \ No newline at end of file diff --git a/src/Resources/public/administration/assets/v-r-payment-payment-D4AH6HY2.css b/src/Resources/public/administration/assets/v-r-payment-payment-D4AH6HY2.css deleted file mode 100644 index f68a9a8..0000000 --- a/src/Resources/public/administration/assets/v-r-payment-payment-D4AH6HY2.css +++ /dev/null @@ -1 +0,0 @@ -.sw-order-detail .sw-tabs{margin-top:40px}.sw-order-detail .sw-order-detail-base .mt-card-view__content{overflow-x:visible;overflow-y:visible}.vrpayment-order-detail__data{display:grid}.vrpayment-order-detail__heading{padding-top:15px} diff --git a/src/Resources/public/storefront/js/app.js b/src/Resources/public/storefront/js/app.js index 773dfe8..fc1c90c 100644 --- a/src/Resources/public/storefront/js/app.js +++ b/src/Resources/public/storefront/js/app.js @@ -29,7 +29,7 @@ payment_method_handler_status: 'input[name="vrpayment_payment_handler_validation_status"]', payment_form_id: 'confirmOrderForm', button_cancel_id: 'vrpaymentOrderCancel', - // button_home_override: 'vrpaymentHomeLink', + button_home_override: 'vrpaymentHomeLink', loader_id: 'vrpaymentLoader', checkout_url: null, checkout_url_id: 'checkoutUrl', @@ -46,7 +46,7 @@ this.cart_recreate_url = document.getElementById(this.cart_recreate_url_id).value; document.getElementById(this.button_cancel_id).addEventListener('click', this.recreateCart, false); - // document.getElementById(this.button_home_override).addEventListener('click', this.recreateCart, false); + document.getElementById(this.button_home_override).addEventListener('click', this.recreateCart, false); document.getElementById(this.payment_form_id).addEventListener('submit', this.submitPayment, false); VRPaymentCheckout.getIframe(); diff --git a/src/Resources/views/storefront/page/checkout/order/vrpayment.html.twig b/src/Resources/views/storefront/page/checkout/order/vrpayment.html.twig index 9aa434c..5e6c15b 100644 --- a/src/Resources/views/storefront/page/checkout/order/vrpayment.html.twig +++ b/src/Resources/views/storefront/page/checkout/order/vrpayment.html.twig @@ -1,11 +1,15 @@ {% sw_extends '@Storefront/storefront/page/checkout/_page.html.twig' %} +{% block base_header %} + {% sw_include '@VRPaymentPayment/storefront/page/checkout/order/vrpayment_header.html.twig' %} +{% endblock %} + +{% block base_navigation %}{% endblock %} {% block base_body_classes %}vrpayment-payment is-act-confirmpage{% endblock %} {% block page_checkout_main_content %} -
    - {% block page_checkout_pay %} - {% block page_checkout_confirm_header %} + {% block page_checkout_pay %} + {% block page_checkout_confirm_header %}

    {{ "vrpayment.payHeader"|trans|sw_sanitize }}

    @@ -140,6 +144,10 @@
    {% endblock %} +{% block base_footer %} + {% sw_include '@Storefront/storefront/layout/footer/footer-minimal.html.twig' %} +{% endblock %} + {% block base_body_script %} {{ parent() }} {% if page.extensions.vRPaymentData %} diff --git a/src/Resources/views/storefront/page/checkout/order/vrpayment_header.html.twig b/src/Resources/views/storefront/page/checkout/order/vrpayment_header.html.twig new file mode 100644 index 0000000..4d958c1 --- /dev/null +++ b/src/Resources/views/storefront/page/checkout/order/vrpayment_header.html.twig @@ -0,0 +1,53 @@ +{% sw_extends '@Storefront/storefront/layout/header/header-minimal.html.twig' %} + +{% block layout_header_minimal_logo %} + +{% endblock %} + +{% block layout_header_minimal_button %} +
    + +
    +{% endblock %} \ No newline at end of file diff --git a/src/VRPaymentPayment.php b/src/VRPaymentPayment.php index a6650cb..e305188 100644 --- a/src/VRPaymentPayment.php +++ b/src/VRPaymentPayment.php @@ -3,7 +3,6 @@ namespace VRPaymentPayment; use Shopware\Core\{ - Framework\Feature, Framework\Plugin, Framework\Plugin\Context\ActivateContext, Framework\Plugin\Context\DeactivateContext, @@ -22,7 +21,6 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\DirectoryLoader; use Symfony\Component\DependencyInjection\Loader\GlobFileLoader; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; -use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; // expect the vendor folder on Shopware store releases if (file_exists(dirname(__DIR__) . '/vendor/autoload.php')) { @@ -84,21 +82,19 @@ class VRPaymentPayment extends Plugin { { parent::build($container); - $confDir = \rtrim($this->getPath(), '/') . '/Resources/config'; - $locator = new FileLocator($confDir); + $locator = new FileLocator('Resources/config'); $resolver = new LoaderResolver([ - new YamlFileLoader($container, $locator), - new XmlFileLoader($container, $locator), - new GlobFileLoader($container, $locator), - new DirectoryLoader($container, $locator), + new YamlFileLoader($container, $locator), + new GlobFileLoader($container, $locator), + new DirectoryLoader($container, $locator), ]); $configLoader = new DelegatingLoader($resolver); - $configLoader->load($confDir . '/{packages}/*.yaml', 'glob'); + $confDir = \rtrim($this->getPath(), '/') . '/Resources/config'; - $configLoader->load('services/core/checkout.xml'); + $configLoader->load($confDir . '/{packages}/*.yaml', 'glob'); } public function enrichPrivileges(): array