Skip to content

Commit

Permalink
Fixed #552
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasA committed Sep 26, 2024
1 parent 35c9bb2 commit 75fb07c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ScheduledTask/ProcessNotificationsHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public function run(): void
* It will be marked as done.
*/
$this->logger->info($exception->getMessage(), $logContext);
} catch (\Exception $exception) {
} catch (\Throwable $exception) {
$logContext['errorMessage'] = $exception->getMessage();
$this->logger->error('Notification processing failed.', $logContext);
$this->logNotificationFailure($notification, $exception->getMessage());
Expand Down
4 changes: 3 additions & 1 deletion src/Service/CaptureService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => null !== $highestTaxRate ? ($highestTaxRate->getPercentage() * 10) : 0,
'quantity' => $lineItem->getQuantity(),
'id' => $lineItem->getId()
];
Expand Down

0 comments on commit 75fb07c

Please sign in to comment.