From 314441c1936ee41345d60c3d90cb14a02a740805 Mon Sep 17 00:00:00 2001 From: Uwe Kleinmann Date: Thu, 14 Sep 2023 16:19:52 +0200 Subject: [PATCH] NTR: expose refund amount to flow. --- .../Events/Refund/RefundStarted/RefundStartedEvent.php | 2 ++ .../Events/Refund/RefundStarted/RefundStartedEvent651.php | 1 + 2 files changed, 3 insertions(+) diff --git a/src/Compatibility/Bundles/FlowBuilder/Events/Refund/RefundStarted/RefundStartedEvent.php b/src/Compatibility/Bundles/FlowBuilder/Events/Refund/RefundStarted/RefundStartedEvent.php index cea671ca5..72f83d1f7 100644 --- a/src/Compatibility/Bundles/FlowBuilder/Events/Refund/RefundStarted/RefundStartedEvent.php +++ b/src/Compatibility/Bundles/FlowBuilder/Events/Refund/RefundStarted/RefundStartedEvent.php @@ -10,6 +10,7 @@ use Shopware\Core\Framework\Event\EventData\EntityType; use Shopware\Core\Framework\Event\EventData\EventDataCollection; use Shopware\Core\Framework\Event\EventData\MailRecipientStruct; +use Shopware\Core\Framework\Event\EventData\ScalarValueType; use Shopware\Core\Framework\Event\MailAware; use Shopware\Core\Framework\Event\OrderAware; use Shopware\Core\Framework\Event\SalesChannelAware; @@ -59,6 +60,7 @@ public function getName(): string public static function getAvailableData(): EventDataCollection { return (new EventDataCollection()) + ->add('amount', new ScalarValueType(ScalarValueType::TYPE_FLOAT)) ->add('order', new EntityType(OrderDefinition::class)); } diff --git a/src/Compatibility/Bundles/FlowBuilder/Events/Refund/RefundStarted/RefundStartedEvent651.php b/src/Compatibility/Bundles/FlowBuilder/Events/Refund/RefundStarted/RefundStartedEvent651.php index a38ecf428..761a53f39 100644 --- a/src/Compatibility/Bundles/FlowBuilder/Events/Refund/RefundStarted/RefundStartedEvent651.php +++ b/src/Compatibility/Bundles/FlowBuilder/Events/Refund/RefundStarted/RefundStartedEvent651.php @@ -12,6 +12,7 @@ class RefundStartedEvent651 extends RefundStartedEvent implements ScalarValuesAw public function getValues(): array { return [ + 'amount' => $this->amount, 'order' => $this->order, ]; }