diff --git a/Model/Fintecture.php b/Model/Fintecture.php index 8714bbf..31688e3 100644 --- a/Model/Fintecture.php +++ b/Model/Fintecture.php @@ -53,7 +53,7 @@ class Fintecture extends AbstractMethod { public const CODE = 'fintecture'; public const CONFIG_PREFIX = 'payment/fintecture/'; - public const MODULE_VERSION = '2.2.1'; + public const MODULE_VERSION = '2.2.2'; private const PAYMENT_COMMUNICATION = 'FINTECTURE-'; private const REFUND_COMMUNICATION = 'REFUND FINTECTURE-'; @@ -396,7 +396,7 @@ public function createRefund(OrderInterface $order, CreditmemoInterface $creditm } $nbCreditmemos = $creditmemos->count() + 1; - $amount = $creditmemo->getBaseGrandTotal(); + $amount = (float) $creditmemo->getBaseGrandTotal(); if (!$amount) { $this->fintectureLogger->error('Refund', [ 'message' => 'No amount on creditmemo', @@ -636,7 +636,7 @@ public function generatePayload(Quote $quote, string $type, string $method = '') 'data' => [ 'type' => $type, 'attributes' => [ - 'amount' => (string) round($quote->getBaseGrandTotal(), 2), + 'amount' => (string) round((float) $quote->getBaseGrandTotal(), 2), 'currency' => $quote->getQuoteCurrencyCode(), 'communication' => self::PAYMENT_COMMUNICATION . $quote->getReservedOrderId(), ], diff --git a/composer.json b/composer.json index a9060ad..b5df5a2 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "email": "contact@fintecture.com" }, "type": "magento2-module", - "version": "2.2.1", + "version": "2.2.2", "license": [ "GPL-3.0" ], diff --git a/etc/module.xml b/etc/module.xml index 37c2313..7068ffd 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,6 +1,6 @@ - +