Commit ce93b432 authored by Daniel's avatar Daniel
Browse files

Hotfix part 2

parent 2f2fce04
......@@ -13,6 +13,6 @@ class SubjectReader extends \Magento\Payment\Gateway\Helper\SubjectReader
*/
public static function readAmount(array $subject): int
{
return round(parent::readAmount($subject) * 100, 2);
return (int) (round(parent::readAmount($subject), 2) * 100);
}
}
......@@ -17,7 +17,7 @@ class AmountBuilder
public function buildFromQuote(Quote $quote): Amount
{
$amount = new Amount();
$amount->setAmount(round($quote->getGrandTotal(), 2) * 100);
$amount->setAmount((int) (round($quote->getGrandTotal(), 2) * 100));
return $amount;
}
......@@ -29,7 +29,7 @@ class AmountBuilder
public function buildFromOrder(OrderAdapterInterface $order): Amount
{
$amount = new Amount();
$amount->setAmount(round($order->getGrandTotalAmount(), 2) * 100);
$amount->setAmount((int) (round($order->getGrandTotalAmount(), 2) * 100));
return $amount;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment