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 Jul 10, 2024
1 parent ed6a82b commit 9960751
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 @@ -344,7 +344,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 @@ -573,7 +573,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 @@ -846,7 +846,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 9960751

Please sign in to comment.