Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release version 3.17.2 #588

Merged
merged 10 commits into from
Dec 19, 2024
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -6,13 +6,13 @@
}
],
"description": "Official Shopware 6 Plugin to connect to Payment Service Provider Adyen",
"version": "3.17.1",
"version": "3.17.2",
"type": "shopware-platform-plugin",
"license": "MIT",
"require": {
"shopware/core": "~6.4.11 || ~6.5.0",
"shopware/storefront": "~6.4.11 || ~6.5.0",
"adyen/php-api-library": "^17.5.0",
"adyen/php-api-library": "^20.2.0",
"adyen/php-webhook-module": "0.8.0",
"ext-json": "*"
},

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -459,11 +459,17 @@ export default class ConfirmOrderPlugin extends Plugin {
componentConfig.onCancel(data, component, this);
},
onError: (error, component) => {
if (component.props.name === 'PayPal' && error.name === 'CANCEL') {
if (component.props.name === 'PayPal') {
this._client.post(
`${adyenCheckoutOptions.cancelOrderTransactionUrl}`,
JSON.stringify({orderId: this.orderId})
JSON.stringify({orderId: this.orderId}),
() => {
ElementLoadingIndicatorUtil.remove(document.body);
componentConfig.onError(error, component, this);
}
);

return;
}

ElementLoadingIndicatorUtil.remove(document.body);
@@ -664,3 +670,4 @@ export default class ConfirmOrderPlugin extends Plugin {
return extra;
}
}

4 changes: 3 additions & 1 deletion src/Service/CaptureService.php
Original file line number Diff line number Diff line change
@@ -334,11 +334,13 @@ private function getLineItemsObjectArray(
continue;
}

$highestTaxRate = $lineItem->getPrice()->getTaxRules()->highestRate();

$lineItemData = [
'amountIncludingTax' => ceil($lineItem->getPrice()->getTotalPrice() * 100),
'description' => $lineItem->getLabel(),
'taxAmount' => intval($lineItem->getPrice()->getCalculatedTaxes()->getAmount() * 100),
'taxPercentage' => $lineItem->getPrice()->getTaxRules()->highestRate()->getPercentage() * 10,
'taxPercentage' => $highestTaxRate !== null ? ($highestTaxRate->getPercentage() * 10) : 0,
'quantity' => $lineItem->getQuantity(),
'id' => $lineItem->getId()
];
Loading