mirror of
https://github.com/vr-payment/shopware-6.git
synced 2026-06-04 19:03:01 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1393f4ff7c | |||
| d714cf2f84 | |||
| 2f9a30ebd3 |
@@ -1,3 +1,13 @@
|
||||
# 6.1.16
|
||||
- Fixed issue with pending orders remaining open
|
||||
|
||||
# 6.1.15
|
||||
- Fixed issue with shipping costs not being processed correctly
|
||||
|
||||
# 6.1.14
|
||||
- Disable Recreate Cart for Headless Storefront Order
|
||||
- Added the correct Exception Type to the finalize method
|
||||
|
||||
# 6.1.13
|
||||
- Updated English documentation
|
||||
- Added French, German and Italian documentation
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
# 6.1.16
|
||||
- Problem behoben, bei dem die Versandkosten nicht korrekt verarbeitet wurden
|
||||
|
||||
# 6.1.15
|
||||
- Problem behoben, bei dem ausstehende Bestellungen offen blieben
|
||||
|
||||
# 6.1.14
|
||||
– Warenkorb neu erstellen für Headless Storefront Order deaktivieren
|
||||
– Der korrekte Ausnahmetyp wurde zur Finalisierungsmethode hinzugefügt
|
||||
|
||||
# 6.1.13
|
||||
– Englische Dokumentation aktualisiert
|
||||
– Französische, deutsche und italienische Dokumentation hinzugefügt
|
||||
|
||||
@@ -14,10 +14,10 @@ The VR Payment Payment Plugin integrates modern payment processing into Shopware
|
||||
|
||||
## Documentation
|
||||
|
||||
- For English documentation click [here](https://plugin-documentation.vr-payment.de/vr-payment/shopware-6/6.1.13/docs/en/documentation.html)
|
||||
- Für die deutsche Dokumentation klicken Sie [hier](https://plugin-documentation.vr-payment.de/vr-payment/shopware-6/6.1.13/docs/de/documentation.html)
|
||||
- Pour la documentation Française, cliquez [ici](https://plugin-documentation.vr-payment.de/vr-payment/shopware-6/6.1.13/docs/fr/documentation.html)
|
||||
- Per la documentazione in tedesco, clicca [qui](https://plugin-documentation.vr-payment.de/vr-payment/shopware-6/6.1.13/docs/it/documentation.html)
|
||||
- For English documentation click [here](@WalleeDocPath(/docs/en/documentation.html))
|
||||
- Für die deutsche Dokumentation klicken Sie [hier](@WalleeDocPath(/docs/de/documentation.html))
|
||||
- Pour la documentation Française, cliquez [ici](@WalleeDocPath(/docs/fr/documentation.html))
|
||||
- Per la documentazione in tedesco, clicca [qui](@WalleeDocPath(/docs/it/documentation.html))
|
||||
|
||||
## Installation
|
||||
|
||||
|
||||
+1
-1
@@ -59,5 +59,5 @@
|
||||
"vrpayment/sdk": "^4.0.0"
|
||||
},
|
||||
"type": "shopware-platform-plugin",
|
||||
"version": "6.1.13"
|
||||
"version": "6.1.16"
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<meta name="keywords" value="VR Payment, Shopware, Shopware Plugin, Payment, Payment Integration, Documentation"><meta name="description" value="The documentation for the Shopware 6 plugin that enables processing payments with VR Payment.">
|
||||
<link rel="canonical" href="https://plugin-documentation.wallee.com/wallee-payment/shopware-6/master/VRPaymentPayment/docs/de/documentation.html" />
|
||||
<link rel="canonical" href="@WalleeCanonicalPath(https://plugin-documentation.wallee.com/wallee-payment, VRPaymentPayment/docs/de/documentation.html)" />
|
||||
<title>VR Payment Zahlungs-Plugin für Shopware 6</title>
|
||||
<link href="assets/monokai-sublime.css" rel="stylesheet" />
|
||||
<link href="assets/base.css" rel="stylesheet" />
|
||||
@@ -23,7 +23,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/vr-payment/shopware-6/releases/tag/6.1.13/">
|
||||
<a href="@WalleeReleasePath()">
|
||||
Source
|
||||
</a>
|
||||
</li>
|
||||
@@ -185,7 +185,7 @@ php bin/console plugin:install --activate --clearCache VRPaymentPayment</code></
|
||||
</div>
|
||||
<div class="chapter-body">
|
||||
<div class="paragraph">
|
||||
<p>Gehen Sie zu <a href="https://gateway.vr-payment.de/user/login/user/login">VR Payment</a> und erstellen Sie ein Konto, falls Sie noch keines haben.</p>
|
||||
<p>Gehen Sie zu <a href="https://gateway.vr-payment.de/user/login">VR Payment</a> und erstellen Sie ein Konto, falls Sie noch keines haben.</p>
|
||||
</div><div class="admonitionblock tip">
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<meta name="keywords" value="VR Payment, Shopware, Shopware Plugin, Payment, Payment Integration, Documentation"><meta name="description" value="The documentation for the Shopware 6 plugin that enables processing payments with VR Payment.">
|
||||
<link rel="canonical" href="https://plugin-documentation.wallee.com/wallee-payment/shopware-6/master/VRPaymentPayment/docs/en/documentation.html" />
|
||||
<link rel="canonical" href="@WalleeCanonicalPath(https://plugin-documentation.wallee.com/wallee-payment, VRPaymentPayment/docs/en/documentation.html)" />
|
||||
<title>VR Payment Shopware 6 Documentation</title>
|
||||
<link href="assets/monokai-sublime.css" rel="stylesheet" />
|
||||
<link href="assets/base.css" rel="stylesheet" />
|
||||
@@ -23,7 +23,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/vr-payment/shopware-6/releases/tag/6.1.13/">
|
||||
<a href="@WalleeReleasePath()">
|
||||
Source
|
||||
</a>
|
||||
</li>
|
||||
@@ -179,7 +179,7 @@ php bin/console plugin:install --activate --clearCache VRPaymentPayment</code></
|
||||
</div>
|
||||
<div class="chapter-body">
|
||||
<div class="paragraph">
|
||||
<p>Go to <a href="https://gateway.vr-payment.de/user/login/user/login">VR Payment</a> and create an Account if you do not already have one.</p>
|
||||
<p>Go to <a href="https://gateway.vr-payment.de/user/login">VR Payment</a> and create an Account if you do not already have one.</p>
|
||||
</div><div class="admonitionblock tip">
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<meta name="keywords" value="VR Payment, Shopware, Shopware Plugin, Payment, Payment Integration, Documentation"><meta name="description" value="The documentation for the Shopware 6 plugin that enables processing payments with VR Payment.">
|
||||
<link rel="canonical" href="https://plugin-documentation.wallee.com/wallee-payment/shopware-6/master/VRPaymentPayment/docs/fr/documentation.html" />
|
||||
<link rel="canonical" href="@WalleeCanonicalPath(https://plugin-documentation.wallee.com/wallee-payment, VRPaymentPayment/docs/fr/documentation.html)" />
|
||||
<title>Wallee Payment Plugin pour Shopware 6</title>
|
||||
<link href="assets/monokai-sublime.css" rel="stylesheet" />
|
||||
<link href="assets/base.css" rel="stylesheet" />
|
||||
@@ -23,7 +23,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/vr-payment/shopware-6/releases/tag/6.1.13/">
|
||||
<a href="@WalleeReleasePath()">
|
||||
Source
|
||||
</a>
|
||||
</li>
|
||||
@@ -172,7 +172,7 @@ php bin/console plugin:install --activate --clearCache VRPaymentPayment</code></
|
||||
</div>
|
||||
<div class="chapter-body">
|
||||
<div class="paragraph">
|
||||
<p>Allez sur <a href="https://gateway.vr-payment.de/user/login/user/login">VR Payment</a> et créez un Compte si vous n’en avez pas déjà un</p>
|
||||
<p>Allez sur hhttps://gateway.vr-payment.de/user/login[VR Payment] et créez un Compte si vous n’en avez pas déjà un</p>
|
||||
</div><div class="admonitionblock tip">
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<meta name="keywords" value="VR Payment, Shopware, Shopware Plugin, Payment, Payment Integration, Documentation"><meta name="description" value="The documentation for the Shopware 6 plugin that enables processing payments with VR Payment.">
|
||||
<link rel="canonical" href="https://plugin-documentation.wallee.com/wallee-payment/shopware-6/master/VRPaymentPayment/docs/it/documentation.html" />
|
||||
<link rel="canonical" href="@WalleeCanonicalPath(https://plugin-documentation.wallee.com/wallee-payment, VRPaymentPayment/docs/it/documentation.html)" />
|
||||
<title>VR Payment Shopware 6 Documentation</title>
|
||||
<link href="assets/monokai-sublime.css" rel="stylesheet" />
|
||||
<link href="assets/base.css" rel="stylesheet" />
|
||||
@@ -23,7 +23,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/vr-payment/shopware-6/releases/tag/6.1.13/">
|
||||
<a href="@WalleeReleasePath()">
|
||||
Source
|
||||
</a>
|
||||
</li>
|
||||
@@ -179,7 +179,7 @@ php bin/console plugin:install --activate --clearCache VRPaymentPayment</code></
|
||||
</div>
|
||||
<div class="chapter-body">
|
||||
<div class="paragraph">
|
||||
<p>Andate su <a href="https://gateway.vr-payment.de/user/login/user/login">VR Payment</a> e create un account se non ne avete già uno.</p>
|
||||
<p>Andate su <a href="https://gateway.vr-payment.de/user/login">VR Payment</a> e create un account se non ne avete già uno.</p>
|
||||
</div><div class="admonitionblock tip">
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
@@ -9,6 +9,7 @@ use Shopware\Core\{
|
||||
Checkout\Payment\Cart\PaymentHandler\AsynchronousPaymentHandlerInterface,
|
||||
Checkout\Payment\Exception\AsyncPaymentFinalizeException,
|
||||
Checkout\Payment\Exception\AsyncPaymentProcessException,
|
||||
Checkout\Payment\PaymentException,
|
||||
Checkout\Payment\Exception\CustomerCanceledAsyncPaymentException,
|
||||
Framework\Validation\DataBag\RequestDataBag,
|
||||
System\SalesChannel\SalesChannelContext
|
||||
@@ -140,7 +141,7 @@ class VRPaymentPaymentHandler implements AsynchronousPaymentHandlerInterface
|
||||
]);
|
||||
unset($_SESSION['transactionId']);
|
||||
$this->logger->info($errorMessage);
|
||||
throw new \Exception($transaction->getOrder()->getId());
|
||||
throw PaymentException::customerCanceled($transaction->getOrderTransaction()->getId(), $errorMessage);
|
||||
}
|
||||
} else {
|
||||
$this->orderTransactionStateHandler->paid($transaction->getOrderTransaction()->getId(), $salesChannelContext->getContext());
|
||||
|
||||
@@ -29,6 +29,31 @@ class SettingsService {
|
||||
public const CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED = 'storefrontWebhooksUpdateEnabled';
|
||||
public const CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED = 'storefrontPaymentsUpdateEnabled';
|
||||
|
||||
/**
|
||||
* List of config properties whose values allowed to be empty without triggering a warning in logger.
|
||||
*
|
||||
* This list is derived from testing of all config properties. The plugin fails only when either spaceId, userId, applicationKey and/or integration is empty.
|
||||
* On top of that, spaceId, userId, applicationKey are marked as "required" input fields in admin interface.
|
||||
*
|
||||
* It is worth considering updating this list whenever a new config is introduced in settings.
|
||||
* If new config is optional, left empty by design and not required for transactions to work, this list should be updated to avoid false-positive warnings.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private const ALLOWED_EMPTY_CONFIGS = [
|
||||
// Options
|
||||
self::CONFIG_SPACE_VIEW_ID,
|
||||
self::CONFIG_LINE_ITEM_CONSISTENCY_ENABLED,
|
||||
self::CONFIG_EMAIL_ENABLED,
|
||||
|
||||
// Storefront Options
|
||||
self::CONFIG_STOREFRONT_INVOICE_DOWNLOAD_ENABLED,
|
||||
|
||||
// Advanced Options
|
||||
self::CONFIG_STOREFRONT_WEBHOOKS_UPDATE_ENABLED,
|
||||
self::CONFIG_STOREFRONT_PAYMENTS_UPDATE_ENABLED
|
||||
];
|
||||
|
||||
/**
|
||||
* @var \Shopware\Core\System\SystemConfig\SystemConfigService
|
||||
*/
|
||||
@@ -132,7 +157,13 @@ class SettingsService {
|
||||
if ($property === '') {
|
||||
continue;
|
||||
}
|
||||
if (!is_numeric($value) && empty($value)) {
|
||||
// Space view id is only numeric setting which can be 0. If it is, rest of the loop is skipped.
|
||||
if ($property === self::CONFIG_SPACE_VIEW_ID && $value === 0) {
|
||||
$propertyValuePairs[$property] = $value;
|
||||
continue;
|
||||
}
|
||||
// Check if $value is empty and is not in the list of configs which are allowed to be empty
|
||||
if (empty($value) && !in_array($property, self::ALLOWED_EMPTY_CONFIGS, true)) {
|
||||
$this->logger->warning(strtr('Empty value :value for settings :property.', [':property' => $property, ':value' => $value]));
|
||||
}
|
||||
$propertyValuePairs[$property] = $value;
|
||||
|
||||
@@ -10,7 +10,9 @@ use Shopware\Core\{
|
||||
Checkout\Cart\SalesChannel\CartService,
|
||||
Checkout\Order\Aggregate\OrderLineItem\OrderLineItemCollection,
|
||||
Checkout\Order\Aggregate\OrderLineItem\OrderLineItemEntity,
|
||||
Checkout\Order\Aggregate\OrderTransaction\OrderTransactionStateHandler,
|
||||
Checkout\Order\OrderEntity,
|
||||
Checkout\Order\OrderDefinition,
|
||||
Checkout\Order\SalesChannel\AbstractOrderRoute,
|
||||
Framework\Context,
|
||||
Framework\DataAbstractionLayer\Search\Criteria,
|
||||
@@ -21,7 +23,9 @@ use Shopware\Core\{
|
||||
Framework\Uuid\Uuid,
|
||||
Framework\Uuid\Exception\InvalidUuidException,
|
||||
Framework\Validation\DataBag\RequestDataBag,
|
||||
System\SalesChannel\SalesChannelContext
|
||||
System\SalesChannel\SalesChannelContext,
|
||||
System\StateMachine\StateMachineRegistry,
|
||||
System\StateMachine\Transition,
|
||||
};
|
||||
use Shopware\Storefront\{
|
||||
Controller\StorefrontController,
|
||||
@@ -43,7 +47,8 @@ use VRPaymentPayment\Core\{
|
||||
Settings\Options\Integration,
|
||||
Settings\Service\SettingsService,
|
||||
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']])]
|
||||
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
|
||||
*/
|
||||
@@ -106,6 +123,8 @@ class CheckoutController extends StorefrontController {
|
||||
* @param \VRPaymentPayment\Core\Api\Transaction\Service\TransactionService $transactionService
|
||||
* @param \Shopware\Storefront\Page\GenericPageLoaderInterface $genericLoader
|
||||
* @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(
|
||||
LineItemFactoryRegistry $lineItemFactoryRegistry,
|
||||
@@ -113,7 +132,9 @@ class CheckoutController extends StorefrontController {
|
||||
SettingsService $settingsService,
|
||||
TransactionService $transactionService,
|
||||
GenericPageLoaderInterface $genericLoader,
|
||||
AbstractOrderRoute $orderRoute
|
||||
AbstractOrderRoute $orderRoute,
|
||||
OrderTransactionStateHandler $orderTransactionStateHandler,
|
||||
StateMachineRegistry $stateMachineRegistry
|
||||
)
|
||||
{
|
||||
$this->cartService = $cartService;
|
||||
@@ -122,6 +143,8 @@ class CheckoutController extends StorefrontController {
|
||||
$this->transactionService = $transactionService;
|
||||
$this->lineItemFactoryRegistry = $lineItemFactoryRegistry;
|
||||
$this->orderRoute = $orderRoute;
|
||||
$this->orderTransactionStateHandler = $orderTransactionStateHandler;
|
||||
$this->stateMachineRegistry = $stateMachineRegistry;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -354,6 +377,19 @@ class CheckoutController extends StorefrontController {
|
||||
throw new MissingRequestParameterException('orderId');
|
||||
}
|
||||
|
||||
// Adoption for Headless Storefronts
|
||||
$orderRepo = $this->container->get('order.repository');
|
||||
$criteria = new Criteria([$orderId]);
|
||||
|
||||
$orderEntity = $orderRepo->search($criteria, $salesChannelContext->getContext())->first();
|
||||
|
||||
if($orderEntity->getSalesChannelId() !== $salesChannelContext->getSalesChannelId()) {
|
||||
$this->settings = $this->settingsService->getSettings($orderEntity->getSalesChannelId());
|
||||
$trans = $this->getTransaction($orderId, $salesChannelContext->getContext());
|
||||
return $this->redirect($trans->getSuccessUrl());
|
||||
}
|
||||
// End Adoption for Headless Storefronts
|
||||
|
||||
try {
|
||||
$this->cartService->deleteCart($salesChannelContext);
|
||||
$cart = $this->cartService->createNew($salesChannelContext->getToken());
|
||||
@@ -367,6 +403,7 @@ class CheckoutController extends StorefrontController {
|
||||
}
|
||||
|
||||
$transaction = $this->getTransaction($orderId, $salesChannelContext->getContext());
|
||||
$orderTransactionId = $transaction->getMetaData()[TransactionPayload::VRPAYMENT_METADATA_ORDER_TRANSACTION_ID];
|
||||
if (!empty($transaction->getUserFailureMessage())) {
|
||||
$this->addFlash('danger', $transaction->getUserFailureMessage());
|
||||
}
|
||||
@@ -401,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) {
|
||||
$this->addFlash('danger', $this->trans('error.addToCartError'));
|
||||
$this->logger->critical($exception->getMessage());
|
||||
|
||||
@@ -14,6 +14,7 @@ class Analytics {
|
||||
public const SHOP_SYSTEM = 'x-meta-shop-system';
|
||||
public const SHOP_SYSTEM_VERSION = 'x-meta-shop-system-version';
|
||||
public const SHOP_SYSTEM_AND_VERSION = 'x-meta-shop-system-and-version';
|
||||
public const PLUGIN_SYSTEM_VERSION = 'x-meta-plugin-version';
|
||||
|
||||
/**
|
||||
* @return array
|
||||
@@ -24,6 +25,7 @@ class Analytics {
|
||||
self::SHOP_SYSTEM => 'shopware',
|
||||
self::SHOP_SYSTEM_VERSION => '6',
|
||||
self::SHOP_SYSTEM_AND_VERSION => 'shopware-6',
|
||||
self::PLUGIN_SYSTEM_VERSION => '6.1.16',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -357,7 +357,9 @@ class TransactionPayload extends AbstractPayload
|
||||
*/
|
||||
protected function addOptionalLineItems(array &$lineItems): void
|
||||
{
|
||||
if (count($this->transaction->getOrder()->getShippingCosts()->getCalculatedTaxes()) === 1) {
|
||||
$shippingCosts = $this->transaction->getOrder()->getShippingCosts();
|
||||
|
||||
if ($shippingCosts && $this->transaction->getOrder()->getShippingTotal() > 0) {
|
||||
if ($shippingLineItem = $this->getShippingLineItem()) {
|
||||
$lineItems[] = $shippingLineItem;
|
||||
}
|
||||
@@ -619,12 +621,22 @@ class TransactionPayload extends AbstractPayload
|
||||
{
|
||||
$lineItem = null;
|
||||
|
||||
$lineItemPriceTotal = array_sum(array_map(static function (LineItemCreate $lineItem) {
|
||||
return $lineItem->getAmountIncludingTax();
|
||||
}, $lineItems));
|
||||
// Calculate total of all current line items
|
||||
$lineItemPriceTotal = array_sum(array_map(static fn(LineItemCreate $li) => $li->getAmountIncludingTax(), $lineItems));
|
||||
|
||||
$adjustmentPrice = $this->transaction->getOrder()->getAmountTotal() - $lineItemPriceTotal;
|
||||
$adjustmentPrice = self::round($adjustmentPrice);
|
||||
$this->logger->debug("LineItem price total before adjustment: $lineItemPriceTotal");
|
||||
|
||||
// Get shipping total including taxes from the order
|
||||
$shippingCosts = $this->transaction->getOrder()->getShippingCosts();
|
||||
$shippingTotal = $shippingCosts ? self::round($shippingCosts->getTotalPrice()) : 0.0;
|
||||
|
||||
// Add shipping to the line items total if it's not already included
|
||||
$hasShippingLineItem = array_filter($lineItems, static fn(LineItemCreate $li) => $li->getType() === LineItemType::SHIPPING);
|
||||
if (!$hasShippingLineItem && $shippingTotal > 0) {
|
||||
$lineItemPriceTotal += $shippingTotal;
|
||||
}
|
||||
|
||||
$adjustmentPrice = self::round($this->transaction->getOrder()->getAmountTotal() - $lineItemPriceTotal);
|
||||
|
||||
if (abs($adjustmentPrice) != 0) {
|
||||
if ($this->settings->isLineItemConsistencyEnabled()) {
|
||||
|
||||
-1
File diff suppressed because one or more lines are too long
@@ -13,6 +13,8 @@
|
||||
<argument type="service" id="VRPaymentPayment\Core\Api\Transaction\Service\TransactionService"/>
|
||||
<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\Aggregate\OrderTransaction\OrderTransactionStateHandler"/>
|
||||
<argument type="service" id="Shopware\Core\System\StateMachine\StateMachineRegistry"/>
|
||||
<call method="setLogger">
|
||||
<argument type="service" id="monolog.logger.vrpayment_payment"/>
|
||||
</call>
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
.sw-order-detail .sw-tabs{margin-top:40px}.sw-order-detail .sw-order-detail-base .sw-card-view__content{overflow-x:visible;overflow-y:visible}
|
||||
.vrpayment-order-detail__data{display:grid}.vrpayment-order-detail__heading{padding-top:15px}
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user