Skip to content

Commit

Permalink
Use transaction amount instead of order amount
Browse files Browse the repository at this point in the history
  • Loading branch information
sneakyvv committed Aug 26, 2024
1 parent 6c1ebb9 commit e2d12e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Handlers/AbstractPaymentMethodHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ private function createAdyenOrder(SalesChannelContext $salesChannelContext, $tra
$uuid = Uuid::randomHex();
$currency = $salesChannelContext->getCurrency()->getIsoCode();
$amount = $this->currency->sanitize(
$transaction->getOrder()->getPrice()->getTotalPrice(),
$transaction->getOrderTransaction()->getAmount()->getTotalPrice(),
$salesChannelContext->getCurrency()->getIsoCode()
);
return $this->ordersService->createOrder($salesChannelContext, $uuid, $amount, $currency);
Expand Down Expand Up @@ -569,7 +569,7 @@ protected function preparePaymentsRequest(

//Building payment data
$amount = $partialAmount ?: $this->currency->sanitize(
$transaction->getOrder()->getPrice()->getTotalPrice(),
$transaction->getOrderTransaction()->getAmount()->getTotalPrice(),
$salesChannelContext->getCurrency()->getIsoCode()
);

Expand Down Expand Up @@ -832,7 +832,7 @@ public function handleAdyenOrderPayment(

//New Multi-Gift-card implementation
$remainingOrderAmount = $this->currency->sanitize(
$transaction->getOrder()->getPrice()->getTotalPrice(),
$transaction->getOrderTransaction()->getAmount()->getTotalPrice(),
$salesChannelContext->getCurrency()->getIsoCode()
);

Expand Down

0 comments on commit e2d12e7

Please sign in to comment.