From 5513830c8a7377c292cef79555b379f97a9f8ad0 Mon Sep 17 00:00:00 2001 From: m-muxfeld-diw <143803170+m-muxfeld-diw@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:20:56 +0200 Subject: [PATCH] pishps314 UUID fix (#837) * PISHPS-314: Added refund credit notes * PISHPS-314: cypress test; fixed bug for refunds with no line items * PISHPS-314: removed usage of fromStringToHex with fromBytesToHex --- src/Service/Refund/RefundCreditNoteService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Service/Refund/RefundCreditNoteService.php b/src/Service/Refund/RefundCreditNoteService.php index d0ebe62ca..2a1046b46 100644 --- a/src/Service/Refund/RefundCreditNoteService.php +++ b/src/Service/Refund/RefundCreditNoteService.php @@ -104,8 +104,8 @@ public function addCreditNoteToOrder(string $orderId, string $refundId, array $l $totalPrice *= -1; $unitPrice *= -1; $data['lineItems'][] = [ - 'id' => Uuid::fromStringToHex($lineItemId), - 'identifier' => Uuid::fromStringToHex($lineItem->getIdentifier()), + 'id' => Uuid::fromBytesToHex(md5($lineItemId, true)), #@todo remove once 6.4 reached end of life + 'identifier' => Uuid::fromBytesToHex(md5($lineItem->getIdentifier(), true)),#@todo remove once 6.4 reached end of life 'quantity' => $quantity, 'label' => sprintf('%s%s%s', $this->prefix, $lineItem->getLabel(), $this->suffix), 'type' => LineItem::CREDIT_LINE_ITEM_TYPE,