mirror of
https://github.com/vr-payment/shopware-6.git
synced 2026-06-04 19:03:01 +00:00
Release 7.3.1
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
# 7.3.1
|
||||||
|
- Shopware 6.7.7.0 compatibility
|
||||||
|
- Fix for missing payment icons
|
||||||
|
- Fixed issue with 'Entire Set' coupons returning error due to totals mismatch
|
||||||
|
- Fixed issue with orphaned order_transactions causing an admin UI failure
|
||||||
|
- Fixed error thrown when customers who aren't logged in attempt to download an invoice
|
||||||
|
|
||||||
# 7.3.0
|
# 7.3.0
|
||||||
- Headless storefront support
|
- Headless storefront support
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
# 7.3.1
|
||||||
|
- Kompatibilität mit Shopware 6.7.7.0
|
||||||
|
- Fehlende Zahlungssymbole behoben
|
||||||
|
- Problem mit „Gesamtes Set“-Gutscheinen aufgrund von Summenabweichungen behoben
|
||||||
|
- Problem mit verwaisten Bestelltransaktionen behoben, die zu einem Fehler in der Admin-Oberfläche führten
|
||||||
|
- Ein Fehler wurde behoben, der auftrat, wenn nicht angemeldete Kunden versuchten, eine Rechnung herunterzuladen.
|
||||||
|
|
||||||
# 7.3.0
|
# 7.3.0
|
||||||
- Headless Storefront unterstützung
|
- Headless Storefront unterstützung
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ Please note that this plugin is for versions 6.5, 6.6 or 6.7. For the 6.4 plugin
|
|||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
- For English documentation click [here](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.3.0/docs/en/documentation.html)
|
- For English documentation click [here](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.3.1/docs/en/documentation.html)
|
||||||
- Für die deutsche Dokumentation klicken Sie [hier](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.3.0/docs/de/documentation.html)
|
- Für die deutsche Dokumentation klicken Sie [hier](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.3.1/docs/de/documentation.html)
|
||||||
- Pour la documentation Française, cliquez [ici](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.3.0/docs/fr/documentation.html)
|
- Pour la documentation Française, cliquez [ici](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.3.1/docs/fr/documentation.html)
|
||||||
- Per la documentazione in tedesco, clicca [qui](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.3.0/docs/it/documentation.html)
|
- Per la documentazione in tedesco, clicca [qui](https://docs.plugin-documentation.vr-payment.de/vr-payment/shopware-6/7.3.1/docs/it/documentation.html)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|||||||
+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": "7.3.0"
|
"version": "7.3.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="https://github.com/vr-payment/shopware-6/releases/tag/7.3.0/">
|
<a href="https://github.com/vr-payment/shopware-6/releases/tag/7.3.1/">
|
||||||
Source
|
Source
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="https://github.com/vr-payment/shopware-6/releases/tag/7.3.0/">
|
<a href="https://github.com/vr-payment/shopware-6/releases/tag/7.3.1/">
|
||||||
Source
|
Source
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="https://github.com/vr-payment/shopware-6/releases/tag/7.3.0/">
|
<a href="https://github.com/vr-payment/shopware-6/releases/tag/7.3.1/">
|
||||||
Source
|
Source
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="https://github.com/vr-payment/shopware-6/releases/tag/7.3.0/">
|
<a href="https://github.com/vr-payment/shopware-6/releases/tag/7.3.1/">
|
||||||
Source
|
Source
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -119,7 +119,9 @@ class WebHookTransactionStrategy extends WebHookStrategyBase implements WebhookS
|
|||||||
$orderId = $transaction->getMetaData()[TransactionPayload::VRPAYMENT_METADATA_ORDER_ID];
|
$orderId = $transaction->getMetaData()[TransactionPayload::VRPAYMENT_METADATA_ORDER_ID];
|
||||||
if (!empty($orderId) && !$transaction->getParent()) {
|
if (!empty($orderId) && !$transaction->getParent()) {
|
||||||
$this->executeLocked($orderId, $context, function () use ($orderId, $transaction, $context, $request, $token) {
|
$this->executeLocked($orderId, $context, function () use ($orderId, $transaction, $context, $request, $token) {
|
||||||
$this->transactionService->upsert($transaction, $context);
|
if ($this->allowUpsert($transaction, $orderId, $context)) {
|
||||||
|
$this->transactionService->upsert($transaction, $context);
|
||||||
|
}
|
||||||
$orderTransactionId = $transaction->getMetaData()[TransactionPayload::VRPAYMENT_METADATA_ORDER_TRANSACTION_ID];
|
$orderTransactionId = $transaction->getMetaData()[TransactionPayload::VRPAYMENT_METADATA_ORDER_TRANSACTION_ID];
|
||||||
$orderTransaction = $this->getOrderTransaction($orderId, $context);
|
$orderTransaction = $this->getOrderTransaction($orderId, $context);
|
||||||
$this->logger->info("OrderId: {orderId} Current state: {state}", [
|
$this->logger->info("OrderId: {orderId} Current state: {state}", [
|
||||||
@@ -178,4 +180,26 @@ class WebHookTransactionStrategy extends WebHookStrategyBase implements WebhookS
|
|||||||
|
|
||||||
return new JsonResponse(['data' => $request->jsonSerialize()], $status);
|
return new JsonResponse(['data' => $request->jsonSerialize()], $status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks the incoming transaction ID against the current transaction ID of the order.
|
||||||
|
* If they don’t match, the saved transaction in the database remains unchanged.
|
||||||
|
*
|
||||||
|
* @param Transaction $transaction The transaction data retrieved from the portal.
|
||||||
|
* @param string $orderId The order ID of the current transaction.
|
||||||
|
* @param Context $context The operational context providing settings and environment for transaction processing.
|
||||||
|
* @return bool Returns a value that determines whether to upsert the transaction into the database.
|
||||||
|
*/
|
||||||
|
private function allowUpsert(Transaction $transaction, string $orderId, Context $context): bool
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$transactionEntity = $this->transactionService->getByOrderId($orderId, $context);
|
||||||
|
if ($transactionEntity->getTransactionId() !== $transaction->getId()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} catch (\Throwable $e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ class PaymentMethodRouteDecorator extends AbstractPaymentMethodRoute
|
|||||||
$response = $this->decorated->load($request, $context, $criteria);
|
$response = $this->decorated->load($request, $context, $criteria);
|
||||||
|
|
||||||
$currentRoute = $request->attributes->get('_route');
|
$currentRoute = $request->attributes->get('_route');
|
||||||
if ($currentRoute === 'frontend.checkout.finish.page') {
|
if ($currentRoute === 'frontend.checkout.finish.page' || !$this->allowFilterPaymentMethods($request)) {
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,4 +100,22 @@ class PaymentMethodRouteDecorator extends AbstractPaymentMethodRoute
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We prevent filtering methods unless onlyAvailable is true.
|
||||||
|
* This is because the filterPaymentMethods() function creates unnecessary pending transactions in the
|
||||||
|
* portal when logged-in users navigate between pages.
|
||||||
|
* The onlyAvailable flag applies rule-based filtering of payment methods and is usually true on checkout pages,
|
||||||
|
* so we apply filterPaymentMethods() only when relevant.
|
||||||
|
*
|
||||||
|
* @param Request $request
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
private function allowFilterPaymentMethods(Request $request): bool
|
||||||
|
{
|
||||||
|
if ($request->query->getBoolean('onlyAvailable') || $request->request->getBoolean('onlyAvailable')) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ class PaymentMethodFilterService
|
|||||||
new EqualsFilter('salesChannels.id', $salesChannelContext->getSalesChannelId())
|
new EqualsFilter('salesChannels.id', $salesChannelContext->getSalesChannelId())
|
||||||
);
|
);
|
||||||
$criteria->addSorting(new FieldSorting('position', FieldSorting::ASCENDING));
|
$criteria->addSorting(new FieldSorting('position', FieldSorting::ASCENDING));
|
||||||
|
$criteria->addAssociation('media');
|
||||||
// Re-fetch the entities to ensure we have valid objects with all associations.
|
// Re-fetch the entities to ensure we have valid objects with all associations.
|
||||||
$result = $this->paymentMethodRepository->search($criteria, $salesChannelContext->getContext());
|
$result = $this->paymentMethodRepository->search($criteria, $salesChannelContext->getContext());
|
||||||
/** @var \Shopware\Core\Checkout\Payment\PaymentMethodEntity $method */
|
/** @var \Shopware\Core\Checkout\Payment\PaymentMethodEntity $method */
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace VRPaymentPayment\Core\Storefront\Account\Controller;
|
|||||||
|
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
use Shopware\Core\{
|
use Shopware\Core\{
|
||||||
Checkout\Cart\Exception\CustomerNotLoggedInException,
|
Checkout\Cart\CartException,
|
||||||
Checkout\Customer\CustomerEntity,
|
Checkout\Customer\CustomerEntity,
|
||||||
PlatformRequest,
|
PlatformRequest,
|
||||||
System\SalesChannel\SalesChannelContext
|
System\SalesChannel\SalesChannelContext
|
||||||
@@ -133,14 +133,14 @@ class AccountOrderController extends StorefrontController
|
|||||||
* Helper to retrieve the currently logged-in customer.
|
* Helper to retrieve the currently logged-in customer.
|
||||||
*
|
*
|
||||||
* @return CustomerEntity
|
* @return CustomerEntity
|
||||||
* @throws CustomerNotLoggedInException
|
* @throws CartException
|
||||||
*/
|
*/
|
||||||
protected function getLoggedInCustomer(): CustomerEntity
|
protected function getLoggedInCustomer(): CustomerEntity
|
||||||
{
|
{
|
||||||
$request = $this->requestStack->getCurrentRequest();
|
$request = $this->requestStack->getCurrentRequest();
|
||||||
|
|
||||||
if (!$request) {
|
if (!$request) {
|
||||||
throw new CustomerNotLoggedInException();
|
throw CartException::customerNotLoggedIn();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var SalesChannelContext|null $context */
|
/** @var SalesChannelContext|null $context */
|
||||||
@@ -150,6 +150,6 @@ class AccountOrderController extends StorefrontController
|
|||||||
return $context->getCustomer();
|
return $context->getCustomer();
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new CustomerNotLoggedInException();
|
throw CartException::customerNotLoggedIn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,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 => '7.3.0',
|
self::PLUGIN_SYSTEM_VERSION => '7.3.1',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ class TransactionPayload extends AbstractPayload
|
|||||||
'merchant_reference' => $this->fixLength($this->order->getOrderNumber(), 100),
|
'merchant_reference' => $this->fixLength($this->order->getOrderNumber(), 100),
|
||||||
'meta_data' => [
|
'meta_data' => [
|
||||||
self::VRPAYMENT_METADATA_ORDER_ID => $this->order->getId(),
|
self::VRPAYMENT_METADATA_ORDER_ID => $this->order->getId(),
|
||||||
self::VRPAYMENT_METADATA_ORDER_TRANSACTION_ID => $this->order->getTransactions()->first()->getId(),
|
self::VRPAYMENT_METADATA_ORDER_TRANSACTION_ID => $this->transaction->getOrderTransactionId(),
|
||||||
self::VRPAYMENT_METADATA_SALES_CHANNEL_ID => $this->salesChannelContext->getSalesChannel()->getId(),
|
self::VRPAYMENT_METADATA_SALES_CHANNEL_ID => $this->salesChannelContext->getSalesChannel()->getId(),
|
||||||
self::VRPAYMENT_METADATA_CUSTOMER_NAME => $customerName,
|
self::VRPAYMENT_METADATA_CUSTOMER_NAME => $customerName,
|
||||||
],
|
],
|
||||||
@@ -378,7 +378,7 @@ class TransactionPayload extends AbstractPayload
|
|||||||
$rate = $calculatedTax->getTaxRate();
|
$rate = $calculatedTax->getTaxRate();
|
||||||
$amount = $this->calculateDiscountAmount($calculatedTax);
|
$amount = $this->calculateDiscountAmount($calculatedTax);
|
||||||
|
|
||||||
$lineItems[] = $this->createDiscountLineItem($discountName, $amount, $rate);
|
$lineItems[] = $this->createDiscountLineItem($discountName, $amount, $rate, $discount->getId());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$taxRules = $calculatedPrice->getTaxRules();
|
$taxRules = $calculatedPrice->getTaxRules();
|
||||||
@@ -387,12 +387,12 @@ class TransactionPayload extends AbstractPayload
|
|||||||
foreach ($taxRules as $taxRule) {
|
foreach ($taxRules as $taxRule) {
|
||||||
$rate = $taxRule->getTaxRate();
|
$rate = $taxRule->getTaxRate();
|
||||||
$amount = $calculatedPrice->getTotalPrice();
|
$amount = $calculatedPrice->getTotalPrice();
|
||||||
$lineItems[] = $this->createDiscountLineItem($discountName, $amount, $rate);
|
$lineItems[] = $this->createDiscountLineItem($discountName, $amount, $rate, $discount->getId());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$rate = $this->getDefaultTaxRate();
|
$rate = $this->getDefaultTaxRate();
|
||||||
$amount = $calculatedPrice->getTotalPrice();
|
$amount = $calculatedPrice->getTotalPrice();
|
||||||
$lineItems[] = $this->createDiscountLineItem($discountName, $amount, $rate);
|
$lineItems[] = $this->createDiscountLineItem($discountName, $amount, $rate, $discount->getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -403,7 +403,7 @@ class TransactionPayload extends AbstractPayload
|
|||||||
* @param float $rate
|
* @param float $rate
|
||||||
* @return LineItemCreate
|
* @return LineItemCreate
|
||||||
*/
|
*/
|
||||||
private function createDiscountLineItem(string $discountName, float $amount, float $rate): LineItemCreate
|
private function createDiscountLineItem(string $discountName, float $amount, float $rate, string $discountId): LineItemCreate
|
||||||
{
|
{
|
||||||
$lineItem = new LineItemCreate();
|
$lineItem = new LineItemCreate();
|
||||||
|
|
||||||
@@ -422,7 +422,7 @@ class TransactionPayload extends AbstractPayload
|
|||||||
->setShippingRequired(false)
|
->setShippingRequired(false)
|
||||||
->setSku($discountSkuName, 200)
|
->setSku($discountSkuName, 200)
|
||||||
->setType(LineItemType::DISCOUNT)
|
->setType(LineItemType::DISCOUNT)
|
||||||
->setUniqueId('coupon-' . $discountSkuName);
|
->setUniqueId('coupon-' . $discountSkuName . '-' . $discountId);
|
||||||
|
|
||||||
$taxRate = new TaxCreate([
|
$taxRate = new TaxCreate([
|
||||||
'title' => 'Discount Tax: ' . $rate,
|
'title' => 'Discount Tax: ' . $rate,
|
||||||
|
|||||||
Reference in New Issue
Block a user