mirror of
https://github.com/vr-payment/shopware-6.git
synced 2026-06-04 19:03:01 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d1a78fedcf | |||
| d7ea44d506 | |||
| fa480808b9 | |||
| 017bb0e416 |
@@ -1,3 +1,15 @@
|
||||
# 7.1.3
|
||||
- Fixed issue with radio button/switch settings not saving
|
||||
- Fixed issue with error screen sporadically happening after failed payments
|
||||
|
||||
# 7.1.2
|
||||
- Support the ability to have different spaces for differet sales channels
|
||||
- Fixed issue where Twint would not appear sometimes
|
||||
|
||||
# 7.1.1
|
||||
- Updated documentation
|
||||
- Fixed issue with addresses not being correctly synced
|
||||
|
||||
# 7.1.0
|
||||
## Feature
|
||||
- Support subscription payment methods
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
# 7.1.3
|
||||
– Problem behoben, bei dem die Einstellungen von Optionsfeldern/Schaltern nicht gespeichert wurden.
|
||||
– Problem behoben, bei dem nach fehlgeschlagenen Zahlungen sporadisch ein Fehlerbildschirm angezeigt wurde.
|
||||
|
||||
# 7.1.2
|
||||
- Unterstützung der Möglichkeit, unterschiedliche Bereiche für verschiedene Vertriebskanäle zu nutzen.
|
||||
- Problem behoben, bei dem Twint manchmal nicht angezeigt wurde.
|
||||
|
||||
# 7.1.1
|
||||
- Dokumentation aktualisiert
|
||||
- Problem behoben, bei dem Adressen nicht korrekt synchronisiert wurden.
|
||||
|
||||
# 7.1.0
|
||||
– Unterstützung für Abonnement-Zahlungsmethoden
|
||||
– Support für Shopware 6.7.2.0
|
||||
|
||||
@@ -13,10 +13,10 @@ Please note that this plugin is for versions 6.5, 6.6 or 6.7. For the 6.4 plugin
|
||||
|
||||
## Documentation
|
||||
|
||||
- For English documentation click [here](@WalleeDocPath(/docs/en/documentation.html))
|
||||
- Für die deutsche Dokumentation klicken Sie [hier](@WalleeDocPath(/docs/de/documentation.html))
|
||||
- Pour la documentation Française, cliquez [ici](@WalleeDocPath(/docs/fr/documentation.html))
|
||||
- Per la documentazione in tedesco, clicca [qui](@WalleeDocPath(/docs/it/documentation.html))
|
||||
- For English documentation click [here](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.1.4/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.4/docs/de/documentation.html)
|
||||
- Pour la documentation Française, cliquez [ici](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.1.4/docs/fr/documentation.html)
|
||||
- Per la documentazione in tedesco, clicca [qui](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.1.4/docs/it/documentation.html)
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -28,26 +28,35 @@ Please note that this plugin is for versions 6.5, 6.6 or 6.7. For the 6.4 plugin
|
||||
Copy
|
||||
composer require vrpayment/shopware-6
|
||||
php bin/console plugin:refresh
|
||||
php bin/console plugin:install --activate --clearCache VRPaymentPayment
|
||||
php bin/console plugin:install --activate --clearCache VRPayment
|
||||
```
|
||||
|
||||
### Manual Installation
|
||||
|
||||
1. Download the latest [Release](../../releases)
|
||||
2. Extract the ZIP to custom/plugins/VRPaymentPayment.
|
||||
2. Extract the ZIP to custom/plugins/VRPayment.
|
||||
|
||||
```bash
|
||||
Copy
|
||||
bin/console plugin:refresh
|
||||
bin/console plugin:install --activate --clearCache VRPaymentPayment
|
||||
bin/console plugin:install --activate --clearCache VRPayment
|
||||
```
|
||||
|
||||
## Configuration
|
||||
### API Credentials
|
||||
|
||||
1. Navigate to Shopware Admin > Settings > VRPayment Payment.
|
||||
1. Navigate to Shopware Admin > Settings > VRPayment.
|
||||
2. Enter your Space ID, User ID, and API Key (obtained from the [VR Payment Portal](https://gateway.vr-payment.de/)).
|
||||
|
||||
### VRPayment does not appear in Settings
|
||||
|
||||
1. You should run the following commmand
|
||||
|
||||
```bash
|
||||
Copy
|
||||
bin/build-administration.sh
|
||||
```
|
||||
|
||||
### Payment Methods
|
||||
|
||||
Configure supported methods (e.g., credit cards, Apple Pay) via the [VR Payment Portal](https://gateway.vr-payment.de/).
|
||||
@@ -78,7 +87,7 @@ ________________________________________________________________________________
|
||||
|
||||
```bash
|
||||
Copy
|
||||
tail -f var/log/vrpayment_payment*.log
|
||||
tail -f var/log/vrpayment*.log
|
||||
```
|
||||
### Common Issues:
|
||||
|
||||
|
||||
+1
-1
@@ -59,5 +59,5 @@
|
||||
"vrpayment/sdk": "^4.0.0"
|
||||
},
|
||||
"type": "shopware-platform-plugin",
|
||||
"version": "7.1.0"
|
||||
"version": "7.1.4"
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<meta name="keywords" value="VR Payment, Shopware, Shopware Plugin, Payment, Payment Integration, Documentation"><meta name="description" value="The documentation for the Shopware 6 plugin that enables processing payments with VR Payment.">
|
||||
<link rel="canonical" href="@WalleeCanonicalPath(https://plugin-documentation.wallee.com/wallee-payment, VRPaymentPayment/docs/de/documentation.html)" />
|
||||
<link rel="canonical" href="https://plugin-documentation.wallee.com/wallee-payment/shopware-6/master/VRPaymentPayment/docs/de/documentation.html" />
|
||||
<title>VR Payment Zahlungs-Plugin für Shopware 6</title>
|
||||
<link href="assets/monokai-sublime.css" rel="stylesheet" />
|
||||
<link href="assets/base.css" rel="stylesheet" />
|
||||
@@ -23,7 +23,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@WalleeReleasePath()">
|
||||
<a href="https://github.com/vr-payment/shopware-6/releases/tag/7.1.4/">
|
||||
Source
|
||||
</a>
|
||||
</li>
|
||||
@@ -152,7 +152,7 @@
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">composer require vrpayment/shopware-6
|
||||
php bin/console plugin:refresh
|
||||
php bin/console plugin:install --activate --clearCache VRPaymentPayment</code></pre>
|
||||
php bin/console plugin:install --activate --clearCache VRPayment</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -177,12 +177,25 @@ php bin/console plugin:install --activate --clearCache VRPaymentPayment</code></
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">php bin/console plugin:refresh
|
||||
php bin/console plugin:install --activate --clearCache VRPaymentPayment</code></pre>
|
||||
php bin/console plugin:install --activate --clearCache VRPayment</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div> </div>
|
||||
</div> <div class="section" id="_vrpayment_erscheint_nicht_in_den_einstellungen">
|
||||
<div class="section-title">
|
||||
<h2>
|
||||
<span class="title-number">4.4</span>VRPayment erscheint nicht in den Einstellungen </h2>
|
||||
</div>
|
||||
<div class="section-body">
|
||||
<div class="paragraph">
|
||||
<p>Folgender Befehl muss ausgeführt werden</p>
|
||||
</div><div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">bin/build-administration.sh</code></pre>
|
||||
</div>
|
||||
</div> </div>
|
||||
</div> </div>
|
||||
</div> <div class="chapter" id="portal-startup-guide">
|
||||
<div class="chapter-title">
|
||||
@@ -364,7 +377,7 @@ Bitte beachten Sie, dass die Konnektoren doppelt erscheinen, da einer für Zahlu
|
||||
<div class="olist loweralpha">
|
||||
<ol class="loweralpha" type="a">
|
||||
<li>
|
||||
<p>Navigieren Sie zu <strong>Shopware Admin → Einstellungen → Erweiterungen → VR Payment Payment</strong> und klicken Sie auf Speichern.</p>
|
||||
<p>Navigieren Sie zu <strong>Shopware Admin → Einstellungen → Erweiterungen → VR Payment</strong> und klicken Sie auf Speichern.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Geben Sie Ihre <code>Space ID</code>, <code>User ID</code>, und <code>API Key</code> ein.</p>
|
||||
@@ -768,7 +781,7 @@ Tokenisierung unterstützt, kann er für Abonnements verwendet werden. Die wiede
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">COPY
|
||||
tail -f var/log/whitelabelname_payment*.log</code></pre>
|
||||
tail -f var/log/whitelabelname*.log</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -888,6 +901,11 @@ A: Ja, das Plugin unterstützt Wallets wie Apple Pay.</p>
|
||||
<span class="item-number">4.3</span>
|
||||
<span class="item-title">Via Composer (Recommended)</span>
|
||||
</a>
|
||||
</li> <li class="nav-level-2">
|
||||
<a href="#_vrpayment_erscheint_nicht_in_den_einstellungen">
|
||||
<span class="item-number">4.4</span>
|
||||
<span class="item-title">VRPayment erscheint nicht in den Einstellungen</span>
|
||||
</a>
|
||||
</li> </ul>
|
||||
</li> <li class="nav-level-1">
|
||||
<a href="#portal-startup-guide">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<meta name="keywords" value="VR Payment, Shopware, Shopware Plugin, Payment, Payment Integration, Documentation"><meta name="description" value="The documentation for the Shopware 6 plugin that enables processing payments with VR Payment.">
|
||||
<link rel="canonical" href="@WalleeCanonicalPath(https://plugin-documentation.wallee.com/wallee-payment, VRPaymentPayment/docs/en/documentation.html)" />
|
||||
<link rel="canonical" href="https://plugin-documentation.wallee.com/wallee-payment/shopware-6/master/VRPaymentPayment/docs/en/documentation.html" />
|
||||
<title>VR Payment Shopware 6 Documentation</title>
|
||||
<link href="assets/monokai-sublime.css" rel="stylesheet" />
|
||||
<link href="assets/base.css" rel="stylesheet" />
|
||||
@@ -23,7 +23,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@WalleeReleasePath()">
|
||||
<a href="https://github.com/vr-payment/shopware-6/releases/tag/7.1.4/">
|
||||
Source
|
||||
</a>
|
||||
</li>
|
||||
@@ -39,7 +39,7 @@
|
||||
</div>
|
||||
<div class="chapter-body">
|
||||
<div class="paragraph">
|
||||
<p>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 for managing transactions and payment methods.</p>
|
||||
<p>The VR 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 for managing transactions and payment methods.</p>
|
||||
</div><div class="paragraph">
|
||||
<p>Important: Please note that only Major (e.g. 6.x.0.0) and Minor (e.g. 6.0.x.0) update will be tested for compatibility within a 2 weeks after release.</p>
|
||||
</div> </div>
|
||||
@@ -127,7 +127,7 @@
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Activate the VR Payment Payment plugin from the Plugin Manager.</p>
|
||||
<p>Activate the VR Payment plugin from the Plugin Manager.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</div> </div>
|
||||
@@ -148,7 +148,7 @@
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">composer require vrpayment/shopware-6
|
||||
php bin/console plugin:refresh
|
||||
php bin/console plugin:install --activate --clearCache VRPaymentPayment</code></pre>
|
||||
php bin/console plugin:install --activate --clearCache VRPayment</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -173,12 +173,25 @@ php bin/console plugin:install --activate --clearCache VRPaymentPayment</code></
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">php bin/console plugin:refresh
|
||||
php bin/console plugin:install --activate --clearCache VRPaymentPayment</code></pre>
|
||||
php bin/console plugin:install --activate --clearCache VRPayment</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div> </div>
|
||||
</div> <div class="section" id="_vrpayment_does_not_appear_in_settings">
|
||||
<div class="section-title">
|
||||
<h2>
|
||||
<span class="title-number">4.4</span>VRPayment does not appear in Settings </h2>
|
||||
</div>
|
||||
<div class="section-body">
|
||||
<div class="paragraph">
|
||||
<p>You should run the following commmand</p>
|
||||
</div><div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">bin/build-administration.sh</code></pre>
|
||||
</div>
|
||||
</div> </div>
|
||||
</div> </div>
|
||||
</div> <div class="chapter" id="portal-startup-guide">
|
||||
<div class="chapter-title">
|
||||
@@ -360,7 +373,7 @@ Please note that the connectors seems duplicated but it because one is for Physi
|
||||
<div class="olist loweralpha">
|
||||
<ol class="loweralpha" type="a">
|
||||
<li>
|
||||
<p>Navigate to <strong>Shopware Admin</strong> → <strong>Settings</strong> → <strong>Extensions</strong> → <strong>VR Payment Payment</strong> and click on <strong>Save</strong>.</p>
|
||||
<p>Navigate to <strong>Shopware Admin</strong> → <strong>Settings</strong> → <strong>Extensions</strong> → <strong>VR Payment</strong> and click on <strong>Save</strong>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Enter your <code>Space ID</code>, <code>User ID</code>, and <code>API Key</code></p>
|
||||
@@ -782,7 +795,7 @@ tokenization, it can be used for subscriptions. The recurring payment is fully m
|
||||
<p>Logs: Check payment logs with:</p>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">tail -f var/log/whitelabelname_payment*.log</code></pre>
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">tail -f var/log/whitelabelname*.log</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -905,6 +918,11 @@ tokenization, it can be used for subscriptions. The recurring payment is fully m
|
||||
<span class="item-number">4.3</span>
|
||||
<span class="item-title">Manual Installation</span>
|
||||
</a>
|
||||
</li> <li class="nav-level-2">
|
||||
<a href="#_vrpayment_does_not_appear_in_settings">
|
||||
<span class="item-number">4.4</span>
|
||||
<span class="item-title">VRPayment does not appear in Settings</span>
|
||||
</a>
|
||||
</li> </ul>
|
||||
</li> <li class="nav-level-1">
|
||||
<a href="#portal-startup-guide">
|
||||
|
||||
+53
-35
@@ -5,15 +5,15 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<meta name="keywords" value="VR Payment, Shopware, Shopware Plugin, Payment, Payment Integration, Documentation"><meta name="description" value="The documentation for the Shopware 6 plugin that enables processing payments with VR Payment.">
|
||||
<link rel="canonical" href="@WalleeCanonicalPath(https://plugin-documentation.wallee.com/wallee-payment, VRPaymentPayment/docs/fr/documentation.html)" />
|
||||
<title>Wallee Payment Plugin pour Shopware 6</title>
|
||||
<link rel="canonical" href="https://plugin-documentation.wallee.com/wallee-payment/shopware-6/master/VRPaymentPayment/docs/fr/documentation.html" />
|
||||
<title>VR Payment Plugin pour Shopware 6</title>
|
||||
<link href="assets/monokai-sublime.css" rel="stylesheet" />
|
||||
<link href="assets/base.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body class="documentation">
|
||||
<div class="layout-wrapper">
|
||||
<div class="layout-title">
|
||||
<h1>Wallee Payment Plugin pour Shopware 6</h1>
|
||||
<h1>VR Payment Plugin pour Shopware 6</h1>
|
||||
<h2>Documentation</h2> </div>
|
||||
<div class="layout-navigation">
|
||||
<ul class="nav">
|
||||
@@ -23,7 +23,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@WalleeReleasePath()">
|
||||
<a href="https://github.com/vr-payment/shopware-6/releases/tag/7.1.4/">
|
||||
Source
|
||||
</a>
|
||||
</li>
|
||||
@@ -39,7 +39,7 @@
|
||||
</div>
|
||||
<div class="chapter-body">
|
||||
<div class="paragraph">
|
||||
<p>Le plugin de paiement Wallee intègre un traitement moderne des paiements dans Shopware 6, offrant des fonctionnalités telles que les paiements basés sur iFrame, les remboursements, les captures et la conformité PCI. Il permet une intégration transparente avec le portail Wallee pour la gestion des transactions et des méthodes de paiement.</p>
|
||||
<p>Le plugin de paiement VR Payment intègre un traitement moderne des paiements dans Shopware 6, offrant des fonctionnalités telles que les paiements basés sur iFrame, les remboursements, les captures et la conformité PCI. Il permet une intégration transparente avec le portail VR Payment pour la gestion des transactions et des méthodes de paiement.</p>
|
||||
</div><div class="paragraph">
|
||||
<p>Important : Veuillez noter que seules les mises à jour majeures (par exemple 6.x.0.0) et mineures (par exemple 6.0.x.0) seront testées pour la compatibilité dans les 2 semaines suivant la publication.</p>
|
||||
</div> </div>
|
||||
@@ -54,7 +54,7 @@
|
||||
</div><div class="paragraph">
|
||||
<p><strong>PHP</strong>: Version minimale requise pour votre installation Shopware (e.g., 7.4+).</p>
|
||||
</div><div class="paragraph">
|
||||
<p><strong>Compte Wallee</strong>: Obtenir Space ID, User ID, et clé API du <strong>Portail Wallee</strong> (voir le <a href="#portal-startup-guide">Guide de démarrage du Portail</a>).</p>
|
||||
<p><strong>Compte VR Payment</strong>: Obtenir Space ID, User ID, et clé API du <strong>Portail VR Payment</strong> (voir le <a href="#portal-startup-guide">Guide de démarrage du Portail</a>).</p>
|
||||
</div> </div>
|
||||
</div> <div class="chapter" id="compatibility">
|
||||
<div class="chapter-title">
|
||||
@@ -125,7 +125,7 @@
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Activez le plugin wallee Payment à partir du gestionnaire de plugins</p>
|
||||
<p>Activez le plugin VR Payment à partir du gestionnaire de plugins</p>
|
||||
</li>
|
||||
</ol>
|
||||
</div> </div>
|
||||
@@ -146,7 +146,7 @@
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">composer require vrpayment/shopware-6
|
||||
php bin/console plugin:refresh
|
||||
php bin/console plugin:install --activate --clearCache VRPaymentPayment</code></pre>
|
||||
php bin/console plugin:install --activate --clearCache VRPayment</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -167,7 +167,20 @@ php bin/console plugin:install --activate --clearCache VRPaymentPayment</code></
|
||||
</div><div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">php bin/console plugin:refresh
|
||||
php bin/console plugin:install --activate --clearCache VRPaymentPayment</code></pre>
|
||||
php bin/console plugin:install --activate --clearCache VRPayment</code></pre>
|
||||
</div>
|
||||
</div> </div>
|
||||
</div> <div class="section" id="_si_vrpayment_n_apparaît_pas_dans_les_paramètres">
|
||||
<div class="section-title">
|
||||
<h2>
|
||||
<span class="title-number">4.4</span>Si VRPayment n’apparaît pas dans les paramètres </h2>
|
||||
</div>
|
||||
<div class="section-body">
|
||||
<div class="paragraph">
|
||||
<p>Vous devez exécuter la commande suivante</p>
|
||||
</div><div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">bin/build-administration.sh</code></pre>
|
||||
</div>
|
||||
</div> </div>
|
||||
</div> </div>
|
||||
@@ -351,7 +364,7 @@ Veuillez noter que les connecteurs semblent faire double emploi, mais c’es
|
||||
<div class="olist loweralpha">
|
||||
<ol class="loweralpha" type="a">
|
||||
<li>
|
||||
<p>Naviguez vers <strong>Shopware Admin → Paramètres → Extensions → Wallee Payment</strong> et cliquez sur Sauvegarder.</p>
|
||||
<p>Naviguez vers <strong>Shopware Admin → Paramètres → Extensions → VR Payment</strong> et cliquez sur Sauvegarder.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Entrez votre <code>Space ID</code>, <code>User ID</code>, et <code>clé API</code></p>
|
||||
@@ -374,7 +387,7 @@ Veuillez noter que les connecteurs semblent faire double emploi, mais c’es
|
||||
<li>
|
||||
<p><strong>Méthodes de Paiment</strong></p>
|
||||
<div class="paragraph">
|
||||
<p>Les méthodes de paiement disponibles à la caisse sont gérées par le Portail Wallee. Si vous souhaitez désactiver une méthode de paiement, vous devez la désactiver à partir du portail.</p>
|
||||
<p>Les méthodes de paiement disponibles à la caisse sont gérées par le Portail VR Payment. Si vous souhaitez désactiver une méthode de paiement, vous devez la désactiver à partir du portail.</p>
|
||||
</div>
|
||||
<div class="admonitionblock note">
|
||||
<table>
|
||||
@@ -484,9 +497,9 @@ Veuillez noter que si vous n’utilisez pas Space View Id, cette option doit
|
||||
</div>
|
||||
<div class="chapter-body">
|
||||
<div class="paragraph">
|
||||
<p>Le processus de paiement de wallee est complètement standardisé pour chaque méthode de paiement que vous pouvez traiter. Cela vous permet d’ajouter simplement une méthode de paiement ou un processeur sans modifier la configuration de votre Shopware. Une vue d’ensemble des états et des processus de paiement de wallee peut être trouvée dans la <a href="https://gateway.vr-payment.de/en-us/doc/payment/transaction-process" target="_blank">documentation sur les paiments.</a>.</p>
|
||||
<p>Le processus de paiement de VR Payment est complètement standardisé pour chaque méthode de paiement que vous pouvez traiter. Cela vous permet d’ajouter simplement une méthode de paiement ou un processeur sans modifier la configuration de votre Shopware. Une vue d’ensemble des états et des processus de paiement de VR Payment peut être trouvée dans la <a href="https://gateway.vr-payment.de/en-us/doc/payment/transaction-process" target="_blank">documentation sur les paiments.</a>.</p>
|
||||
</div><div class="paragraph">
|
||||
<p>Dans la section suivante, nous vous donnons un aperçu de la façon dont les états de wallee sont mappés dans le graphique des états de Shopware pour les commandes et les états de paiement.</p>
|
||||
<p>Dans la section suivante, nous vous donnons un aperçu de la façon dont les états de VR Payment sont mappés dans le graphique des états de Shopware pour les commandes et les états de paiement.</p>
|
||||
</div> <div class="section" id="_cartographie_des_différents_états_d_une_commande_de_shopware">
|
||||
<div class="section-title">
|
||||
<h2>
|
||||
@@ -512,7 +525,7 @@ Veuillez noter que si vous n’utilisez pas Space View Id, cette option doit
|
||||
</div>
|
||||
<div class="section-body">
|
||||
<div class="paragraph">
|
||||
<p>Vous trouverez ci-dessous un diagramme qui montre l’association des différents états de Shopware pour l’état de paiement pour wallee, ainsi que des informations supplémentaires sur les transitions entre les états.</p>
|
||||
<p>Vous trouverez ci-dessous un diagramme qui montre l’association des différents états de Shopware pour l’état de paiement pour VR Payment, ainsi que des informations supplémentaires sur les transitions entre les états.</p>
|
||||
</div><div class="imageblock">
|
||||
<div class="content">
|
||||
<img src="resource/shopware_6_stage_graph_order.svg" alt="shopware 6 stage graph order"/>
|
||||
@@ -520,7 +533,7 @@ Veuillez noter que si vous n’utilisez pas Space View Id, cette option doit
|
||||
</div><div class="olist glossary">
|
||||
<ol class="glossary">
|
||||
<li>
|
||||
<p>Si la transaction est <code>Autorisée</code> dans wallee, le statut du paiement de la commande dans le Shopware est marqué comme étant <code>En Cours</code>.</p>
|
||||
<p>Si la transaction est <code>Autorisée</code> dans VR Payment, le statut du paiement de la commande dans le Shopware est marqué comme étant <code>En Cours</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Si la transaction échoue avant ou pendant le processus d’autorisation, le statut du paiement de la commande du Shopware est marqué comme <code>Échouée</code>.</p>
|
||||
@@ -529,7 +542,7 @@ Veuillez noter que si vous n’utilisez pas Space View Id, cette option doit
|
||||
<p>Si la transaction échoue après l’autorisation, le statut du paiement de la commande du Shopware est marqué comme <code>Annulée</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Si la facture de la transaction dans wallee est marquée comme <code>Payée</code> ou <code>Non Applicable</code>, le statut du paiement de la commande dans le Shopware est marqué comme <code>Payée</code>.</p>
|
||||
<p>Si la facture de la transaction dans VR Payment est marquée comme <code>Payée</code> ou <code>Non Applicable</code>, le statut du paiement de la commande dans le Shopware est marqué comme <code>Payée</code>.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</div> <div class="section" id="_remarques_générales_concernant_les_différents_status_pour_les_paiements">
|
||||
@@ -557,10 +570,10 @@ Veuillez noter que si vous n’utilisez pas Space View Id, cette option doit
|
||||
</div><div class="olist glossary">
|
||||
<ol class="glossary">
|
||||
<li>
|
||||
<p>Si la transaction est <code>confirmée</code> dans wallee, le statut de livraison de la commande dans le Shopware est indiqué comme étant <code>En Attente</code>.</p>
|
||||
<p>Si la transaction est <code>confirmée</code> dans VR Payment, le statut de livraison de la commande dans le Shopware est indiqué comme étant <code>En Attente</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Si la transaction dans wallee est marquée comme <code>Délivrée</code>, le statut de livraison de la commande Shopware est marqué comme <code>Ouvert</code>.</p>
|
||||
<p>Si la transaction dans VR Payment est marquée comme <code>Délivrée</code>, le statut de livraison de la commande Shopware est marqué comme <code>Ouvert</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Si la transaction est en statut <code>Déclinée</code>, <code>Échouée</code> ou <code>Annulée</code>, le statut de livraison de la commande du Shopware est marqué comme <code>Annulée</code>.</p>
|
||||
@@ -575,7 +588,7 @@ Veuillez noter que si vous n’utilisez pas Space View Id, cette option doit
|
||||
</div>
|
||||
<div class="chapter-body">
|
||||
<div class="paragraph">
|
||||
<p>Vous pouvez capturer, annuler et rembourser des transactions directement depuis le backend de Shopware. Veuillez noter que si vous remboursez, annulez ou capturez des transactions dans wallee, les événements seront synchronisés dans Shopware. Cependant, il y a quelques limitations (voir ci-dessous).</p>
|
||||
<p>Vous pouvez capturer, annuler et rembourser des transactions directement depuis le backend de Shopware. Veuillez noter que si vous remboursez, annulez ou capturez des transactions dans VR Payment, les événements seront synchronisés dans Shopware. Cependant, il y a quelques limitations (voir ci-dessous).</p>
|
||||
</div> <div class="section" id="_complete_capture_an_order">
|
||||
<div class="section-title">
|
||||
<h2>
|
||||
@@ -593,7 +606,7 @@ Veuillez noter que si vous n’utilisez pas Space View Id, cette option doit
|
||||
<div class="title">Note</div>
|
||||
</td>
|
||||
<td class="content">
|
||||
Lorsque le paiement est en attente dans wallee, la commande reste en attente.
|
||||
Lorsque le paiement est en attente dans VR Payment, la commande reste en attente.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -604,9 +617,9 @@ Lorsque le paiement est en attente dans wallee, la commande reste en attente.
|
||||
</div><div class="paragraph">
|
||||
<p><strong>Finalisation du paiement de manière différée</strong></p>
|
||||
</div><div class="paragraph">
|
||||
<p>Les détaillants souhaitent souvent autoriser les transactions et lancer le processus d’exécution une fois que tous les articles peuvent être expédiés. Cela est également possible avec wallee.</p>
|
||||
<p>Les détaillants souhaitent souvent autoriser les transactions et lancer le processus d’exécution une fois que tous les articles peuvent être expédiés. Cela est également possible avec VR Payment.</p>
|
||||
</div><div class="paragraph">
|
||||
<p>Cependant, certains processus doivent être suivis. Si vous avez configuré la finalisation du paiement pour qu’il soit différé, vous devez capturer la transaction avant d’initier l’expédition, car il peut toujours arriver qu’une finalisation échoue. Si vous voulez être sûr de ne pas expédier d’articles pour lesquels vous n’avez pas été payé, vous devez reporter l’expédition jusqu’à ce que l’état <code>Confirmé</code> soit atteint. Au départ, la transaction sera dans l’état <code>Autorisé</code> dans wallee et <code>En cours</code> dans Shopware. Si vous souhaitez lancer le processus d’exécution, assurez-vous de lancer le processus d’achèvement comme décrit ci-dessus. Une fois le processus terminé avec succès, la commande passera à l’état <code>Confirmée</code> dans wallee et à l’état Payée dans Shopware. Vous pouvez maintenant lancer le processus de livraison .</p>
|
||||
<p>Cependant, certains processus doivent être suivis. Si vous avez configuré la finalisation du paiement pour qu’il soit différé, vous devez capturer la transaction avant d’initier l’expédition, car il peut toujours arriver qu’une finalisation échoue. Si vous voulez être sûr de ne pas expédier d’articles pour lesquels vous n’avez pas été payé, vous devez reporter l’expédition jusqu’à ce que l’état <code>Confirmé</code> soit atteint. Au départ, la transaction sera dans l’état <code>Autorisé</code> dans VR Payment et <code>En cours</code> dans Shopware. Si vous souhaitez lancer le processus d’exécution, assurez-vous de lancer le processus d’achèvement comme décrit ci-dessus. Une fois le processus terminé avec succès, la commande passera à l’état <code>Confirmée</code> dans VR Payment et à l’état Payée dans Shopware. Vous pouvez maintenant lancer le processus de livraison .</p>
|
||||
</div> </div>
|
||||
</div> <div class="section" id="_annuler_une_transaction">
|
||||
<div class="section-title">
|
||||
@@ -665,7 +678,7 @@ Il peut s’écouler un certain temps avant que vous ne voyiez le remboursem
|
||||
</div>
|
||||
<div class="section-body">
|
||||
<div class="paragraph">
|
||||
<p>La livraison ne doit pas être effectuée tant que l’état de la livraison est en attente. Cela se produit lorsque la transaction dans wallee n’a pas atteint l’état Confirmé.</p>
|
||||
<p>La livraison ne doit pas être effectuée tant que l’état de la livraison est en attente. Cela se produit lorsque la transaction dans VR Payment n’a pas atteint l’état Confirmé.</p>
|
||||
</div><div class="paragraph">
|
||||
<p>Il y a essentiellement deux raisons pour lesquelles cela peut se produire :</p>
|
||||
</div><div class="ulist">
|
||||
@@ -674,22 +687,22 @@ Il peut s’écouler un certain temps avant que vous ne voyiez le remboursem
|
||||
<p>La transaction n’est pas terminée. Dans ce cas, vous devez compléter la transaction comme indiqué ci-dessus..</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Nous ne sommes pas en mesure de déterminer si vous devez honorer la commande. La décision de livraison est prise automatiquement. Si cela ne se produit pas dans le délai défini, wallee génère une tâche manuelle que vous devez observer et suivre les instructions.</p>
|
||||
<p>Nous ne sommes pas en mesure de déterminer si vous devez honorer la commande. La décision de livraison est prise automatiquement. Si cela ne se produit pas dans le délai défini, VR Payment génère une tâche manuelle que vous devez observer et suivre les instructions.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div><div class="paragraph">
|
||||
<p>Vous trouverez plus d’informations sur les tâches manuelles dans notre <a href="https://gateway.vr-payment.de/en-us/doc/manual-tasks" target="_blank">Documentation sur les Tâches Manuelles.</a>.</p>
|
||||
</div> </div>
|
||||
</div> <div class="section" id="_limites_de_la_synchronisation_entre_wallee_et_shopware">
|
||||
</div> <div class="section" id="_limites_de_la_synchronisation_entre_whitelabelname_et_shopware">
|
||||
<div class="section-title">
|
||||
<h2>
|
||||
<span class="title-number">8.5</span>Limites de la synchronisation entre wallee et Shopware </h2>
|
||||
<span class="title-number">8.5</span>Limites de la synchronisation entre VR Payment et Shopware </h2>
|
||||
</div>
|
||||
<div class="section-body">
|
||||
<div class="paragraph">
|
||||
<p>Veuillez noter que les captures, annulations et remboursements effectués dans wallee sont synchronisés. Cependant, il y a quelques limitations. Dans wallee, vous pouvez modifier le <strong>prix unitaire</strong> et <strong>la quantité</strong> en une seule fois. Cela n’est pas possible dans le backend du Shopware. Nous vous recommandons donc d’effectuer les remboursements toujours dans le backend de Shopware et non dans wallee. Si un remboursement ne peut pas être synchronisé, il sera envoyé au processeur, mais il se peut que vous ne le voyiez pas dans votre backend Shopware.</p>
|
||||
<p>Veuillez noter que les captures, annulations et remboursements effectués dans VR Payment sont synchronisés. Cependant, il y a quelques limitations. Dans VR Payment, vous pouvez modifier le <strong>prix unitaire</strong> et <strong>la quantité</strong> en une seule fois. Cela n’est pas possible dans le backend du Shopware. Nous vous recommandons donc d’effectuer les remboursements toujours dans le backend de Shopware et non dans VR Payment. Si un remboursement ne peut pas être synchronisé, il sera envoyé au processeur, mais il se peut que vous ne le voyiez pas dans votre backend Shopware.</p>
|
||||
</div><div class="paragraph">
|
||||
<p>Vous pouvez trouver plus d’informations sur les remboursements dans wallee dans notre <a href="https://gateway.vr-payment.de/en-us/doc/payment/refund" target="_blank">Documentation sur les Remboursements.</a>.</p>
|
||||
<p>Vous pouvez trouver plus d’informations sur les remboursements dans VR Payment dans notre <a href="https://gateway.vr-payment.de/en-us/doc/payment/refund" target="_blank">Documentation sur les Remboursements.</a>.</p>
|
||||
</div> </div>
|
||||
</div> <div class="section" id="_tokenisation">
|
||||
<div class="section-title">
|
||||
@@ -732,13 +745,13 @@ La tokenisation n’est pas disponible pour les paiements par les invités.
|
||||
<p><strong>Intégration iFrame</strong>: Intégrez des formulaires de paiement directement dans votre checkout.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Remboursements & Captures</strong>: Déclenchez des remboursements complets/partiels et des captures à partir de Shopware ou du portail Wallee.</p>
|
||||
<p><strong>Remboursements & Captures</strong>: Déclenchez des remboursements complets/partiels et des captures à partir de Shopware ou du portail VR Payment.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Support Multi-Magasins</strong>: Gérez les configurations sur plusieurs magasins.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Mises à jour automatiques</strong>: Les méthodes de paiement se synchronisent dynamiquement via l’API Wallee.</p>
|
||||
<p><strong>Mises à jour automatiques</strong>: Les méthodes de paiement se synchronisent dynamiquement via l’API VR Payment.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Paiements récurrents</strong>: Effectuez des paiements récurrents avec les abonnements (Shopware Commercial) et VRPayment.</p>
|
||||
@@ -757,7 +770,7 @@ La tokenisation n’est pas disponible pour les paiements par les invités.
|
||||
<p>Logs: Vérifiez les logs des payments avec:</p>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">tail -f var/log/whitelabelname_payment*.log</code></pre>
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">tail -f var/log/whitelabelname*.log</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -769,7 +782,7 @@ La tokenisation n’est pas disponible pour les paiements par les invités.
|
||||
<p>Assurez-vous que la commande <code>composer update whitelabelname/shopware-6</code> est exécutée après les mises à jour.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Vérifier que les identifiants de l’API correspondent à votre compte Wallee.</p>
|
||||
<p>Vérifier que les identifiants de l’API correspondent à votre compte VR Payment.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -795,7 +808,7 @@ A: Vous devez vérifier que les webhooks ont été correctement créés. Pour ce
|
||||
</div>
|
||||
</div><div class="paragraph">
|
||||
<p><strong>Q: Ce plugin prend-il en charge les paiements en un clic ?</strong>
|
||||
A: Oui, via la tokenisation dans le portail Wallee.</p>
|
||||
A: Oui, via la tokenisation dans le portail VR Payment.</p>
|
||||
</div><div class="paragraph">
|
||||
<p><strong>Q: Comment gérer la conformité PCI ?</strong>
|
||||
A: Le plugin utilise l’intégration iFrame, réduisant les exigences PCI à SAQ-A.</p>
|
||||
@@ -876,6 +889,11 @@ A: Oui, le plugin prend en charge les portefeuilles comme Apple Pay.</p>
|
||||
<span class="item-number">4.3</span>
|
||||
<span class="item-title">Via Composer (Recommended)</span>
|
||||
</a>
|
||||
</li> <li class="nav-level-2">
|
||||
<a href="#_si_vrpayment_n_apparaît_pas_dans_les_paramètres">
|
||||
<span class="item-number">4.4</span>
|
||||
<span class="item-title">Si VRPayment n&#8217;apparaît pas dans les paramètres</span>
|
||||
</a>
|
||||
</li> </ul>
|
||||
</li> <li class="nav-level-1">
|
||||
<a href="#portal-startup-guide">
|
||||
@@ -962,9 +980,9 @@ A: Oui, le plugin prend en charge les portefeuilles comme Apple Pay.</p>
|
||||
<span class="item-title">Commandes en attente</span>
|
||||
</a>
|
||||
</li> <li class="nav-level-2">
|
||||
<a href="#_limites_de_la_synchronisation_entre_wallee_et_shopware">
|
||||
<a href="#_limites_de_la_synchronisation_entre_whitelabelname_et_shopware">
|
||||
<span class="item-number">8.5</span>
|
||||
<span class="item-title">Limites de la synchronisation entre wallee et Shopware</span>
|
||||
<span class="item-title">Limites de la synchronisation entre VR Payment et Shopware</span>
|
||||
</a>
|
||||
</li> <li class="nav-level-2">
|
||||
<a href="#_tokenisation">
|
||||
|
||||
+39
-21
@@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<meta name="keywords" value="VR Payment, Shopware, Shopware Plugin, Payment, Payment Integration, Documentation"><meta name="description" value="The documentation for the Shopware 6 plugin that enables processing payments with VR Payment.">
|
||||
<link rel="canonical" href="@WalleeCanonicalPath(https://plugin-documentation.wallee.com/wallee-payment, VRPaymentPayment/docs/it/documentation.html)" />
|
||||
<link rel="canonical" href="https://plugin-documentation.wallee.com/wallee-payment/shopware-6/master/VRPaymentPayment/docs/it/documentation.html" />
|
||||
<title>VR Payment Shopware 6 Documentation</title>
|
||||
<link href="assets/monokai-sublime.css" rel="stylesheet" />
|
||||
<link href="assets/base.css" rel="stylesheet" />
|
||||
@@ -23,7 +23,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@WalleeReleasePath()">
|
||||
<a href="https://github.com/vr-payment/shopware-6/releases/tag/7.1.4/">
|
||||
Source
|
||||
</a>
|
||||
</li>
|
||||
@@ -39,7 +39,7 @@
|
||||
</div>
|
||||
<div class="chapter-body">
|
||||
<div class="paragraph">
|
||||
<p>Il Wallee Payment Plugin integra l’elaborazione moderna dei pagamenti in Shopware 6, offrendo funzionalità come pagamenti basati su iFrame, rimborsi, acquisizioni e conformità PCI. Supporta l’integrazione perfetta con il [Portale VR Payment](<a href="https://gateway.vr-payment.de/" class="bare">https://gateway.vr-payment.de/</a>) per la gestione delle transazioni e dei metodi di pagamento.</p>
|
||||
<p>Il VR Payment Plugin integra l’elaborazione moderna dei pagamenti in Shopware 6, offrendo funzionalità come pagamenti basati su iFrame, rimborsi, acquisizioni e conformità PCI. Supporta l’integrazione perfetta con il <a href="https://gateway.vr-payment.de/" target="_blank">Portale VR Payment</a> per la gestione delle transazioni e dei metodi di pagamento.</p>
|
||||
</div><div class="paragraph">
|
||||
<p>Importante: Si prega di notare che solo gli aggiornamenti Major (ad es. 6.x.0.0) e Minor (ad es. 6.0.x.0) saranno testati per la compatibilità entro 2 settimane dal rilascio.</p>
|
||||
</div> </div>
|
||||
@@ -54,7 +54,7 @@
|
||||
</div><div class="paragraph">
|
||||
<p>PHP: Versione minima richiesta dalla vostra installazione di Shopware (ad es. 7.4+).</p>
|
||||
</div><div class="paragraph">
|
||||
<p>Account Wallee: Ottenere Space ID, User ID e API Key dal <a href="#portal-startup-guide">Pannello di Controllo Wallee.</a>.</p>
|
||||
<p>Account VR Payment: Ottenere Space ID, User ID e API Key dal <a href="#portal-startup-guide">Pannello di Controllo VR Payment.</a>.</p>
|
||||
</div> </div>
|
||||
</div> <div class="chapter" id="compatibility">
|
||||
<div class="chapter-title">
|
||||
@@ -125,7 +125,7 @@
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Attivate il plugin Wallee Payment dal Gestore Plugin.</p>
|
||||
<p>Attivate il plugin VR Payment dal Gestore Plugin.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</div> </div>
|
||||
@@ -146,7 +146,7 @@
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">composer require vrpayment/shopware-6
|
||||
php bin/console plugin:refresh
|
||||
php bin/console plugin:install --activate --clearCache VRPaymentPayment</code></pre>
|
||||
php bin/console plugin:install --activate --clearCache VRPayment</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -171,12 +171,25 @@ php bin/console plugin:install --activate --clearCache VRPaymentPayment</code></
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">php bin/console plugin:refresh
|
||||
php bin/console plugin:install --activate --clearCache VRPaymentPayment</code></pre>
|
||||
php bin/console plugin:install --activate --clearCache VRPayment</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div> </div>
|
||||
</div> <div class="section" id="_vrpayment_non_appare_nelle_impostazioni">
|
||||
<div class="section-title">
|
||||
<h2>
|
||||
<span class="title-number">4.4</span>VRPayment non appare nelle impostazioni </h2>
|
||||
</div>
|
||||
<div class="section-body">
|
||||
<div class="paragraph">
|
||||
<p>Dovrebbe eseguire il seguente comando</p>
|
||||
</div><div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">bin/build-administration.sh</code></pre>
|
||||
</div>
|
||||
</div> </div>
|
||||
</div> </div>
|
||||
</div> <div class="chapter" id="portal-startup-guide">
|
||||
<div class="chapter-title">
|
||||
@@ -358,7 +371,7 @@ Si prega di notare che i connettori sembrano duplicati, ma è perché uno è per
|
||||
<div class="olist loweralpha">
|
||||
<ol class="loweralpha" type="a">
|
||||
<li>
|
||||
<p>Navigate su <strong>Shopware Admin → Impostazioni → Estensioni → VR Payment Payment</strong> e cliccate su Salva.</p>
|
||||
<p>Navigate su <strong>Shopware Admin → Impostazioni → Estensioni → VR Payment</strong> e cliccate su Salva.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Inserite il vostro Space ID, User ID, e API Key</p>
|
||||
@@ -381,7 +394,7 @@ Si prega di notare che i connettori sembrano duplicati, ma è perché uno è per
|
||||
<li>
|
||||
<p><strong>Metodi di Pagamento</strong></p>
|
||||
<div class="paragraph">
|
||||
<p>I metodi di pagamento disponibili al checkout sono gestiti dal [Portale VR Payment](<a href="https://gateway.vr-payment.de/" class="bare">https://gateway.vr-payment.de/</a>). Se desiderate disabilitare un metodo di pagamento, dovrete disabilitarlo dal portale.</p>
|
||||
<p>I metodi di pagamento disponibili al checkout sono gestiti dal <a href="https://gateway.vr-payment.de/" target="_blank">Portale VR Payment</a>. Se desiderate disabilitare un metodo di pagamento, dovrete disabilitarlo dal portale.</p>
|
||||
</div>
|
||||
<div class="admonitionblock note">
|
||||
<table>
|
||||
@@ -491,9 +504,9 @@ Si prega di notare che se non utilizzate lo Space View Id, questa opzione dovreb
|
||||
</div>
|
||||
<div class="chapter-body">
|
||||
<div class="paragraph">
|
||||
<p>Il processo di pagamento di Wallee è completamente standardizzato per ogni metodo di pagamento che potete elaborare. Questo vi dà la possibilità di aggiungere semplicemente un metodo di pagamento o un processore senza modifiche all’interno della vostra configurazione di Shopware. Una panoramica degli stati e dei processi di pagamento di Wallee è disponibile nella <a href="https://gateway.vr-payment.de/en-us/doc/payment/transaction-process" target="_blank">Documentazione sui Pagamenti</a>.</p>
|
||||
<p>Il processo di pagamento di VR Payment è completamente standardizzato per ogni metodo di pagamento che potete elaborare. Questo vi dà la possibilità di aggiungere semplicemente un metodo di pagamento o un processore senza modifiche all’interno della vostra configurazione di Shopware. Una panoramica degli stati e dei processi di pagamento di VR Payment è disponibile nella <a href="https://gateway.vr-payment.de/en-us/doc/payment/transaction-process" target="_blank">Documentazione sui Pagamenti</a>.</p>
|
||||
</div><div class="paragraph">
|
||||
<p>Nella sezione seguente, forniamo una panoramica di come gli stati di Wallee sono mappati nel grafico degli stati di Shopware per gli ordini e gli stati di pagamento.</p>
|
||||
<p>Nella sezione seguente, forniamo una panoramica di come gli stati di VR Payment sono mappati nel grafico degli stati di Shopware per gli ordini e gli stati di pagamento.</p>
|
||||
</div> <div class="section" id="_mappatura_degli_stati_degli_ordini_di_shopware">
|
||||
<div class="section-title">
|
||||
<h2>
|
||||
@@ -600,7 +613,7 @@ Si prega di notare che se non utilizzate lo Space View Id, questa opzione dovreb
|
||||
<div class="title">Note</div>
|
||||
</td>
|
||||
<td class="content">
|
||||
Quando il completamento è in sospeso in Wallee, l’ordine rimarrà nello stato "in sospeso".
|
||||
Quando il completamento è in sospeso in VR Payment, l’ordine rimarrà nello stato "in sospeso".
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -672,7 +685,7 @@ Potrebbe volerci un po' di tempo prima che vediate il rimborso in Shopware. I ri
|
||||
</div>
|
||||
<div class="section-body">
|
||||
<div class="paragraph">
|
||||
<p>La spedizione non dovrebbe essere effettuata mentre lo stato di spedizione è Hold. Questo accade quando la transazione in Wallee non ha raggiunto lo stato di evasione.</p>
|
||||
<p>La spedizione non dovrebbe essere effettuata mentre lo stato di spedizione è Hold. Questo accade quando la transazione in VR Payment non ha raggiunto lo stato di evasione.</p>
|
||||
</div><div class="paragraph">
|
||||
<p>Ci sono essenzialmente due motivi per cui questo può accadere:</p>
|
||||
</div><div class="ulist">
|
||||
@@ -681,22 +694,22 @@ Potrebbe volerci un po' di tempo prima che vediate il rimborso in Shopware. I ri
|
||||
<p>La transazione non è completata. In questo caso, dovete completare la transazione come scritto sopra.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Non siamo in grado di dire se dovete evadere l’ordine. La decisione di spedizione viene presa automaticamente. Se ciò non accade entro il periodo di tempo definito, Wallee genererà un’attività manuale che dovreste osservare e seguire le istruzioni.</p>
|
||||
<p>Non siamo in grado di dire se dovete evadere l’ordine. La decisione di spedizione viene presa automaticamente. Se ciò non accade entro il periodo di tempo definito, VR Payment genererà un’attività manuale che dovreste osservare e seguire le istruzioni.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div><div class="paragraph">
|
||||
<p>Potete trovare maggiori informazioni sulle attività manuali nella nostra <a href="https://gateway.vr-payment.de/en-us/doc/manual-tasks" target="_blank">Documentazione sulle Attività Manuali.</a>.</p>
|
||||
</div> </div>
|
||||
</div> <div class="section" id="_limitazioni_della_sincronizzazione_tra_wallee_e_shopware">
|
||||
</div> <div class="section" id="_limitazioni_della_sincronizzazione_tra_whitelabelname_e_shopware">
|
||||
<div class="section-title">
|
||||
<h2>
|
||||
<span class="title-number">8.5</span>Limitazioni della Sincronizzazione tra Wallee e Shopware </h2>
|
||||
<span class="title-number">8.5</span>Limitazioni della Sincronizzazione tra VR Payment e Shopware </h2>
|
||||
</div>
|
||||
<div class="section-body">
|
||||
<div class="paragraph">
|
||||
<p>Si prega di notare che le acquisizioni, le annullazioni e i rimborsi effettuati in Wallee vengono sincronizzati. Tuttavia, ci sono alcune limitazioni. All’interno di Wallee, potete modificare contemporaneamente <strong>il prezzo unitario</strong> e <strong>la quantità</strong>. Questo non può essere fatto nel backend di Shopware. Raccomandiamo pertanto di effettuare sempre i rimborsi all’interno del backend di Shopware e non all’interno di Wallee. Se un rimborso non può essere sincronizzato, verrà inviato al processore, ma potrebbe essere che non lo vediate all’interno del vostro backend di Shopware.</p>
|
||||
<p>Si prega di notare che le acquisizioni, le annullazioni e i rimborsi effettuati in VR Payment vengono sincronizzati. Tuttavia, ci sono alcune limitazioni. All’interno di VR Payment, potete modificare contemporaneamente <strong>il prezzo unitario</strong> e <strong>la quantità</strong>. Questo non può essere fatto nel backend di Shopware. Raccomandiamo pertanto di effettuare sempre i rimborsi all’interno del backend di Shopware e non all’interno di VR Payment. Se un rimborso non può essere sincronizzato, verrà inviato al processore, ma potrebbe essere che non lo vediate all’interno del vostro backend di Shopware.</p>
|
||||
</div><div class="paragraph">
|
||||
<p>Potete trovare maggiori informazioni sui Rimborsi in Wallee nella nostra <a href="https://gateway.vr-payment.de/en-us/doc/payment/refund" target="_blank">Documentazione sui Rimborsi.</a>.</p>
|
||||
<p>Potete trovare maggiori informazioni sui Rimborsi in VR Payment nella nostra <a href="https://gateway.vr-payment.de/en-us/doc/payment/refund" target="_blank">Documentazione sui Rimborsi.</a>.</p>
|
||||
</div> </div>
|
||||
</div> <div class="section" id="_tokenization">
|
||||
<div class="section-title">
|
||||
@@ -764,7 +777,7 @@ La tokenizzazione non è disponibile per i checkout degli ospiti.
|
||||
<p>Logs: Controlla i log dei pagamenti con:</p>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">tail -f var/log/whitelabelname_payment*.log</code></pre>
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">tail -f var/log/whitelabelname*.log</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -887,6 +900,11 @@ La tokenizzazione non è disponibile per i checkout degli ospiti.
|
||||
<span class="item-number">4.3</span>
|
||||
<span class="item-title">Installazione manuale</span>
|
||||
</a>
|
||||
</li> <li class="nav-level-2">
|
||||
<a href="#_vrpayment_non_appare_nelle_impostazioni">
|
||||
<span class="item-number">4.4</span>
|
||||
<span class="item-title">VRPayment non appare nelle impostazioni</span>
|
||||
</a>
|
||||
</li> </ul>
|
||||
</li> <li class="nav-level-1">
|
||||
<a href="#portal-startup-guide">
|
||||
@@ -973,9 +991,9 @@ La tokenizzazione non è disponibile per i checkout degli ospiti.
|
||||
<span class="item-title">Ordini in Attesa</span>
|
||||
</a>
|
||||
</li> <li class="nav-level-2">
|
||||
<a href="#_limitazioni_della_sincronizzazione_tra_wallee_e_shopware">
|
||||
<a href="#_limitazioni_della_sincronizzazione_tra_whitelabelname_e_shopware">
|
||||
<span class="item-number">8.5</span>
|
||||
<span class="item-title">Limitazioni della Sincronizzazione tra Wallee e Shopware</span>
|
||||
<span class="item-title">Limitazioni della Sincronizzazione tra VR Payment e Shopware</span>
|
||||
</a>
|
||||
</li> <li class="nav-level-2">
|
||||
<a href="#_tokenization">
|
||||
|
||||
+123
-102
@@ -251,9 +251,9 @@ class PaymentMethodConfigurationService {
|
||||
{
|
||||
$data = [];
|
||||
$paymentMethodData = [];
|
||||
$salesChannelPaymentMethodData = [];
|
||||
|
||||
$criteria = (new Criteria())->addFilter(new EqualsFilter('state', 'ACTIVE'));
|
||||
$criteria = (new Criteria())->addFilter(new EqualsFilter('state', 'ACTIVE'))
|
||||
->addFilter(new EqualsFilter('spaceId', $this->getSpaceId()));
|
||||
|
||||
/**
|
||||
* @var $vRPaymentPMConfigurationRepository
|
||||
@@ -344,40 +344,67 @@ class PaymentMethodConfigurationService {
|
||||
$paymentMethodConfigurations = $this->getPaymentMethodConfigurations();
|
||||
$this->logger->debug('Updating payment methods', $paymentMethodConfigurations);
|
||||
|
||||
/**
|
||||
* @var $paymentMethodConfiguration \VRPayment\Sdk\Model\PaymentMethodConfiguration
|
||||
*/
|
||||
foreach ($paymentMethodConfigurations as $paymentMethodConfiguration) {
|
||||
|
||||
$paymentMethodConfigurationEntity = $this->getPaymentMethodConfigurationEntity(
|
||||
$paymentMethodConfiguration->getSpaceId(),
|
||||
$paymentMethodConfiguration->getId(),
|
||||
$context
|
||||
$entity = $this->getPaymentMethodConfigurationEntity(
|
||||
$paymentMethodConfiguration->getSpaceId(),
|
||||
$paymentMethodConfiguration->getId(),
|
||||
$context
|
||||
);
|
||||
|
||||
$id = is_null($paymentMethodConfigurationEntity) ? Uuid::randomHex() : $paymentMethodConfigurationEntity->getId();
|
||||
$configId = $entity ? $entity->getId() : Uuid::randomHex();
|
||||
$technicalName = $paymentMethodConfiguration->getName();
|
||||
|
||||
$paymentMethodId = $this->getOrCreatePaymentMethodId(
|
||||
$technicalName,
|
||||
VRPaymentPaymentHandler::class,
|
||||
$context
|
||||
);
|
||||
|
||||
$data = [
|
||||
'id' => $id,
|
||||
'paymentMethodConfigurationId' => $paymentMethodConfiguration->getId(),
|
||||
'paymentMethodId' => $id,
|
||||
'data' => json_decode(strval($paymentMethodConfiguration), true),
|
||||
'sortOrder' => $paymentMethodConfiguration->getSortOrder(),
|
||||
'spaceId' => $paymentMethodConfiguration->getSpaceId(),
|
||||
'state' => CreationEntityState::ACTIVE,
|
||||
'id' => $configId,
|
||||
'paymentMethodConfigurationId' => $paymentMethodConfiguration->getId(),
|
||||
'paymentMethodId' => $paymentMethodId,
|
||||
'data' => json_decode(strval($paymentMethodConfiguration), true),
|
||||
'sortOrder' => $paymentMethodConfiguration->getSortOrder(),
|
||||
'spaceId' => $paymentMethodConfiguration->getSpaceId(),
|
||||
'state' => CreationEntityState::ACTIVE,
|
||||
];
|
||||
|
||||
$this->upsertPaymentMethod($id, $paymentMethodConfiguration, $context);
|
||||
|
||||
try {
|
||||
$this->container->get(PaymentMethodConfigurationEntityDefinition::ENTITY_NAME . '.repository')->upsert([$data], $context);
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error($e->getMessage(), [$e->getTraceAsString()]);
|
||||
}
|
||||
|
||||
try {
|
||||
$this->upsertPaymentMethod($paymentMethodId, $paymentMethodConfiguration, $context);
|
||||
$this->container
|
||||
->get(PaymentMethodConfigurationEntityDefinition::ENTITY_NAME . '.repository')
|
||||
->upsert([$data], $context);
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error($e->getMessage(), [$e->getTraceAsString()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function getOrCreatePaymentMethodId(string $technicalName, string $handlerIdentifier, Context $context): string
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$criteria->addFilter(new EqualsFilter('technicalName', $technicalName));
|
||||
$criteria->setLimit(1);
|
||||
|
||||
$existing = $this->paymentMethodRepository->search($criteria, $context)->first();
|
||||
if ($existing !== null) {
|
||||
return $existing->getId();
|
||||
}
|
||||
|
||||
$paymentMethodId = Uuid::randomHex();
|
||||
|
||||
$this->paymentMethodRepository->upsert([[
|
||||
'id' => $paymentMethodId,
|
||||
'handlerIdentifier' => $handlerIdentifier,
|
||||
'technicalName' => $technicalName,
|
||||
'name' => $technicalName,
|
||||
'active' => false,
|
||||
]], $context);
|
||||
|
||||
return $paymentMethodId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch active merchant payment methods from VRPayment API
|
||||
*
|
||||
@@ -467,53 +494,6 @@ class PaymentMethodConfigurationService {
|
||||
return $configurations->getElements();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update or insert Payment Method
|
||||
*
|
||||
* @param string $id
|
||||
* @param \VRPayment\Sdk\Model\PaymentMethodConfiguration $paymentMethodConfiguration
|
||||
* @param \Shopware\Core\Framework\Context $context
|
||||
*
|
||||
* @throws \VRPayment\Sdk\ApiException
|
||||
* @throws \VRPayment\Sdk\Http\ConnectionException
|
||||
* @throws \VRPayment\Sdk\VersioningException
|
||||
*/
|
||||
protected function upsertPaymentMethod(
|
||||
string $id,
|
||||
PaymentMethodConfiguration $paymentMethodConfiguration,
|
||||
Context $context
|
||||
): void
|
||||
{
|
||||
/** @var PluginIdProvider $pluginIdProvider */
|
||||
$pluginIdProvider = $this->container->get(PluginIdProvider::class);
|
||||
$pluginId = $pluginIdProvider->getPluginIdByBaseClass(
|
||||
VRPaymentPayment::class,
|
||||
$context
|
||||
);
|
||||
|
||||
$data = [
|
||||
'id' => $id,
|
||||
'handlerIdentifier' => VRPaymentPaymentHandler::class,
|
||||
'pluginId' => $pluginId,
|
||||
'position' => $paymentMethodConfiguration->getSortOrder() - 100,
|
||||
'afterOrderEnabled' => true,
|
||||
'active' => true,
|
||||
'translations' => $this->getPaymentMethodConfigurationTranslation($paymentMethodConfiguration, $context),
|
||||
'technicalName' => $paymentMethodConfiguration->getName(),
|
||||
];
|
||||
|
||||
$data['mediaId'] = $this->upsertMedia($id, $paymentMethodConfiguration, $context);
|
||||
|
||||
$data = array_filter($data);
|
||||
|
||||
try {
|
||||
$this->paymentMethodRepository->upsert([$data], $context);
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error($e->getMessage(), [$e->getTraceAsString()]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \VRPayment\Sdk\Model\PaymentMethodConfiguration $paymentMethodConfiguration
|
||||
* @param \Shopware\Core\Framework\Context $context
|
||||
@@ -605,54 +585,95 @@ class PaymentMethodConfigurationService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload Payment Method icons
|
||||
*
|
||||
* @param string $id
|
||||
* @param \VRPayment\Sdk\Model\PaymentMethodConfiguration $paymentMethodConfiguration
|
||||
* @param \Shopware\Core\Framework\Context $context
|
||||
*
|
||||
* @return string|null
|
||||
* Update or insert Payment Method
|
||||
*/
|
||||
protected function upsertPaymentMethod(
|
||||
string $id,
|
||||
PaymentMethodConfiguration $paymentMethodConfiguration,
|
||||
Context $context
|
||||
): void {
|
||||
/** @var PluginIdProvider $pluginIdProvider */
|
||||
$pluginIdProvider = $this->container->get(PluginIdProvider::class);
|
||||
$pluginId = $pluginIdProvider->getPluginIdByBaseClass(
|
||||
VRPaymentPayment::class,
|
||||
$context
|
||||
);
|
||||
|
||||
$data = [
|
||||
'id' => $id,
|
||||
'handlerIdentifier' => VRPaymentPaymentHandler::class,
|
||||
'pluginId' => $pluginId,
|
||||
'position' => $paymentMethodConfiguration->getSortOrder() - 100,
|
||||
'afterOrderEnabled' => true,
|
||||
'active' => true,
|
||||
'translations' => $this->getPaymentMethodConfigurationTranslation($paymentMethodConfiguration, $context),
|
||||
'technicalName' => $paymentMethodConfiguration->getName(),
|
||||
];
|
||||
|
||||
$mediaId = $this->upsertMedia($id, $paymentMethodConfiguration, $context);
|
||||
if ($mediaId) {
|
||||
$data['mediaId'] = $mediaId;
|
||||
}
|
||||
|
||||
try {
|
||||
$this->paymentMethodRepository->upsert([$data], $context);
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error($e->getMessage(), [$e->getTraceAsString()]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload or update Payment Method icons
|
||||
*/
|
||||
protected function upsertMedia(string $id, PaymentMethodConfiguration $paymentMethodConfiguration, Context $context): ?string
|
||||
{
|
||||
try {
|
||||
$existingRecord = $this->getMediaDefaultFolderForPaymentMethod($paymentMethodConfiguration, $context);
|
||||
$folderKey = 'payment_method_' . $paymentMethodConfiguration->getId();
|
||||
|
||||
if ($existingRecord->count() > 0) {
|
||||
$id = $existingRecord->first()->getId();
|
||||
// Check existing default folder
|
||||
$criteria = new Criteria();
|
||||
$criteria->addFilter(new EqualsFilter('entity', $folderKey));
|
||||
$existingFolder = $this->mediaDefaultFolderRepository->search($criteria, $context);
|
||||
|
||||
$folderId = $id;
|
||||
if ($existingFolder->count() > 0) {
|
||||
$folderId = $existingFolder->first()->getId();
|
||||
}
|
||||
|
||||
// Ensure default folder
|
||||
$this->mediaDefaultFolderRepository->upsert([
|
||||
[
|
||||
'id' => $id,
|
||||
'associationFields' => [],
|
||||
'entity' => 'payment_method_' . $paymentMethodConfiguration->getId(),
|
||||
],
|
||||
[
|
||||
'id' => $folderId,
|
||||
'associationFields' => [],
|
||||
'entity' => $folderKey,
|
||||
],
|
||||
], $context);
|
||||
|
||||
// Ensure media folder
|
||||
$this->mediaFolderRepository->upsert([
|
||||
[
|
||||
'id' => $id,
|
||||
'defaultFolderId' => $id,
|
||||
'name' => $paymentMethodConfiguration->getName(),
|
||||
'useParentConfiguration' => false,
|
||||
'configuration' => [],
|
||||
],
|
||||
[
|
||||
'id' => $folderId,
|
||||
'defaultFolderId' => $folderId,
|
||||
'name' => $paymentMethodConfiguration->getName(),
|
||||
'useParentConfiguration' => false,
|
||||
'configuration' => [],
|
||||
],
|
||||
], $context);
|
||||
|
||||
/**
|
||||
* @var \Shopware\Core\Content\Media\MediaDefinition
|
||||
*/
|
||||
// Media insert/update
|
||||
$mediaDefinition = $this->container->get(MediaDefinition::class);
|
||||
$this->mediaSerializer->setRegistry($this->serializerRegistry);
|
||||
|
||||
$data = [
|
||||
'id' => $id,
|
||||
'title' => $paymentMethodConfiguration->getName(),
|
||||
'url' => $paymentMethodConfiguration->getResolvedImageUrl(),
|
||||
'mediaFolderId' => $id,
|
||||
'id' => $id,
|
||||
'title' => $paymentMethodConfiguration->getName(),
|
||||
'url' => $paymentMethodConfiguration->getResolvedImageUrl(),
|
||||
'mediaFolderId' => $folderId,
|
||||
];
|
||||
|
||||
$data = $this->mediaSerializer->deserialize(new Config([], [], []), $mediaDefinition, $data);
|
||||
$this->mediaRepository->upsert([$data], $context);
|
||||
|
||||
return $id;
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->critical($e->getMessage(), [$e->getTraceAsString()]);
|
||||
|
||||
@@ -15,6 +15,7 @@ use Shopware\Core\{
|
||||
System\SalesChannel\SalesChannelContext
|
||||
};
|
||||
use Shopware\Storefront\Page\Checkout\Confirm\CheckoutConfirmPageLoadedEvent;
|
||||
use Shopware\Storefront\Page\Account\Order\AccountEditOrderPageLoadedEvent;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use VRPayment\Sdk\Model\{
|
||||
AddressCreate,
|
||||
@@ -46,6 +47,9 @@ use VRPaymentPayment\Core\{
|
||||
Util\Payload\CustomProducts\CustomProductsLineItemTypes,
|
||||
Util\Payload\TransactionPayload
|
||||
};
|
||||
use Shopware\Core\Checkout\Order\Aggregate\OrderLineItem\OrderLineItemEntity;
|
||||
use Shopware\Core\Framework\Struct\ArrayEntity;
|
||||
use Shopware\Commercial\Subscription\Framework\Struct\SubscriptionContextStruct;
|
||||
|
||||
/**
|
||||
* Class TransactionService
|
||||
@@ -185,10 +189,20 @@ class TransactionService
|
||||
$orderTransaction->getPaymentMethodId(),
|
||||
$orderTransaction->getOrder()->getSalesChannelId()
|
||||
);
|
||||
$_SESSION['transactionId'] = null;
|
||||
$_SESSION['arrayOfPossibleMethods'] = null;
|
||||
$_SESSION['addressCheck'] = null;
|
||||
$_SESSION['currencyCheck'] = null;
|
||||
|
||||
$salesChannelContext->getContext()->addExtension(
|
||||
'checkoutState',
|
||||
new ArrayEntity([
|
||||
'transactionId' => null,
|
||||
'addressHash' => null,
|
||||
'currency' => null,
|
||||
])
|
||||
);
|
||||
|
||||
$salesChannelContext->getContext()->addExtension(
|
||||
'possibleMethods',
|
||||
new ArrayEntity(['ids' => []])
|
||||
);
|
||||
|
||||
|
||||
$this->holdDelivery($orderTransaction->getOrder()->getId(), $salesChannelContext->getContext());
|
||||
@@ -502,24 +516,22 @@ class TransactionService
|
||||
|
||||
/**
|
||||
* @param SalesChannelContext $salesChannelContext
|
||||
* @param CheckoutConfirmPageLoadedEvent|null $event
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function createPendingTransaction(SalesChannelContext $salesChannelContext, ?CheckoutConfirmPageLoadedEvent $event = null): int
|
||||
public function createPendingTransaction(SalesChannelContext $salesChannelContext, $event = null): int
|
||||
{
|
||||
$expiredTransaction = true;
|
||||
$transactionId = $_SESSION['transactionId'] ?? null;
|
||||
$settings = $this->settingsService->getValidSettings($salesChannelContext->getSalesChannel()->getId());
|
||||
if (!$settings) {
|
||||
throw new \Exception('Space settings not configured');
|
||||
}
|
||||
|
||||
if ($transactionId) {
|
||||
$transactionService = $settings->getApiClient()->getTransactionService();
|
||||
$pendingTransaction = $transactionService->read($settings->getSpaceId(), $transactionId);
|
||||
$failedStates = [
|
||||
TransactionState::DECLINE,
|
||||
TransactionState::FAILED,
|
||||
TransactionState::VOIDED,
|
||||
];
|
||||
if (!in_array($pendingTransaction->getState(), $failedStates)) {
|
||||
if ($pendingTransaction->getState() === TransactionState::PENDING) {
|
||||
$expiredTransaction = false;
|
||||
}
|
||||
}
|
||||
@@ -528,75 +540,21 @@ class TransactionService
|
||||
$settings = $this->settingsService->getValidSettings($salesChannelContext->getSalesChannel()->getId());
|
||||
|
||||
$customer = $salesChannelContext->getCustomer();
|
||||
$customerBillingAddress = $customer->getActiveBillingAddress();
|
||||
|
||||
$billingAddress = new AddressCreate();
|
||||
|
||||
$customerAddressEntity = $customer->getActiveBillingAddress();
|
||||
|
||||
$familyName = "";
|
||||
if (!empty($customerAddressEntity->getLastName())) {
|
||||
$familyName = $customerAddressEntity->getLastName();
|
||||
} else {
|
||||
if (!empty($customer->getLastName())) {
|
||||
$familyName = $customer->getLastName();
|
||||
}
|
||||
}
|
||||
$billingAddress->setFamilyName($familyName);
|
||||
|
||||
$givenName = "";
|
||||
if (!empty($customerAddressEntity->getFirstName())) {
|
||||
$givenName = $customerAddressEntity->getFirstName();
|
||||
} else {
|
||||
if (!empty($customer->getFirstName())) {
|
||||
$givenName = $customer->getFirstName();
|
||||
}
|
||||
}
|
||||
$billingAddress->setGivenName($givenName);
|
||||
$billingAddress->setOrganizationName($customerBillingAddress->getCompany());
|
||||
$billingAddress->setPhoneNumber($customerAddressEntity->getPhoneNumber());
|
||||
$billingAddress->setCountry($customerBillingAddress->getCountry()->getIso());
|
||||
$postalState = $customerBillingAddress?->getCountryState()?->getName() ?? '';
|
||||
if (empty($postalState)) {
|
||||
$postalState = $customerBillingAddress?->getCountryState()?->getShortCode() ?? '';
|
||||
}
|
||||
$billingAddress->setPostalState($postalState);
|
||||
$billingAddress->setPostCode($customerBillingAddress->getZipcode());
|
||||
$billingAddress->setStreet($customerBillingAddress->getStreet());
|
||||
$billingAddress->setEmailAddress($customer->getEmail());
|
||||
|
||||
|
||||
if (!empty($customer->getBirthday())) {
|
||||
$birthday = new \DateTime();
|
||||
$birthday->setTimestamp($customer->getBirthday()->getTimestamp());
|
||||
$birthday = $birthday->format('Y-m-d');
|
||||
$billingAddress->setDateOfBirth($birthday);
|
||||
}
|
||||
|
||||
$salutation = "";
|
||||
if (!(
|
||||
empty($customerAddressEntity->getSalutation()) ||
|
||||
empty($customerAddressEntity->getSalutation()->getDisplayName())
|
||||
)) {
|
||||
$salutation = $customerAddressEntity->getSalutation()->getDisplayName();
|
||||
} else {
|
||||
if (!empty($customer->getSalutation())) {
|
||||
$salutation = $customer->getSalutation()->getDisplayName();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$billingAddress->setGender(strtolower($customerAddressEntity->getSalutation()->getSalutationKey()) === 'mr' ? Gender::MALE : Gender::FEMALE);
|
||||
$billingAddress->setSalutation($salutation);
|
||||
|
||||
$lineItems = [];
|
||||
if ($event) {
|
||||
$cartLineItems = $event->getPage()->getCart()->getLineItems()->getElements();
|
||||
foreach ($cartLineItems as $cartLineItem) {
|
||||
if ($cartLineItem->getType() === CustomProductsLineItemTypes::LINE_ITEM_TYPE_CUSTOMIZED_PRODUCTS) {
|
||||
continue;
|
||||
if ($event instanceof CheckoutConfirmPageLoadedEvent) {
|
||||
$cartLineItems = $event->getPage()->getCart()->getLineItems()->getElements();
|
||||
foreach ($cartLineItems as $cartLineItem) {
|
||||
if ($cartLineItem->getType() === CustomProductsLineItemTypes::LINE_ITEM_TYPE_CUSTOMIZED_PRODUCTS) {
|
||||
continue;
|
||||
}
|
||||
$lineItems[] = $this->createTempLineItem($cartLineItem);
|
||||
}
|
||||
} elseif ($event instanceof AccountEditOrderPageLoadedEvent) {
|
||||
$order = $event->getPage()->getOrder();
|
||||
foreach ($order->getLineItems() as $orderLineItem) {
|
||||
$lineItems[] = $this->createTempLineItem($orderLineItem);
|
||||
}
|
||||
$lineItems[] = $this->createTempLineItem($cartLineItem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -608,8 +566,17 @@ class TransactionService
|
||||
$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https://' : 'http://';
|
||||
$homeUrl = $protocol . $_SERVER['HTTP_HOST'];
|
||||
$currency = $salesChannelContext->getCurrency()->getIsoCode();
|
||||
|
||||
$billingAddress = $this->buildAddress($salesChannelContext, $customer->getActiveBillingAddress());
|
||||
$shippingAddress = $this->buildAddress($salesChannelContext, $customer->getActiveShippingAddress());
|
||||
|
||||
if (!$settings) {
|
||||
throw new \Exception('Space settings not configured');
|
||||
}
|
||||
|
||||
$transactionPayload = (new TransactionCreate())
|
||||
->setBillingAddress($billingAddress)
|
||||
->setShippingAddress($shippingAddress)
|
||||
->setLineItems($lineItems)
|
||||
->setCurrency($currency)
|
||||
->setSpaceViewId($settings->getSpaceViewId())
|
||||
@@ -618,8 +585,11 @@ class TransactionService
|
||||
->setCustomerEmailAddress($customer->getEmail())
|
||||
->setCustomerId($customerId)
|
||||
->setSuccessUrl($homeUrl . '?success')
|
||||
->setFailedUrl($homeUrl . '?fail')
|
||||
->setTokenizationMode(TokenizationMode::FORCE_CREATION);
|
||||
->setFailedUrl($homeUrl . '?fail');
|
||||
|
||||
if($this->isSubscription($salesChannelContext)) {
|
||||
$transactionPayload->setTokenizationMode(TokenizationMode::FORCE_CREATION);
|
||||
}
|
||||
|
||||
$transactionService = $settings->getApiClient()->getTransactionService();
|
||||
$transaction = $transactionService->create($settings->getSpaceId(), $transactionPayload);
|
||||
@@ -644,25 +614,14 @@ class TransactionService
|
||||
$transaction = $settings->getApiClient()->getTransactionService()->read($settings->getSpaceId(), $transactionId);
|
||||
$pendingTransaction->setVersion($transaction->getVersion());
|
||||
|
||||
$customerBillingAddress = $salesChannelContext->getCustomer()->getActiveBillingAddress();
|
||||
|
||||
$billingAddress = new AddressCreate();
|
||||
$billingAddress->setStreet($customerBillingAddress->getStreet());
|
||||
$billingAddress->setCity($customerBillingAddress->getCity());
|
||||
$billingAddress->setCountry($customerBillingAddress->getCountry()->getIso());
|
||||
$billingAddress->setPostCode($customerBillingAddress->getZipcode());
|
||||
|
||||
$postalState = $customerBillingAddress?->getCountryState()?->getName() ?? '';
|
||||
if (empty($postalState)) {
|
||||
$postalState = $customerBillingAddress?->getCountryState()?->getShortCode() ?? '';
|
||||
}
|
||||
|
||||
$billingAddress->setPostalState($postalState);
|
||||
$billingAddress->setOrganizationName($customerBillingAddress->getCompany());
|
||||
|
||||
$currency = $salesChannelContext->getCurrency()->getIsoCode();
|
||||
|
||||
$pendingTransaction->setCurrency($currency);
|
||||
$billingAddress = $this->buildAddress($salesChannelContext, $salesChannelContext->getCustomer()->getActiveBillingAddress());
|
||||
$shippingAddress = $this->buildAddress($salesChannelContext, $salesChannelContext->getCustomer()->getActiveShippingAddress());
|
||||
|
||||
$pendingTransaction->setBillingAddress($billingAddress);
|
||||
$pendingTransaction->setShippingAddress($shippingAddress);
|
||||
|
||||
$settings->getApiClient()->getTransactionService()
|
||||
->update($settings->getSpaceId(), $pendingTransaction);
|
||||
@@ -752,20 +711,93 @@ class TransactionService
|
||||
return $chargeAttempts ? $chargeAttempts[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param LineItem $productData
|
||||
* @return LineItemCreate
|
||||
*/
|
||||
private function createTempLineItem(LineItem $productData): LineItemCreate
|
||||
{
|
||||
$lineItem = new LineItemCreate();
|
||||
$lineItem->setName($productData->getLabel());
|
||||
$lineItem->setUniqueId($productData->getId());
|
||||
$lineItem->setSku($productData->getId());
|
||||
$lineItem->setQuantity($productData->getQuantity());
|
||||
$lineItem->setAmountIncludingTax($productData->getPrice()->getUnitPrice());
|
||||
$lineItem->setType(LineItemType::PRODUCT);
|
||||
private function createTempLineItem($productData): LineItemCreate
|
||||
{
|
||||
$lineItem = new LineItemCreate();
|
||||
|
||||
return $lineItem;
|
||||
if ($productData instanceof LineItem) {
|
||||
$lineItem->setName($productData->getLabel());
|
||||
$lineItem->setUniqueId($productData->getId());
|
||||
$lineItem->setSku($productData->getReferencedId() ?? $productData->getId());
|
||||
$lineItem->setQuantity($productData->getQuantity());
|
||||
$lineItem->setAmountIncludingTax($productData->getPrice()->getUnitPrice());
|
||||
} elseif ($productData instanceof OrderLineItemEntity) {
|
||||
$lineItem->setName($productData->getLabel());
|
||||
$lineItem->setUniqueId($productData->getId());
|
||||
$lineItem->setSku($productData->getProductId() ?? $productData->getIdentifier() ?? $productData->getId());
|
||||
$lineItem->setQuantity($productData->getQuantity());
|
||||
$lineItem->setAmountIncludingTax($productData->getUnitPrice());
|
||||
} else {
|
||||
throw new \InvalidArgumentException('Unsupported line item type: ' . get_class($productData));
|
||||
}
|
||||
|
||||
$lineItem->setType(LineItemType::PRODUCT);
|
||||
|
||||
return $lineItem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a VRPayment address from Shopware customer address.
|
||||
*
|
||||
* @param \Shopware\Core\System\SalesChannel\SalesChannelContext $salesChannelContext
|
||||
* @param \Shopware\Core\Checkout\Customer\Aggregate\CustomerAddress\CustomerAddressEntity $addressEntity
|
||||
* @return \VRPayment\Sdk\Model\AddressCreate
|
||||
*/
|
||||
private function buildAddress(
|
||||
SalesChannelContext $salesChannelContext,
|
||||
\Shopware\Core\Checkout\Customer\Aggregate\CustomerAddress\CustomerAddressEntity $addressEntity
|
||||
): AddressCreate {
|
||||
$customer = $salesChannelContext->getCustomer();
|
||||
|
||||
$address = new AddressCreate();
|
||||
|
||||
$address->setFamilyName($addressEntity->getLastName() ?: $customer->getLastName() ?: '');
|
||||
$address->setGivenName($addressEntity->getFirstName() ?: $customer->getFirstName() ?: '');
|
||||
$address->setOrganizationName($addressEntity->getCompany());
|
||||
$address->setPhoneNumber($addressEntity->getPhoneNumber());
|
||||
$address->setCountry($addressEntity->getCountry()->getIso());
|
||||
|
||||
$postalState = $addressEntity?->getCountryState()?->getName()
|
||||
?: $addressEntity?->getCountryState()?->getShortCode()
|
||||
?: '';
|
||||
$address->setPostalState($postalState);
|
||||
|
||||
$address->setPostCode($addressEntity->getZipcode());
|
||||
$address->setStreet($addressEntity->getStreet());
|
||||
$address->setEmailAddress($customer->getEmail());
|
||||
|
||||
if (!empty($customer->getBirthday())) {
|
||||
$birthday = (new \DateTimeImmutable())
|
||||
->setTimestamp($customer->getBirthday()->getTimestamp())
|
||||
->format('Y-m-d');
|
||||
$address->setDateOfBirth($birthday);
|
||||
}
|
||||
|
||||
$salutationEntity = $addressEntity->getSalutation() ?: $customer->getSalutation();
|
||||
$address->setSalutation($salutationEntity?->getDisplayName() ?? '');
|
||||
$address->setGender(
|
||||
strtolower($salutationEntity?->getSalutationKey() ?? '') === 'mr'
|
||||
? Gender::MALE
|
||||
: Gender::FEMALE
|
||||
);
|
||||
|
||||
return $address;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if it's subscription context.
|
||||
*
|
||||
* @param \Shopware\Core\System\SalesChannel\SalesChannelContext $salesChannelContext
|
||||
* @return bool
|
||||
*/
|
||||
private function isSubscription(SalesChannelContext $salesChannelContext): bool {
|
||||
$extensionName = 'subscription';
|
||||
if (class_exists(\Shopware\Commercial\Subscription\Framework\Struct\SubscriptionContextStruct::class)) {
|
||||
$extensionName = SubscriptionContextStruct::SUBSCRIPTION_EXTENSION;
|
||||
}
|
||||
if ($salesChannelContext->hasExtension($extensionName)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,8 +224,18 @@ class WebHookController extends AbstractController {
|
||||
// Configuration
|
||||
$salesChannelId = $salesChannelId == 'null' ? null : $salesChannelId;
|
||||
$this->settings = $this->settingsService->getSettings($salesChannelId);
|
||||
|
||||
$signature = $request->server->get('HTTP_X_SIGNATURE');
|
||||
$requestJson = json_decode($request->getContent(), true);
|
||||
|
||||
if ($requestJson['eventId'] == null && $requestJson['entityId'] == null && $requestJson['listenerEntityId'] == null && $requestJson['listenerEntityId'] == null && $requestJson['listenerEntityTechnicalName'] == null && $requestJson['spaceId'] == null) {
|
||||
throw new \InvalidArgumentException('Empty webhook');
|
||||
}
|
||||
|
||||
if (!$this->settings->getSpaceId() || !$this->settings->getUserId() || !$this->settings->getApplicationKey()) {
|
||||
throw new \InvalidArgumentException('Not correct webhook configuration for salesChannelId: ' . $salesChannelId . ' Debug: ' . var_dump($requestJson));
|
||||
}
|
||||
|
||||
$apiClient = $this->settings->getApiClient();
|
||||
$callBackData->assign($requestJson);
|
||||
|
||||
|
||||
@@ -133,7 +133,20 @@ class VRPaymentPaymentHandler extends AbstractPaymentHandler
|
||||
$salesChannelContextId = $contextSource->getSalesChannelId();
|
||||
}
|
||||
|
||||
$parameters = new SalesChannelContextServiceParameters($salesChannelContextId, $request->getSession()->get("sw-context-token", Random::getAlphanumericString(32)), originalContext: $context);
|
||||
$orderCustomer = $orderTransaction->getOrder()?->getOrderCustomer();
|
||||
|
||||
if ($orderCustomer) {
|
||||
$customerId = $orderCustomer->getCustomerId();
|
||||
} else {
|
||||
$customerId = null;
|
||||
}
|
||||
|
||||
$parameters = new SalesChannelContextServiceParameters(
|
||||
$salesChannelContextId,
|
||||
$request->getSession()->get("sw-context-token", Random::getAlphanumericString(32)),
|
||||
originalContext: $context,
|
||||
customerId: $customerId
|
||||
);
|
||||
$salesChannelContext = $this->salesChannelContextService->get($parameters);
|
||||
$redirectUrl = $transaction->getReturnUrl();
|
||||
|
||||
@@ -149,7 +162,7 @@ class VRPaymentPaymentHandler extends AbstractPaymentHandler
|
||||
$request->getSession()->remove('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 PaymentException::customerCanceled($orderTransactionId, $errorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +207,7 @@ class VRPaymentPaymentHandler extends AbstractPaymentHandler
|
||||
]);
|
||||
$request->getSession()->remove('transactionId');
|
||||
$this->logger->info($errorMessage);
|
||||
throw PaymentException::customerCanceled($transaction->getOrderTransaction()->getId(), $errorMessage);
|
||||
throw PaymentException::customerCanceled($orderTransactionId, $errorMessage);
|
||||
}
|
||||
} else {
|
||||
$this->orderTransactionStateHandler->paid($orderTransaction->getId(), $context);
|
||||
|
||||
@@ -4,33 +4,41 @@ namespace VRPaymentPayment\Core\Storefront\Checkout\Subscriber;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Shopware\Core\{Checkout\Order\Aggregate\OrderTransaction\OrderTransactionCollection,
|
||||
Checkout\Order\Aggregate\OrderTransaction\OrderTransactionStates,
|
||||
Checkout\Order\OrderEntity,
|
||||
Content\MailTemplate\Service\Event\MailBeforeValidateEvent};
|
||||
Checkout\Order\Aggregate\OrderTransaction\OrderTransactionStates,
|
||||
Checkout\Order\OrderEntity,
|
||||
Content\MailTemplate\Service\Event\MailBeforeValidateEvent};
|
||||
use Shopware\Core\Checkout\Payment\PaymentMethodCollection;
|
||||
use Shopware\Core\Framework\DataAbstractionLayer\EntityRepository;
|
||||
use Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
|
||||
use Shopware\Core\Framework\DataAbstractionLayer\Search\Filter\EqualsFilter;
|
||||
use Shopware\Core\Framework\DataAbstractionLayer\Search\Filter\MultiFilter;
|
||||
use Shopware\Core\System\SalesChannel\SalesChannelContext;
|
||||
use Shopware\Storefront\Page\Account\Order\AccountEditOrderPageLoadedEvent;
|
||||
use Shopware\Storefront\Page\Account\PaymentMethod\AccountPaymentMethodPageLoadedEvent;
|
||||
use Shopware\Storefront\Page\Checkout\Confirm\CheckoutConfirmPageLoadedEvent;
|
||||
use Shopware\Storefront\Page\Checkout\Finish\CheckoutFinishPageLoadedEvent;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use VRPaymentPayment\Core\{Api\Transaction\Service\OrderMailService,
|
||||
Api\Transaction\Service\TransactionService,
|
||||
Checkout\PaymentHandler\VRPaymentPaymentHandler,
|
||||
Settings\Service\SettingsService,
|
||||
Settings\Struct\Settings,
|
||||
Util\PaymentMethodUtil};
|
||||
use VRPaymentPayment\Core\{Api\Transaction\Service\TransactionService,
|
||||
Checkout\PaymentHandler\VRPaymentPaymentHandler,
|
||||
Settings\Service\SettingsService,
|
||||
Settings\Struct\Settings,
|
||||
Util\PaymentMethodUtil};
|
||||
use VRPaymentPayment\Core\Api\PaymentMethodConfiguration\Service\PaymentMethodConfigurationService;
|
||||
use VRPaymentPayment\Sdk\{Model\AddressCreate,
|
||||
Model\ChargeAttempt,
|
||||
Model\CreationEntityState,
|
||||
Model\CriteriaOperator,
|
||||
Model\EntityQuery,
|
||||
Model\EntityQueryFilter,
|
||||
Model\EntityQueryFilterType,
|
||||
Model\LineItemAttributeCreate,
|
||||
Model\LineItemCreate,
|
||||
Model\LineItemType,
|
||||
Model\TaxCreate,
|
||||
Model\Transaction,
|
||||
Model\TransactionCreate,
|
||||
Model\TransactionPending};
|
||||
Model\ChargeAttempt,
|
||||
Model\CreationEntityState,
|
||||
Model\CriteriaOperator,
|
||||
Model\EntityQuery,
|
||||
Model\EntityQueryFilter,
|
||||
Model\EntityQueryFilterType,
|
||||
Model\LineItemAttributeCreate,
|
||||
Model\LineItemCreate,
|
||||
Model\LineItemType,
|
||||
Model\TaxCreate,
|
||||
Model\Transaction,
|
||||
Model\TransactionCreate,
|
||||
Model\TransactionPending};
|
||||
use Shopware\Core\Framework\Struct\ArrayEntity;
|
||||
|
||||
/**
|
||||
* Class CheckoutSubscriber
|
||||
@@ -65,6 +73,9 @@ class CheckoutSubscriber implements EventSubscriberInterface
|
||||
*/
|
||||
private $paymentMethodUtil;
|
||||
|
||||
/** @var EntityRepository */
|
||||
private EntityRepository $paymentMethodRepository;
|
||||
|
||||
/**
|
||||
* CheckoutSubscriber constructor.
|
||||
*
|
||||
@@ -72,13 +83,15 @@ class CheckoutSubscriber implements EventSubscriberInterface
|
||||
* @param \VRPaymentPayment\Core\Api\Transaction\Service\TransactionService $transactionService
|
||||
* @param \VRPaymentPayment\Core\Settings\Service\SettingsService $settingsService
|
||||
* @param \VRPaymentPayment\Core\Util\PaymentMethodUtil $paymentMethodUtil
|
||||
* @param EntityRepository $paymentMethodRepository
|
||||
*/
|
||||
public function __construct(PaymentMethodConfigurationService $paymentMethodConfigurationService, TransactionService $transactionService, SettingsService $settingsService, PaymentMethodUtil $paymentMethodUtil)
|
||||
public function __construct(PaymentMethodConfigurationService $paymentMethodConfigurationService, TransactionService $transactionService, SettingsService $settingsService, PaymentMethodUtil $paymentMethodUtil, EntityRepository $paymentMethodRepository)
|
||||
{
|
||||
$this->paymentMethodConfigurationService = $paymentMethodConfigurationService;
|
||||
$this->transactionService = $transactionService;
|
||||
$this->settingsService = $settingsService;
|
||||
$this->paymentMethodUtil = $paymentMethodUtil;
|
||||
$this->paymentMethodConfigurationService = $paymentMethodConfigurationService;
|
||||
$this->transactionService = $transactionService;
|
||||
$this->settingsService = $settingsService;
|
||||
$this->paymentMethodUtil = $paymentMethodUtil;
|
||||
$this->paymentMethodRepository = $paymentMethodRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -99,7 +112,9 @@ class CheckoutSubscriber implements EventSubscriberInterface
|
||||
public static function getSubscribedEvents(): array
|
||||
{
|
||||
return [
|
||||
CheckoutConfirmPageLoadedEvent::class => ['onConfirmPageLoaded', 1],
|
||||
CheckoutConfirmPageLoadedEvent::class => 'onCheckoutConfirmLoaded',
|
||||
AccountEditOrderPageLoadedEvent::class => 'onAccountOrderEditLoaded',
|
||||
AccountPaymentMethodPageLoadedEvent::class => 'onAccountPaymentMethodLoaded',
|
||||
"subscription." . CheckoutConfirmPageLoadedEvent::class => ['onConfirmPageLoaded', 1],
|
||||
MailBeforeValidateEvent::class => ['onMailBeforeValidate', 1],
|
||||
];
|
||||
@@ -154,9 +169,10 @@ class CheckoutSubscriber implements EventSubscriberInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Shopware\Storefront\Page\Checkout\Confirm\CheckoutConfirmPageLoadedEvent $event
|
||||
* @param CheckoutConfirmPageLoadedEvent $event
|
||||
* @return void
|
||||
*/
|
||||
public function onConfirmPageLoaded(CheckoutConfirmPageLoadedEvent $event): void
|
||||
public function onCheckoutConfirmLoaded(CheckoutConfirmPageLoadedEvent $event): void
|
||||
{
|
||||
try {
|
||||
$salesChannelContext = $event->getSalesChannelContext();
|
||||
@@ -169,7 +185,7 @@ class CheckoutSubscriber implements EventSubscriberInterface
|
||||
$createdTransactionId = $this->transactionService->createPendingTransaction($salesChannelContext, $event);
|
||||
$this->updateTempTransactionIfNeeded($salesChannelContext, $createdTransactionId);
|
||||
|
||||
$this->getAvailablePaymentMethods($settings, $createdTransactionId);
|
||||
$this->getAvailablePaymentMethods($settings, $createdTransactionId, $salesChannelContext);
|
||||
$this->setPossiblePaymentMethods($settings->getSpaceId(), $event);
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error($e->getMessage());
|
||||
@@ -177,10 +193,74 @@ class CheckoutSubscriber implements EventSubscriberInterface
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param AccountEditOrderPageLoadedEvent $event
|
||||
* @return void
|
||||
*/
|
||||
public function onAccountOrderEditLoaded(AccountEditOrderPageLoadedEvent $event): void
|
||||
{
|
||||
try {
|
||||
$this->handlePaymentMethodFiltering($event);
|
||||
} catch (\Throwable $e) {
|
||||
$this->logger->error($e->getMessage());
|
||||
$this->removeVRPaymentPaymentMethodFromConfirmPage($event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param AccountPaymentMethodPageLoadedEvent $event
|
||||
* @return void
|
||||
*/
|
||||
public function onAccountPaymentMethodLoaded(AccountPaymentMethodPageLoadedEvent $event): void
|
||||
{
|
||||
try {
|
||||
$this->handlePaymentMethodFiltering($event);
|
||||
} catch (\Throwable $e) {
|
||||
$this->logger->error($e->getMessage());
|
||||
$this->removeVRPaymentPaymentMethodFromConfirmPage($event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Shopware\Storefront\Page\Checkout\Confirm\CheckoutConfirmPageLoadedEvent $event
|
||||
*/
|
||||
private function removeVRPaymentPaymentMethodFromConfirmPage(CheckoutConfirmPageLoadedEvent $event): void
|
||||
public function onConfirmPageLoaded(CheckoutConfirmPageLoadedEvent $event): void
|
||||
{
|
||||
try {
|
||||
$this->handlePaymentMethodFiltering($event);
|
||||
} catch (\Throwable $e) {
|
||||
$this->logger->error($e->getMessage());
|
||||
$this->removeVRPaymentPaymentMethodFromConfirmPage($event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $event
|
||||
* @return void
|
||||
*/
|
||||
private function handlePaymentMethodFiltering($event): void
|
||||
{
|
||||
$salesChannelContext = $event->getSalesChannelContext();
|
||||
$settings = $this->settingsService->getValidSettings($salesChannelContext->getSalesChannel()->getId());
|
||||
|
||||
if (is_null($settings)) {
|
||||
$this->logger->notice('Removing payment methods because settings are invalid');
|
||||
$this->removeVRPaymentPaymentMethodFromConfirmPage($event);
|
||||
return;
|
||||
}
|
||||
|
||||
$createdTransactionId = $this->transactionService->createPendingTransaction($salesChannelContext, $event);
|
||||
$this->updateTempTransactionIfNeeded($salesChannelContext, $createdTransactionId);
|
||||
|
||||
$this->getAvailablePaymentMethods($settings, $createdTransactionId, $salesChannelContext);
|
||||
$this->setPossiblePaymentMethods($settings->getSpaceId(), $event);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $event
|
||||
* @return void
|
||||
*/
|
||||
private function removeVRPaymentPaymentMethodFromConfirmPage($event): void
|
||||
{
|
||||
$paymentMethodCollection = $event->getPage()->getPaymentMethods();
|
||||
$paymentMethodIds = $this->paymentMethodUtil->getVRPaymentPaymentMethodIds($event->getContext());
|
||||
@@ -194,7 +274,7 @@ class CheckoutSubscriber implements EventSubscriberInterface
|
||||
* @param int $createdTransactionId
|
||||
* @return void
|
||||
*/
|
||||
private function getAvailablePaymentMethods(Settings $settings, int $createdTransactionId): void
|
||||
private function getAvailablePaymentMethods(Settings $settings, int $createdTransactionId, SalesChannelContext $salesChannelContext): void
|
||||
{
|
||||
$transactionService = $settings->getApiClient()->getTransactionService();
|
||||
$possiblePaymentMethods = $transactionService->fetchPaymentMethods(
|
||||
@@ -204,9 +284,13 @@ class CheckoutSubscriber implements EventSubscriberInterface
|
||||
);
|
||||
$arrayOfPossibleMethods = [];
|
||||
foreach ($possiblePaymentMethods as $possiblePaymentMethod) {
|
||||
$arrayOfPossibleMethods[] = $possiblePaymentMethod->getid();
|
||||
$arrayOfPossibleMethods[] = $possiblePaymentMethod->getId();
|
||||
}
|
||||
$_SESSION['arrayOfPossibleMethods'] = $arrayOfPossibleMethods;
|
||||
|
||||
$salesChannelContext->getContext()->addExtension(
|
||||
'possibleMethods',
|
||||
new ArrayEntity(['ids' => $arrayOfPossibleMethods])
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -214,48 +298,101 @@ class CheckoutSubscriber implements EventSubscriberInterface
|
||||
* @param CheckoutConfirmPageLoadedEvent $event
|
||||
* @return void
|
||||
*/
|
||||
private function setPossiblePaymentMethods(int $spaceId, CheckoutConfirmPageLoadedEvent $event): void
|
||||
private function setPossiblePaymentMethods(int $spaceId, $event): void
|
||||
{
|
||||
$localPaymentMethods = [];
|
||||
$paymentMethodConfigurations = $this->paymentMethodConfigurationService->getAllPaymentMethodConfigurations($spaceId, $event->getSalesChannelContext()->getContext());
|
||||
foreach ($paymentMethodConfigurations as $paymentMethodConfiguration) {
|
||||
$localPaymentMethods[$paymentMethodConfiguration->getId()] = $paymentMethodConfiguration->getPaymentMethodConfigurationId();
|
||||
$paymentIds = [];
|
||||
$paymentMethodCollection = $event->getPage()->getPaymentMethods();
|
||||
|
||||
foreach ($paymentMethodCollection as $paymentMethodCollectionItem) {
|
||||
$isVRPaymentPM = VRPaymentPaymentHandler::class === $paymentMethodCollectionItem->getHandlerIdentifier();
|
||||
if (!$isVRPaymentPM) {
|
||||
$paymentIds[] = $paymentMethodCollectionItem->getId();
|
||||
}
|
||||
}
|
||||
|
||||
$paymentMethodCollection = $event->getPage()->getPaymentMethods();
|
||||
foreach ($paymentMethodCollection as $paymentMethodCollectionItem) {
|
||||
$isVRPaymentPM = VRPaymentPaymentHandler::class == $paymentMethodCollectionItem->getHandlerIdentifier();
|
||||
if (!$isVRPaymentPM) {
|
||||
$allowedWLMethods = [];
|
||||
$paymentMethodConfigurations = $this->paymentMethodConfigurationService
|
||||
->getAllPaymentMethodConfigurations($spaceId, $event->getSalesChannelContext()->getContext());
|
||||
|
||||
foreach ($paymentMethodConfigurations as $paymentMethodConfiguration) {
|
||||
if ($paymentMethodConfiguration->getPaymentMethod() === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$paymentMethodConfigurationId = $localPaymentMethods[$paymentMethodCollectionItem->getId()];
|
||||
if (!\in_array($paymentMethodConfigurationId, $_SESSION['arrayOfPossibleMethods'])) {
|
||||
$paymentMethodCollection->remove($paymentMethodCollectionItem->getId());
|
||||
$pmId = $paymentMethodConfiguration->getPaymentMethod()->getId();
|
||||
$pmConfigId = $paymentMethodConfiguration->getPaymentMethodConfigurationId();
|
||||
$allowedIds = $this->getAllowedPaymentMethodIds($event->getSalesChannelContext());
|
||||
|
||||
if ($paymentMethodConfiguration->getSpaceId() === $spaceId
|
||||
&& \in_array($pmConfigId, $allowedIds, true)) {
|
||||
$allowedWLMethods[] = $pmId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param SalesChannelContext $salesChannelContext
|
||||
* @param int $createdTransactionId
|
||||
* @return void
|
||||
*/
|
||||
private function updateTempTransactionIfNeeded(SalesChannelContext $salesChannelContext, int $createdTransactionId): void
|
||||
{
|
||||
$addressCheck = $_SESSION['addressCheck'] ?? null;
|
||||
$currencyCheck = $_SESSION['currencyCheck'] ?? null;
|
||||
$allPaymentIds = array_unique(array_merge($paymentIds, $allowedWLMethods));
|
||||
$collection = new PaymentMethodCollection();
|
||||
if (!empty($allPaymentIds)) {
|
||||
$criteria = new Criteria($allPaymentIds);
|
||||
$criteria->addFilter(new EqualsFilter('active', true));
|
||||
$criteria->addFilter(
|
||||
new EqualsFilter('salesChannels.id', $event->getSalesChannelContext()->getSalesChannelId())
|
||||
);
|
||||
|
||||
$customer = $salesChannelContext->getCustomer();
|
||||
$addressHash = md5(json_encode((array)$customer));
|
||||
$currency = $salesChannelContext->getCurrency()->getIsoCode();
|
||||
if (($addressCheck && $currencyCheck) && $addressCheck !== $addressHash || $currencyCheck !== $currency) {
|
||||
if ($createdTransactionId) {
|
||||
$this->transactionService->updateTempTransaction($salesChannelContext, $createdTransactionId);
|
||||
$result = $this->paymentMethodRepository->search($criteria, $event->getContext());
|
||||
foreach ($result->getEntities() as $method) {
|
||||
if (!$collection->has($method->getId())) {
|
||||
$collection->add($method);
|
||||
}
|
||||
}
|
||||
$_SESSION['arrayOfPossibleMethods'] = null;
|
||||
$_SESSION['addressCheck'] = $addressHash;
|
||||
$_SESSION['currencyCheck'] = $currency;
|
||||
}
|
||||
|
||||
$event->getPage()->setPaymentMethods($collection);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param SalesChannelContext $salesChannelContext
|
||||
* @param int $createdTransactionId
|
||||
* @return void
|
||||
*/
|
||||
private function updateTempTransactionIfNeeded(SalesChannelContext $salesChannelContext, int $createdTransactionId): void
|
||||
{
|
||||
$ctx = $salesChannelContext->getContext();
|
||||
|
||||
/** @var ArrayEntity|null $ext */
|
||||
$ext = $ctx->getExtension('checkoutState');
|
||||
|
||||
$oldAddressHash = $ext instanceof ArrayEntity ? $ext->get('addressHash') : null;
|
||||
$oldCurrency = $ext instanceof ArrayEntity ? $ext->get('currency') : null;
|
||||
|
||||
$customer = $salesChannelContext->getCustomer();
|
||||
$addressHash = md5(json_encode((array) $customer));
|
||||
$currency = $salesChannelContext->getCurrency()->getIsoCode();
|
||||
|
||||
$needsUpdate = ($oldAddressHash !== $addressHash) || ($oldCurrency !== $currency);
|
||||
|
||||
if ($needsUpdate) {
|
||||
if ($createdTransactionId) {
|
||||
$this->transactionService->updateTempTransaction($salesChannelContext, $createdTransactionId);
|
||||
}
|
||||
|
||||
$ctx->addExtension('possibleMethods', new ArrayEntity(['ids' => []]));
|
||||
$ctx->addExtension(
|
||||
'checkoutState',
|
||||
new ArrayEntity([
|
||||
'addressHash' => $addressHash,
|
||||
'currency' => $currency,
|
||||
])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param SalesChannelContext $salesChannelContext
|
||||
* @return array
|
||||
*/
|
||||
private function getAllowedPaymentMethodIds(SalesChannelContext $salesChannelContext): array
|
||||
{
|
||||
$ext = $salesChannelContext->getContext()->getExtension('possibleMethods');
|
||||
return $ext instanceof ArrayEntity ? ($ext->get('ids') ?? []) : [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 => '7.1.4',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -231,9 +231,16 @@ class TransactionPayload extends AbstractPayload
|
||||
->setShippingAddress($shippingAddress)
|
||||
->setShippingMethod($transactionData['shipping_method']);
|
||||
|
||||
$paymentConfiguration = $this->getPaymentConfiguration($this->salesChannelContext->getPaymentMethod()->getId());
|
||||
$paymentConfiguration = $this->getPaymentConfiguration(
|
||||
$this->salesChannelContext->getPaymentMethod()->getId(),
|
||||
$this->settings->getSpaceId()
|
||||
);
|
||||
|
||||
$transactionPayload->setAllowedPaymentMethodConfigurations([$paymentConfiguration->getPaymentMethodConfigurationId()]);
|
||||
if ($paymentConfiguration) {
|
||||
$transactionPayload->setAllowedPaymentMethodConfigurations([
|
||||
$paymentConfiguration->getPaymentMethodConfigurationId()
|
||||
]);
|
||||
}
|
||||
|
||||
$successUrl = $this->transaction->getReturnUrl() . '&status=paid';
|
||||
$failedUrl = $this->getFailUrl($this->order->getId()) . '&status=fail';
|
||||
@@ -899,19 +906,21 @@ class TransactionPayload extends AbstractPayload
|
||||
return $addressPayload;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
*
|
||||
* @return \VRPaymentPayment\Core\Api\PaymentMethodConfiguration\Entity\PaymentMethodConfigurationEntity
|
||||
*/
|
||||
protected function getPaymentConfiguration(string $id): PaymentMethodConfigurationEntity
|
||||
{
|
||||
$criteria = (new Criteria([$id]));
|
||||
/**
|
||||
* @param string $paymentMethodId
|
||||
* @param int $spaceId
|
||||
* @return PaymentMethodConfigurationEntity|null
|
||||
*/
|
||||
protected function getPaymentConfiguration(string $paymentMethodId, int $spaceId): ?PaymentMethodConfigurationEntity
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$criteria->addFilter(new EqualsFilter('paymentMethodId', $paymentMethodId));
|
||||
$criteria->addFilter(new EqualsFilter('spaceId', $spaceId));
|
||||
|
||||
return $this->container->get('vrpayment_payment_method_configuration.repository')
|
||||
->search($criteria, $this->salesChannelContext->getContext())
|
||||
->getEntities()->first();
|
||||
}
|
||||
return $this->container->get('vrpayment_payment_method_configuration.repository')
|
||||
->search($criteria, $this->salesChannelContext->getContext())
|
||||
->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get failure URL
|
||||
|
||||
+8
-8
@@ -7,16 +7,16 @@
|
||||
:inheritedValue="selectedSalesChannelId == null ? null : allConfigs['null'][CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED]"
|
||||
:customInheritationCheckFunction="checkBoolFieldInheritance">
|
||||
<template #content="props">
|
||||
<mt-switch
|
||||
<sw-switch-field
|
||||
:name="CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED"
|
||||
bordered
|
||||
:mapInheritance="props"
|
||||
:label="$tc('vrpayment-settings.settingForm.advancedOptions.webhooksUpdateEnabled.label')"
|
||||
:helpText="$tc('vrpayment-settings.settingForm.advancedOptions.webhooksUpdateEnabled.tooltipText')"
|
||||
:disabled="props.isInherited"
|
||||
:checked="props.currentValue"
|
||||
@update:checked="props.updateCurrentValue">
|
||||
</mt-switch>
|
||||
:value="props.currentValue"
|
||||
@update:value="props.updateCurrentValue">
|
||||
</sw-switch-field>
|
||||
</template>
|
||||
</sw-inherit-wrapper>
|
||||
|
||||
@@ -25,16 +25,16 @@
|
||||
:inheritedValue="selectedSalesChannelId == null ? null : allConfigs['null'][CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED]"
|
||||
:customInheritationCheckFunction="checkBoolFieldInheritance">
|
||||
<template #content="props">
|
||||
<mt-switch
|
||||
<sw-switch-field
|
||||
:name="CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED"
|
||||
bordered
|
||||
:mapInheritance="props"
|
||||
:label="$tc('vrpayment-settings.settingForm.advancedOptions.paymentsUpdateEnabled.label')"
|
||||
:helpText="$tc('vrpayment-settings.settingForm.advancedOptions.paymentsUpdateEnabled.tooltipText')"
|
||||
:disabled="props.isInherited"
|
||||
:checked="props.currentValue"
|
||||
@update:checked="props.updateCurrentValue">
|
||||
</mt-switch>
|
||||
:value="props.currentValue"
|
||||
@update:value="props.updateCurrentValue">
|
||||
</sw-switch-field>
|
||||
</template>
|
||||
</sw-inherit-wrapper>
|
||||
</div>
|
||||
|
||||
+7
-7
@@ -14,8 +14,8 @@
|
||||
{% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings_space_id %}
|
||||
<sw-inherit-wrapper
|
||||
v-model:value="actualConfigData[CONFIG_SPACE_ID]"
|
||||
:inheritedValue="selectedSalesChannelId === null ? null : allConfigs['null'][CONFIG_SPACE_ID]"
|
||||
:customInheritationCheckFunction="checkNumberFieldInheritance">
|
||||
:inheritedValue="getInheritedValue(CONFIG_SPACE_ID)"
|
||||
@update:value="onSwitchInput">
|
||||
<template #content="props">
|
||||
<mt-number-field
|
||||
:name="CONFIG_SPACE_ID"
|
||||
@@ -23,7 +23,7 @@
|
||||
:mapInheritance="props"
|
||||
:label="$tc('vrpayment-settings.settingForm.credentials.spaceId.label')"
|
||||
:helpText="$tc('vrpayment-settings.settingForm.credentials.spaceId.tooltipText')"
|
||||
:disabled="props.isInherited || !acl.can('vrpayment.editor')"
|
||||
:disabled="!acl.can('vrpayment.editor')"
|
||||
:model-value="props.currentValue"
|
||||
:error="spaceIdErrorState"
|
||||
@update:model-value="props.updateCurrentValue">
|
||||
@@ -35,7 +35,7 @@
|
||||
{% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings_user_id %}
|
||||
<sw-inherit-wrapper
|
||||
v-model:value="actualConfigData[CONFIG_USER_ID]"
|
||||
:inheritedValue="selectedSalesChannelId === null ? null : allConfigs['null'][CONFIG_USER_ID]"
|
||||
:inheritedValue="getInheritedValue(CONFIG_USER_ID)"
|
||||
:customInheritationCheckFunction="checkNumberFieldInheritance">
|
||||
<template #content="props">
|
||||
<mt-number-field
|
||||
@@ -44,7 +44,7 @@
|
||||
:mapInheritance="props"
|
||||
:label="$tc('vrpayment-settings.settingForm.credentials.userId.label')"
|
||||
:helpText="$tc('vrpayment-settings.settingForm.credentials.userId.tooltipText')"
|
||||
:disabled="props.isInherited || !acl.can('vrpayment.editor')"
|
||||
:disabled="!acl.can('vrpayment.editor')"
|
||||
:model-value="props.currentValue"
|
||||
:error="userIdErrorState"
|
||||
@update:model-value="props.updateCurrentValue">
|
||||
@@ -56,7 +56,7 @@
|
||||
{% block vrpayment_settings_content_card_channel_config_credentials_card_container_settings_application_key %}
|
||||
<sw-inherit-wrapper
|
||||
v-model:value="actualConfigData[CONFIG_APPLICATION_KEY]"
|
||||
:inheritedValue="selectedSalesChannelId === null ? null : allConfigs['null'][CONFIG_APPLICATION_KEY]"
|
||||
:inheritedValue="getInheritedValue(CONFIG_APPLICATION_KEY)"
|
||||
:customInheritationCheckFunction="checkTextFieldInheritance">
|
||||
<template #content="props">
|
||||
<mt-password-field
|
||||
@@ -66,7 +66,7 @@
|
||||
:mapInheritance="props"
|
||||
:label="$tc('vrpayment-settings.settingForm.credentials.applicationKey.label')"
|
||||
:helpText="$tc('vrpayment-settings.settingForm.credentials.applicationKey.tooltipText')"
|
||||
:disabled="props.isInherited || !acl.can('vrpayment.editor')"
|
||||
:disabled="!acl.can('vrpayment.editor')"
|
||||
:model-value="props.currentValue"
|
||||
:error="applicationKeyErrorState"
|
||||
@update:model-value="props.updateCurrentValue">
|
||||
|
||||
+29
-23
@@ -6,7 +6,7 @@ import constants from '../../page/vrpayment-settings/configuration-constants'
|
||||
const {Component, Mixin} = Shopware;
|
||||
|
||||
Component.register('sw-vrpayment-credentials', {
|
||||
template: template,
|
||||
template,
|
||||
|
||||
name: 'VRPaymentCredentials',
|
||||
|
||||
@@ -29,7 +29,9 @@ Component.register('sw-vrpayment-credentials', {
|
||||
},
|
||||
|
||||
selectedSalesChannelId: {
|
||||
required: true
|
||||
type: [String, null],
|
||||
required: false,
|
||||
default: null
|
||||
},
|
||||
spaceIdFilled: {
|
||||
type: Boolean,
|
||||
@@ -68,38 +70,42 @@ Component.register('sw-vrpayment-credentials', {
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
currentConfig() {
|
||||
if (this.selectedSalesChannelId && this.allConfigs[this.selectedSalesChannelId]) {
|
||||
return this.allConfigs[this.selectedSalesChannelId];
|
||||
}
|
||||
return this.allConfigs['null'] || {};
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
checkTextFieldInheritance(value) {
|
||||
return !value || value.length <= 0;
|
||||
},
|
||||
|
||||
checkTextFieldInheritance(value) {
|
||||
if (typeof value !== 'string') {
|
||||
return true;
|
||||
}
|
||||
checkNumberFieldInheritance(value) {
|
||||
return value == null || value === '';
|
||||
},
|
||||
|
||||
return value.length <= 0;
|
||||
},
|
||||
|
||||
checkNumberFieldInheritance(value) {
|
||||
if (typeof value !== 'number') {
|
||||
return true;
|
||||
}
|
||||
|
||||
return value.length <= 0;
|
||||
},
|
||||
|
||||
checkBoolFieldInheritance(value) {
|
||||
return typeof value !== 'boolean';
|
||||
},
|
||||
checkBoolFieldInheritance(value) {
|
||||
return typeof value !== 'boolean';
|
||||
},
|
||||
|
||||
// Emits the 'check-api-connection-event' with the current API connection parameters.
|
||||
// Used to trigger API connection testing from this component.
|
||||
emitCheckApiConnectionEvent() {
|
||||
const apiConnectionParams = {
|
||||
spaceId: this.actualConfigData[constants.CONFIG_SPACE_ID],
|
||||
userId: this.actualConfigData[constants.CONFIG_USER_ID],
|
||||
applicationKey: this.actualConfigData[constants.CONFIG_APPLICATION_KEY]
|
||||
spaceId: this.currentConfig[constants.CONFIG_SPACE_ID],
|
||||
userId: this.currentConfig[constants.CONFIG_USER_ID],
|
||||
applicationKey: this.currentConfig[constants.CONFIG_APPLICATION_KEY]
|
||||
};
|
||||
|
||||
this.$emit('check-api-connection-event', apiConnectionParams);
|
||||
},
|
||||
|
||||
getInheritedValue(key) {
|
||||
return this.allConfigs['null']?.[key] ?? null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
+8
-8
@@ -55,16 +55,16 @@
|
||||
:inheritedValue="selectedSalesChannelId == null ? null : allConfigs['null'][CONFIG_LINE_ITEM_CONSISTENCY_ENABLED]"
|
||||
:customInheritationCheckFunction="checkBoolFieldInheritance">
|
||||
<template #content="props">
|
||||
<mt-switch
|
||||
<sw-switch-field
|
||||
:name="CONFIG_LINE_ITEM_CONSISTENCY_ENABLED"
|
||||
bordered
|
||||
:mapInheritance="props"
|
||||
:label="$tc('vrpayment-settings.settingForm.options.lineItemConsistencyEnabled.label')"
|
||||
:helpText="$tc('vrpayment-settings.settingForm.options.lineItemConsistencyEnabled.tooltipText')"
|
||||
:disabled="props.isInherited"
|
||||
:checked="props.currentValue"
|
||||
@update:checked="props.updateCurrentValue">
|
||||
</mt-switch>
|
||||
:value="props.currentValue"
|
||||
@update:value="props.updateCurrentValue">
|
||||
</sw-switch-field>
|
||||
</template>
|
||||
</sw-inherit-wrapper>
|
||||
{% endblock %}
|
||||
@@ -75,16 +75,16 @@
|
||||
:inheritedValue="selectedSalesChannelId == null ? null : allConfigs['null'][CONFIG_EMAIL_ENABLED]"
|
||||
:customInheritationCheckFunction="checkBoolFieldInheritance">
|
||||
<template #content="props">
|
||||
<mt-switch
|
||||
<sw-switch-field
|
||||
:name="CONFIG_EMAIL_ENABLED"
|
||||
bordered
|
||||
:mapInheritance="props"
|
||||
:label="$tc('vrpayment-settings.settingForm.options.emailEnabled.label')"
|
||||
:helpText="$tc('vrpayment-settings.settingForm.options.emailEnabled.tooltipText')"
|
||||
:disabled="props.isInherited"
|
||||
:checked="props.currentValue"
|
||||
@update:checked="props.updateCurrentValue">
|
||||
</mt-switch>
|
||||
:value="props.currentValue"
|
||||
@update:value="props.updateCurrentValue">
|
||||
</sw-switch-field>
|
||||
</template>
|
||||
</sw-inherit-wrapper>
|
||||
{% endblock %}
|
||||
|
||||
+4
-4
@@ -7,16 +7,16 @@
|
||||
:inheritedValue="selectedSalesChannelId == null ? null : allConfigs['null'][CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED]"
|
||||
:customInheritationCheckFunction="checkBoolFieldInheritance">
|
||||
<template #content="props">
|
||||
<mt-switch
|
||||
<sw-switch-field
|
||||
:name="CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED"
|
||||
bordered
|
||||
:mapInheritance="props"
|
||||
:label="$tc('vrpayment-settings.settingForm.storefrontOptions.invoiceDownloadEnabled.label')"
|
||||
:helpText="$tc('vrpayment-settings.settingForm.storefrontOptions.invoiceDownloadEnabled.tooltipText')"
|
||||
:disabled="props.isInherited"
|
||||
:checked="props.currentValue"
|
||||
@update:checked="props.updateCurrentValue">
|
||||
</mt-switch>
|
||||
:value="props.currentValue"
|
||||
@update:value="props.updateCurrentValue">
|
||||
</sw-switch-field>
|
||||
</template>
|
||||
</sw-inherit-wrapper>
|
||||
</div>
|
||||
|
||||
+122
-123
@@ -1,146 +1,145 @@
|
||||
{% block vrpayment_settings %}
|
||||
<sw-page class="vrpayment-settings">
|
||||
<sw-page class="vrpayment-settings">
|
||||
|
||||
{% block vrpayment_settings_header %}
|
||||
<template #smart-bar-header>
|
||||
<h2>
|
||||
{{ $tc('sw-settings.index.title') }}
|
||||
<mt-icon name="small-arrow-medium-right" size="16px"></mt-icon>
|
||||
{{ $tc('vrpayment-settings.header') }}
|
||||
</h2>
|
||||
</template>
|
||||
{% endblock %}
|
||||
{% block vrpayment_settings_header %}
|
||||
<template #smart-bar-header>
|
||||
<h2>
|
||||
{{ $tc('sw-settings.index.title') }}
|
||||
<mt-icon name="small-arrow-medium-right" size="16px"></mt-icon>
|
||||
{{ $tc('vrpayment-settings.header') }}
|
||||
</h2>
|
||||
</template>
|
||||
{% endblock %}
|
||||
|
||||
{% block vrpayment_settings_actions %}
|
||||
<template #smart-bar-actions>
|
||||
{% block vrpayment_settings_actions_save %}
|
||||
<mt-button
|
||||
v-model:value="isSaveSuccessful"
|
||||
class="sw-settings-login-registration__save-action"
|
||||
variant="primary"
|
||||
:isLoading="isLoading"
|
||||
:disabled="isLoading"
|
||||
@click="onSave">
|
||||
{{ $tc('vrpayment-settings.settingForm.save') }}
|
||||
</mt-button>
|
||||
{% endblock %}
|
||||
</template>
|
||||
{% endblock %}
|
||||
{% block vrpayment_settings_actions %}
|
||||
<template #smart-bar-actions>
|
||||
{% block vrpayment_settings_actions_save %}
|
||||
<mt-button
|
||||
v-model:value="isSaveSuccessful"
|
||||
class="sw-settings-login-registration__save-action"
|
||||
variant="primary"
|
||||
:isLoading="isLoading"
|
||||
:disabled="isLoading"
|
||||
@click="onSave">
|
||||
{{ $tc('vrpayment-settings.settingForm.save') }}
|
||||
</mt-button>
|
||||
{% endblock %}
|
||||
</template>
|
||||
{% endblock %}
|
||||
|
||||
{% block vrpayment_settings_content %}
|
||||
<template #content>
|
||||
{% block vrpayment_settings_content %}
|
||||
<template #content>
|
||||
|
||||
{% block vrpayment_settings_content_card %}
|
||||
<mt-card-view>
|
||||
{% block vrpayment_settings_content_card %}
|
||||
<mt-card-view>
|
||||
|
||||
{% block vrpayment_settings_content_card_channel_config %}
|
||||
<sw-sales-channel-config v-model:value="config"
|
||||
ref="configComponent"
|
||||
:domain="CONFIG_DOMAIN">
|
||||
{% block vrpayment_settings_content_card_channel_config %}
|
||||
<sw-sales-channel-config v-model:value="config"
|
||||
ref="configComponent"
|
||||
:domain="CONFIG_DOMAIN">
|
||||
|
||||
{% block vrpayment_settings_content_card_channel_config_sales_channel %}
|
||||
<template #select="{ onInput, selectedSalesChannelId, salesChannel }">
|
||||
{% block vrpayment_settings_content_card_channel_config_sales_channel %}
|
||||
<template #select="{ onInput, selectedSalesChannelId, salesChannel }">
|
||||
|
||||
{% block vrpayment_settings_content_card_channel_config_sales_channel_card %}
|
||||
<mt-card title="Sales Channel Switch">
|
||||
{% block vrpayment_settings_content_card_channel_config_sales_channel_card %}
|
||||
<mt-card title="Sales Channel Switch">
|
||||
|
||||
{% block vrpayment_settings_content_card_channel_config_sales_channel_card_title %}
|
||||
<sw-entity-single-select
|
||||
v-model:value="selectedSalesChannelId"
|
||||
labelProperty="translated.name"
|
||||
valueProperty="id"
|
||||
:mapInheritance="props"
|
||||
:isLoading="isLoading"
|
||||
entity="sales_channel"
|
||||
@update:value="onInput">
|
||||
</sw-entity-single-select>
|
||||
{% endblock %}
|
||||
{% block vrpayment_settings_content_card_channel_config_sales_channel_card_footer %}
|
||||
<template #footer>
|
||||
{% block vrpayment_settings_content_card_channel_config_sales_channel_card_title %}
|
||||
<sw-single-select
|
||||
:value="selectedSalesChannelId"
|
||||
:options="salesChannel.map(sc => ({ id: sc.id, name: sc.translated.name }))"
|
||||
labelProperty="name"
|
||||
valueProperty="id"
|
||||
:isLoading="isLoading"
|
||||
@update:value="onInput"
|
||||
/>
|
||||
{% endblock %}
|
||||
{% block vrpayment_settings_content_card_channel_config_sales_channel_card_footer %}
|
||||
<template #footer>
|
||||
|
||||
{% block vrpayment_settings_content_card_channel_config_sales_channel_card_footer_container %}
|
||||
<sw-container columns="2fr 1fr" gap="0px 30px">
|
||||
{% block vrpayment_settings_content_card_channel_config_sales_channel_card_footer_container %}
|
||||
<sw-container columns="2fr 1fr" gap="0px 30px">
|
||||
|
||||
{% block vrpayment_settings_content_card_channel_config_sales_channel_card_footer_container_text %}
|
||||
<p>{{ $tc('vrpayment-settings.salesChannelCard.button.description') }}</p>
|
||||
{% endblock %}
|
||||
{% block vrpayment_settings_content_card_channel_config_sales_channel_card_footer_container_text %}
|
||||
<p>{{ $tc('vrpayment-settings.salesChannelCard.button.description') }}</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block vrpayment_settings_content_card_channel_config_sales_channel_card_footer_container_button %}
|
||||
<sw-button
|
||||
variant="primary"
|
||||
v-model:value="isSetDefaultPaymentSuccessful"
|
||||
:isLoading="isSettingDefaultPaymentMethods"
|
||||
@click="onSetPaymentMethodDefault">
|
||||
{{ $tc('vrpayment-settings.salesChannelCard.button.label') }}
|
||||
</sw-button>
|
||||
{% endblock %}
|
||||
</sw-container>
|
||||
{% endblock %}
|
||||
</template>
|
||||
{% endblock %}
|
||||
</mt-card>
|
||||
{% endblock %}
|
||||
</template>
|
||||
{% endblock %}
|
||||
{% block vrpayment_settings_content_card_channel_config_sales_channel_card_footer_container_button %}
|
||||
<sw-button
|
||||
variant="primary"
|
||||
v-model:value="isSetDefaultPaymentSuccessful"
|
||||
:isLoading="isSettingDefaultPaymentMethods"
|
||||
@click="onSetPaymentMethodDefault">
|
||||
{{ $tc('vrpayment-settings.salesChannelCard.button.label') }}
|
||||
</sw-button>
|
||||
{% endblock %}
|
||||
</sw-container>
|
||||
{% endblock %}
|
||||
</template>
|
||||
{% endblock %}
|
||||
</mt-card>
|
||||
{% endblock %}
|
||||
</template>
|
||||
{% endblock %}
|
||||
|
||||
{% block vrpayment_settings_content_card_channel_config_cards %}
|
||||
<template #content="{ actualConfigData, allConfigs, selectedSalesChannelId }">
|
||||
<div v-if="actualConfigData">
|
||||
{% block vrpayment_settings_content_card_channel_config_cards %}
|
||||
<template #content="{ actualConfigData, allConfigs, selectedSalesChannelId }">
|
||||
<div v-if="actualConfigData">
|
||||
|
||||
<sw-vrpayment-credentials
|
||||
:actualConfigData="actualConfigData"
|
||||
:allConfigs="allConfigs"
|
||||
:selectedSalesChannelId="selectedSalesChannelId"
|
||||
:spaceIdErrorState="spaceIdErrorState"
|
||||
:userIdErrorState="userIdErrorState"
|
||||
:applicationKeyErrorState="applicationKeyErrorState"
|
||||
:spaceIdFilled="spaceIdFilled"
|
||||
:userIdFilled="userIdFilled"
|
||||
:applicationKeyFilled="applicationKeyFilled"
|
||||
:isLoading="isLoading"
|
||||
:isTesting="isTesting"
|
||||
@check-api-connection-event="onCheckApiConnection"
|
||||
></sw-vrpayment-credentials>
|
||||
<sw-vrpayment-credentials
|
||||
:actualConfigData="actualConfigData"
|
||||
:allConfigs="allConfigs"
|
||||
:selectedSalesChannelId="selectedSalesChannelId"
|
||||
:spaceIdErrorState="spaceIdErrorState"
|
||||
:userIdErrorState="userIdErrorState"
|
||||
:applicationKeyErrorState="applicationKeyErrorState"
|
||||
:spaceIdFilled="spaceIdFilled"
|
||||
:userIdFilled="userIdFilled"
|
||||
:applicationKeyFilled="applicationKeyFilled"
|
||||
:isLoading="isLoading"
|
||||
:isTesting="isTesting"
|
||||
@check-api-connection-event="onCheckApiConnection"
|
||||
></sw-vrpayment-credentials>
|
||||
|
||||
<sw-vrpayment-options
|
||||
:actualConfigData="actualConfigData"
|
||||
:allConfigs="allConfigs"
|
||||
:isLoading="isLoading"
|
||||
:selectedSalesChannelId="selectedSalesChannelId"
|
||||
>
|
||||
</sw-vrpayment-options>
|
||||
<sw-vrpayment-options
|
||||
:actualConfigData="actualConfigData"
|
||||
:allConfigs="allConfigs"
|
||||
:isLoading="isLoading"
|
||||
:selectedSalesChannelId="selectedSalesChannelId"
|
||||
>
|
||||
</sw-vrpayment-options>
|
||||
|
||||
<sw-vrpayment-storefront-options
|
||||
:actualConfigData="actualConfigData"
|
||||
:allConfigs="allConfigs"
|
||||
:isLoading="isLoading"
|
||||
:selectedSalesChannelId="selectedSalesChannelId"
|
||||
>
|
||||
</sw-vrpayment-storefront-options>
|
||||
<sw-vrpayment-storefront-options
|
||||
:actualConfigData="actualConfigData"
|
||||
:allConfigs="allConfigs"
|
||||
:isLoading="isLoading"
|
||||
:selectedSalesChannelId="selectedSalesChannelId"
|
||||
>
|
||||
</sw-vrpayment-storefront-options>
|
||||
|
||||
<sw-vrpayment-advanced-options
|
||||
:actualConfigData="actualConfigData"
|
||||
:allConfigs="allConfigs"
|
||||
:isLoading="isLoading"
|
||||
:selectedSalesChannelId="selectedSalesChannelId"
|
||||
>
|
||||
</sw-vrpayment-advanced-options>
|
||||
<sw-vrpayment-advanced-options
|
||||
:actualConfigData="actualConfigData"
|
||||
:allConfigs="allConfigs"
|
||||
:isLoading="isLoading"
|
||||
:selectedSalesChannelId="selectedSalesChannelId"
|
||||
>
|
||||
</sw-vrpayment-advanced-options>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
{% endblock %}
|
||||
</div>
|
||||
</template>
|
||||
{% endblock %}
|
||||
|
||||
</sw-sales-channel-config>
|
||||
{% endblock %}
|
||||
</sw-sales-channel-config>
|
||||
{% endblock %}
|
||||
|
||||
{% block vrpayment_settings_content_card_loading %}
|
||||
<mt-loader v-if="isLoading"></mt-loader>
|
||||
{% endblock %}
|
||||
</mt-card-view>
|
||||
{% endblock %}
|
||||
{% block vrpayment_settings_content_card_loading %}
|
||||
<mt-loader v-if="isLoading"></mt-loader>
|
||||
{% endblock %}
|
||||
</mt-card-view>
|
||||
{% endblock %}
|
||||
|
||||
</template>
|
||||
{% endblock %}
|
||||
</sw-page>
|
||||
</template>
|
||||
{% endblock %}
|
||||
</sw-page>
|
||||
{% endblock %}
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ Component.register('vrpayment-settings', {
|
||||
watch: {
|
||||
config: {
|
||||
handler(configData) {
|
||||
const defaultConfig = this.$refs.configComponent.allConfigs.null;
|
||||
const defaultConfig = (this.$refs.configComponent.allConfigs || {}).null || {};
|
||||
const salesChannelId = this.$refs.configComponent.selectedSalesChannelId;
|
||||
if (salesChannelId === null) {
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
<argument id="VRPaymentPayment\Core\Api\Transaction\Service\TransactionService" type="service"/>
|
||||
<argument id="VRPaymentPayment\Core\Settings\Service\SettingsService" type="service"/>
|
||||
<argument id="VRPaymentPayment\Core\Util\PaymentMethodUtil" type="service"/>
|
||||
<argument id="payment_method.repository" type="service"/>
|
||||
<call method="setLogger">
|
||||
<argument type="service" id="monolog.logger.vrpayment_payment"/>
|
||||
</call>
|
||||
|
||||
Reference in New Issue
Block a user