From f62064596898192358e6b012de10351c8e454a6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kie=C5=82b?= Date: Fri, 9 Feb 2024 10:02:41 +0100 Subject: [PATCH] Add v1.1.2 --- composer.json | 2 +- src/Service/FinalizeTokenGenerator.php | 2 +- src/Service/PayU/OrderCreate.php | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 21cf9e3..54d8499 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "PayU integration for Shopware 6", "type": "shopware-platform-plugin", "license": "proprietary", - "version": "1.1.1", + "version": "1.1.2", "authors": [ { "name": "Crehler Sp. z o. o.", diff --git a/src/Service/FinalizeTokenGenerator.php b/src/Service/FinalizeTokenGenerator.php index bcd1fff..0387d5c 100644 --- a/src/Service/FinalizeTokenGenerator.php +++ b/src/Service/FinalizeTokenGenerator.php @@ -68,7 +68,7 @@ public function buildUrl(OrderTransactionEntity $orderTransactionEntity): string $orderTransactionEntity->getPaymentMethodId(), $orderTransactionEntity->getId(), null, - null, + 288000, null ); $token = $this->tokenFactory->generateToken($tokenStruct); diff --git a/src/Service/PayU/OrderCreate.php b/src/Service/PayU/OrderCreate.php index 59c9f25..66085e8 100644 --- a/src/Service/PayU/OrderCreate.php +++ b/src/Service/PayU/OrderCreate.php @@ -18,6 +18,7 @@ use Crehler\PayU\Struct\Product; use Shopware\Core\Checkout\Order\Aggregate\OrderLineItem\OrderLineItemEntity; use Shopware\Core\Checkout\Payment\Cart\AsyncPaymentTransactionStruct; +use Shopware\Core\Framework\Uuid\Uuid; use Shopware\Core\System\SalesChannel\SalesChannelContext; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; @@ -94,7 +95,7 @@ private function addOrderUrls(OrderStruct $order, AsyncPaymentTransactionStruct */ private function addBasicOrderData(OrderStruct $order, AsyncPaymentTransactionStruct $asyncPaymentTransactionStruct, SalesChannelContext $salesChannelContext): OrderStruct { - $order->setExtOrderId($asyncPaymentTransactionStruct->getOrder()->getOrderNumber()) + $order->setExtOrderId($asyncPaymentTransactionStruct->getOrder()->getOrderNumber() . '-'. Uuid::randomHex()) ->setCustomerIp($this->request->getClientIp()) ->setMerchantPosId(intval(\OpenPayU_Configuration::getOauthClientId() ? \OpenPayU_Configuration::getOauthClientId() : \OpenPayU_Configuration::getMerchantPosId())) ->setDescription($this->paymentDetailsReader->generateShortDescription($asyncPaymentTransactionStruct->getOrder()->getOrderNumber()))