diff --git a/README.md b/README.md
index ddc747b..a870b92 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ This repository contains the Shopware 5 plugin that enables to process payments
## Documentation
-* [Documentation](https://plugin-documentation.wallee.com/wallee-payment/shopware-5/1.1.23/docs/en/documentation.html)
+* [Documentation](https://plugin-documentation.wallee.com/wallee-payment/shopware-5/1.1.24/docs/en/documentation.html)
## Support
@@ -20,4 +20,4 @@ Support queries can be issued on the [wallee support site](https://app-wallee.co
## License
-Please see the [license file](https://github.com/wallee-payment/shopware-5/blob/1.1.23/LICENSE) for more information.
+Please see the [license file](https://github.com/wallee-payment/shopware-5/blob/1.1.24/LICENSE) for more information.
diff --git a/custom/plugins/WalleePayment/Subscriber/Order.php b/custom/plugins/WalleePayment/Subscriber/Order.php
index cec9888..6f08d00 100644
--- a/custom/plugins/WalleePayment/Subscriber/Order.php
+++ b/custom/plugins/WalleePayment/Subscriber/Order.php
@@ -78,8 +78,9 @@ public static function getSubscribedEvents()
'Shopware_Modules_Order_SaveOrder_FilterParams' => 'onFilterParams',
'Shopware_Modules_Order_SaveOrder_ProcessDetails' => 'onSaveOrder',
'Shopware_Modules_Order_SendMail_Create' => 'onOrderCreateMail',
- 'Shopware_Modules_Order_SendMail_Send' => 'onOrderSendMail'
- ];
+ 'Shopware_Modules_Order_SendMail_Send' => 'onOrderSendMail',
+ 'Shopware_Modules_Order_SendMail_CreateMail_FilterOverrideConfig' => 'onMailCreateFilterOverrideConfig'
+ ];
}
/**
@@ -191,6 +192,32 @@ public function onOrderCreateMail(\Enlight_Event_EventArgs $args)
}
}
+ /**
+ * This function sets the values for the fromMail and fromName parameters,
+ * right before sending an email.
+ *
+ * We do it like this to avoid default behavoir, which is use the value stored
+ * in the cache. Because of a problem in shopware5 and the portal, when receiving
+ * a webhook invocation, shopware5 stores values that belong to one language
+ * to the cache for the default language. This can provoke further calls to the cache
+ * to get invalid data, as it belongs to a different language.
+ *
+ * In the case of the fromMail and fromName, we ensure these values are the expected ones.
+ *
+ * @param \Enlight_Event_EventArgs $args
+ *
+ * @see \sOrder::sendMail
+ */
+ public function onMailCreateFilterOverrideConfig(\Enlight_Event_EventArgs $args)
+ {
+ $overrideConfig = $args->getReturn();
+ $overrideConfig["fromMail"] = $this->container->get('config')->get('mail');
+ $overrideConfig['fromName'] = $this->container->get('config')->get('shopName');
+ $args->setReturn($overrideConfig);
+
+ return $args->getReturn();
+ }
+
public function onOrderSendMail(\Enlight_Event_EventArgs $args)
{
$context = $args->getContext();
diff --git a/custom/plugins/WalleePayment/Subscriber/Webhook/Transaction.php b/custom/plugins/WalleePayment/Subscriber/Webhook/Transaction.php
index 32862d0..f4a84f4 100644
--- a/custom/plugins/WalleePayment/Subscriber/Webhook/Transaction.php
+++ b/custom/plugins/WalleePayment/Subscriber/Webhook/Transaction.php
@@ -325,6 +325,7 @@ private function sendOrderEmail(Order $order)
$orderModule = $this->container->get('modules')->Order();
$sUserDataBackup = $orderModule->sUserData;
$orderModule->sUserData = $orderEmailData[0]['orderEmailVariables']['sUserData'];
+
try {
$this->registry->set('force_order_email', true);
$orderModule->sendMail($orderEmailData[0]['orderEmailVariables']['variables']);
diff --git a/custom/plugins/WalleePayment/composer.json b/custom/plugins/WalleePayment/composer.json
index 6e7b478..bb09503 100644
--- a/custom/plugins/WalleePayment/composer.json
+++ b/custom/plugins/WalleePayment/composer.json
@@ -15,7 +15,7 @@
}
],
"type" : "shopware-plugin",
- "version" : "1.1.23",
+ "version" : "1.1.24",
"require" : {
"wallee/sdk" : "3.2.0",
"shopware/shopware": "~5.7",
diff --git a/custom/plugins/WalleePayment/plugin.xml b/custom/plugins/WalleePayment/plugin.xml
index 87cad04..bc5d52e 100644
--- a/custom/plugins/WalleePayment/plugin.xml
+++ b/custom/plugins/WalleePayment/plugin.xml
@@ -14,7 +14,7 @@
- 1.1.23
+ 1.1.24(c) by wallee AGApache-2.0
https://www.wallee.com
@@ -24,6 +24,10 @@
wallee Integration for Shopware 5wallee Integrazione per shopware 5wallee Intégration pour Shopware 5
+
+ Fix the incorrect email sender used when operating sub-shops
+ Behebung des falschen E-Mail-Absenders beim Betrieb von Sub-Shops
+ Support of Shopware 5.7.18Unterstützung von Shopware 5.7.18
diff --git a/docs/en/documentation.html b/docs/en/documentation.html
index b88768d..1831feb 100644
--- a/docs/en/documentation.html
+++ b/docs/en/documentation.html
@@ -22,7 +22,7 @@