Skip to content

Commit

Permalink
Release 4.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
edgaraswallee committed Jul 5, 2021
1 parent f6811b0 commit 7681bf3
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 4.0.2
- Fixed shipping line item name

# 4.0.1
- Fixed tax calculation for custom products

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG_de-DE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 4.0.2
- Der Name der Versand-Einzelposten wurde korrigiert

# 4.0.1
- Feste Steuerberechnung für kundenspezifische Produkte

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ tail -f var/log/postfinancecheckout_payment*.log

## Documentation

[Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/shopware-6/4.0.1/docs/en/documentation.html)
[Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/shopware-6/4.0.2/docs/en/documentation.html)

## License

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@
"postfinancecheckout/sdk": "3.0.0"
},
"type": "shopware-platform-plugin",
"version": "4.0.1"
"version": "4.0.2"
}
2 changes: 1 addition & 1 deletion docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/pfpayments/shopware-6/releases/tag/4.0.1/">
<a href="https://github.com/pfpayments/shopware-6/releases/tag/4.0.2/">
Source
</a>
</li>
Expand Down
5 changes: 4 additions & 1 deletion src/Core/Api/WebHooks/Controller/WebHookController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
Checkout\Order\SalesChannel\OrderService,
Framework\Context,
Framework\DataAbstractionLayer\Search\Criteria,
Framework\DataAbstractionLayer\Search\Sorting\FieldSorting,
Framework\Routing\Annotation\RouteScope,
System\StateMachine\Aggregation\StateMachineTransition\StateMachineTransitionActions,
System\StateMachine\Exception\IllegalTransitionException};
Expand Down Expand Up @@ -362,7 +363,9 @@ private function getOrderTransaction(String $orderId, Context $context): OrderTr
private function getOrderEntity(string $orderId, Context $context): OrderEntity
{
if (is_null($this->orderEntity)) {
$criteria = (new Criteria([$orderId]))->addAssociations(['deliveries', 'transactions',]);
$criteria = (new Criteria([$orderId]))
->addAssociations(['deliveries', 'transactions',])
->addSorting(new FieldSorting('createdAt'));

try {
$this->orderEntity = $this->container->get('order.repository')->search(
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Util/Payload/TransactionPayload.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,10 @@ protected function getShippingLineItem(): ?LineItemCreate
->setName($this->fixLength($shippingName . ' ' . $this->translator->trans('postfinancecheckout.payload.shipping.lineItem'), 150))
->setQuantity($this->transaction->getOrder()->getShippingCosts()->getQuantity() ?? 1)
->setTaxes($taxes)
->setSku($this->fixLength($shippingName . '-Shipping-Line-Item', 200))
->setSku($this->fixLength($shippingName . '-Shipping', 200))
/** @noinspection PhpParamsInspection */
->setType(LineItemType::SHIPPING)
->setUniqueId($this->fixLength($shippingName . '-Shipping-Line-Item', 200));
->setUniqueId($this->fixLength($shippingName . '-Shipping', 200));

if (!$lineItem->valid()) {
$this->logger->critical('Shipping LineItem payload invalid:', $lineItem->listInvalidProperties());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ Component.register('postfinancecheckout-order-detail', {
const orderRepository = this.repositoryFactory.create('order');
const orderCriteria = new Criteria(1, 1);
orderCriteria.addAssociation('transactions');
orderCriteria.getAssociation('transactions').addSorting(Criteria.sort('createdAt', 'DESC'));

orderRepository.get(this.orderId, Context.api, orderCriteria).then((order) => {
this.order = order;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"payload": {
"adjustmentLineItem": "Anpassung Einzelposten",
"shipping": {
"lineItem": "Versand-Einzelposten",
"lineItem": "Versand",
"name": "Versand"
},
"taxes": "Steuern"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"payload": {
"adjustmentLineItem": "Adjustment Line Item",
"shipping": {
"lineItem": "Shipping Line Item",
"lineItem": "Shipping",
"name": "Shipping"
},
"taxes": "Taxes"
Expand Down

0 comments on commit 7681bf3

Please sign in to comment.