mirror of
https://github.com/vr-payment/shopware-6.git
synced 2026-06-05 03:19:49 +00:00
Release 6.1.16
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
# 6.1.16
|
||||||
|
- Fixed issue with pending orders remaining open
|
||||||
|
|
||||||
# 6.1.15
|
# 6.1.15
|
||||||
- Fixed issue with shipping costs not being processed correctly
|
- Fixed issue with shipping costs not being processed correctly
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -1,6 +1,9 @@
|
|||||||
# 6.1.15
|
# 6.1.16
|
||||||
- Problem behoben, bei dem die Versandkosten nicht korrekt verarbeitet wurden
|
- Problem behoben, bei dem die Versandkosten nicht korrekt verarbeitet wurden
|
||||||
|
|
||||||
|
# 6.1.15
|
||||||
|
- Problem behoben, bei dem ausstehende Bestellungen offen blieben
|
||||||
|
|
||||||
# 6.1.14
|
# 6.1.14
|
||||||
– Warenkorb neu erstellen für Headless Storefront Order deaktivieren
|
– Warenkorb neu erstellen für Headless Storefront Order deaktivieren
|
||||||
– Der korrekte Ausnahmetyp wurde zur Finalisierungsmethode hinzugefügt
|
– Der korrekte Ausnahmetyp wurde zur Finalisierungsmethode hinzugefügt
|
||||||
|
|||||||
+1
-1
@@ -59,5 +59,5 @@
|
|||||||
"vrpayment/sdk": "^4.0.0"
|
"vrpayment/sdk": "^4.0.0"
|
||||||
},
|
},
|
||||||
"type": "shopware-platform-plugin",
|
"type": "shopware-platform-plugin",
|
||||||
"version": "6.1.15"
|
"version": "6.1.16"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ use Shopware\Core\{
|
|||||||
Checkout\Cart\SalesChannel\CartService,
|
Checkout\Cart\SalesChannel\CartService,
|
||||||
Checkout\Order\Aggregate\OrderLineItem\OrderLineItemCollection,
|
Checkout\Order\Aggregate\OrderLineItem\OrderLineItemCollection,
|
||||||
Checkout\Order\Aggregate\OrderLineItem\OrderLineItemEntity,
|
Checkout\Order\Aggregate\OrderLineItem\OrderLineItemEntity,
|
||||||
|
Checkout\Order\Aggregate\OrderTransaction\OrderTransactionStateHandler,
|
||||||
Checkout\Order\OrderEntity,
|
Checkout\Order\OrderEntity,
|
||||||
|
Checkout\Order\OrderDefinition,
|
||||||
Checkout\Order\SalesChannel\AbstractOrderRoute,
|
Checkout\Order\SalesChannel\AbstractOrderRoute,
|
||||||
Framework\Context,
|
Framework\Context,
|
||||||
Framework\DataAbstractionLayer\Search\Criteria,
|
Framework\DataAbstractionLayer\Search\Criteria,
|
||||||
@@ -21,7 +23,9 @@ use Shopware\Core\{
|
|||||||
Framework\Uuid\Uuid,
|
Framework\Uuid\Uuid,
|
||||||
Framework\Uuid\Exception\InvalidUuidException,
|
Framework\Uuid\Exception\InvalidUuidException,
|
||||||
Framework\Validation\DataBag\RequestDataBag,
|
Framework\Validation\DataBag\RequestDataBag,
|
||||||
System\SalesChannel\SalesChannelContext
|
System\SalesChannel\SalesChannelContext,
|
||||||
|
System\StateMachine\StateMachineRegistry,
|
||||||
|
System\StateMachine\Transition,
|
||||||
};
|
};
|
||||||
use Shopware\Storefront\{
|
use Shopware\Storefront\{
|
||||||
Controller\StorefrontController,
|
Controller\StorefrontController,
|
||||||
@@ -43,7 +47,8 @@ use VRPaymentPayment\Core\{
|
|||||||
Settings\Options\Integration,
|
Settings\Options\Integration,
|
||||||
Settings\Service\SettingsService,
|
Settings\Service\SettingsService,
|
||||||
Storefront\Checkout\Struct\CheckoutPageData,
|
Storefront\Checkout\Struct\CheckoutPageData,
|
||||||
Util\Payload\CustomProducts\CustomProductsLineItemTypes
|
Util\Payload\CustomProducts\CustomProductsLineItemTypes,
|
||||||
|
Util\Payload\TransactionPayload
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -57,6 +62,18 @@ use VRPaymentPayment\Core\{
|
|||||||
#[Route(defaults: ['_routeScope' => ['storefront']])]
|
#[Route(defaults: ['_routeScope' => ['storefront']])]
|
||||||
class CheckoutController extends StorefrontController {
|
class CheckoutController extends StorefrontController {
|
||||||
|
|
||||||
|
public const ORDER_STATE_CANCEL = 'cancel';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \Shopware\Core\System\StateMachine\StateMachineRegistry
|
||||||
|
*/
|
||||||
|
private $stateMachineRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \Shopware\Core\Checkout\Order\Aggregate\OrderTransaction\OrderTransactionStateHandler
|
||||||
|
*/
|
||||||
|
protected $orderTransactionStateHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \Shopware\Storefront\Page\GenericPageLoader
|
* @var \Shopware\Storefront\Page\GenericPageLoader
|
||||||
*/
|
*/
|
||||||
@@ -106,6 +123,8 @@ class CheckoutController extends StorefrontController {
|
|||||||
* @param \VRPaymentPayment\Core\Api\Transaction\Service\TransactionService $transactionService
|
* @param \VRPaymentPayment\Core\Api\Transaction\Service\TransactionService $transactionService
|
||||||
* @param \Shopware\Storefront\Page\GenericPageLoaderInterface $genericLoader
|
* @param \Shopware\Storefront\Page\GenericPageLoaderInterface $genericLoader
|
||||||
* @param \Shopware\Core\Checkout\Order\SalesChannel\AbstractOrderRoute $orderRoute
|
* @param \Shopware\Core\Checkout\Order\SalesChannel\AbstractOrderRoute $orderRoute
|
||||||
|
* @param \Shopware\Core\Checkout\Order\Aggregate\OrderTransaction\OrderTransactionStateHandler $orderTransactionStateHandler
|
||||||
|
* @param \Shopware\Core\System\StateMachine\StateMachineRegistry $stateMachineRegistry
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
LineItemFactoryRegistry $lineItemFactoryRegistry,
|
LineItemFactoryRegistry $lineItemFactoryRegistry,
|
||||||
@@ -113,7 +132,9 @@ class CheckoutController extends StorefrontController {
|
|||||||
SettingsService $settingsService,
|
SettingsService $settingsService,
|
||||||
TransactionService $transactionService,
|
TransactionService $transactionService,
|
||||||
GenericPageLoaderInterface $genericLoader,
|
GenericPageLoaderInterface $genericLoader,
|
||||||
AbstractOrderRoute $orderRoute
|
AbstractOrderRoute $orderRoute,
|
||||||
|
OrderTransactionStateHandler $orderTransactionStateHandler,
|
||||||
|
StateMachineRegistry $stateMachineRegistry
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
$this->cartService = $cartService;
|
$this->cartService = $cartService;
|
||||||
@@ -122,6 +143,8 @@ class CheckoutController extends StorefrontController {
|
|||||||
$this->transactionService = $transactionService;
|
$this->transactionService = $transactionService;
|
||||||
$this->lineItemFactoryRegistry = $lineItemFactoryRegistry;
|
$this->lineItemFactoryRegistry = $lineItemFactoryRegistry;
|
||||||
$this->orderRoute = $orderRoute;
|
$this->orderRoute = $orderRoute;
|
||||||
|
$this->orderTransactionStateHandler = $orderTransactionStateHandler;
|
||||||
|
$this->stateMachineRegistry = $stateMachineRegistry;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -380,6 +403,7 @@ class CheckoutController extends StorefrontController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$transaction = $this->getTransaction($orderId, $salesChannelContext->getContext());
|
$transaction = $this->getTransaction($orderId, $salesChannelContext->getContext());
|
||||||
|
$orderTransactionId = $transaction->getMetaData()[TransactionPayload::VRPAYMENT_METADATA_ORDER_TRANSACTION_ID];
|
||||||
if (!empty($transaction->getUserFailureMessage())) {
|
if (!empty($transaction->getUserFailureMessage())) {
|
||||||
$this->addFlash('danger', $transaction->getUserFailureMessage());
|
$this->addFlash('danger', $transaction->getUserFailureMessage());
|
||||||
}
|
}
|
||||||
@@ -414,6 +438,18 @@ class CheckoutController extends StorefrontController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Close the old, existing order to prevent confusion for the customer
|
||||||
|
$this->orderTransactionStateHandler->cancel($orderTransactionId, $salesChannelContext->getContext());
|
||||||
|
$this->stateMachineRegistry->transition(
|
||||||
|
new Transition(
|
||||||
|
OrderDefinition::ENTITY_NAME,
|
||||||
|
$orderId,
|
||||||
|
self::ORDER_STATE_CANCEL,
|
||||||
|
'stateId'
|
||||||
|
),
|
||||||
|
$salesChannelContext->getContext()
|
||||||
|
);
|
||||||
|
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
$this->addFlash('danger', $this->trans('error.addToCartError'));
|
$this->addFlash('danger', $this->trans('error.addToCartError'));
|
||||||
$this->logger->critical($exception->getMessage());
|
$this->logger->critical($exception->getMessage());
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class Analytics {
|
|||||||
self::SHOP_SYSTEM => 'shopware',
|
self::SHOP_SYSTEM => 'shopware',
|
||||||
self::SHOP_SYSTEM_VERSION => '6',
|
self::SHOP_SYSTEM_VERSION => '6',
|
||||||
self::SHOP_SYSTEM_AND_VERSION => 'shopware-6',
|
self::SHOP_SYSTEM_AND_VERSION => 'shopware-6',
|
||||||
self::PLUGIN_SYSTEM_VERSION => '6.1.15',
|
self::PLUGIN_SYSTEM_VERSION => '6.1.16',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
<argument type="service" id="VRPaymentPayment\Core\Api\Transaction\Service\TransactionService"/>
|
<argument type="service" id="VRPaymentPayment\Core\Api\Transaction\Service\TransactionService"/>
|
||||||
<argument type="service" id="Shopware\Storefront\Page\GenericPageLoader"/>
|
<argument type="service" id="Shopware\Storefront\Page\GenericPageLoader"/>
|
||||||
<argument type="service" id="Shopware\Core\Checkout\Order\SalesChannel\OrderRoute"/>
|
<argument type="service" id="Shopware\Core\Checkout\Order\SalesChannel\OrderRoute"/>
|
||||||
|
<argument type="service" id="Shopware\Core\Checkout\Order\Aggregate\OrderTransaction\OrderTransactionStateHandler"/>
|
||||||
|
<argument type="service" id="Shopware\Core\System\StateMachine\StateMachineRegistry"/>
|
||||||
<call method="setLogger">
|
<call method="setLogger">
|
||||||
<argument type="service" id="monolog.logger.vrpayment_payment"/>
|
<argument type="service" id="monolog.logger.vrpayment_payment"/>
|
||||||
</call>
|
</call>
|
||||||
|
|||||||
Reference in New Issue
Block a user