From 52c22b1a256d0d60aa4fcde815af2ea85169106a Mon Sep 17 00:00:00 2001 From: Dominic Date: Thu, 14 Nov 2019 16:51:08 +0000 Subject: [PATCH] Fix to correctly work with multi currency stores. Passes base grand total to Viva instead of grand total. Base grand total is store base currency. --- .../Ced/VivaPayments/Model/PaymentMethod.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/magento/magento23_vivawallet/Ced/VivaPayments/Model/PaymentMethod.php b/Plugins/magento/magento23_vivawallet/Ced/VivaPayments/Model/PaymentMethod.php index 4cdd3d15..2dc07b61 100644 --- a/Plugins/magento/magento23_vivawallet/Ced/VivaPayments/Model/PaymentMethod.php +++ b/Plugins/magento/magento23_vivawallet/Ced/VivaPayments/Model/PaymentMethod.php @@ -88,8 +88,8 @@ public function getPostHTML($order, $storeId = null) $mref = "REF".substr(md5(uniqid(rand(), true)), 0, 9); $TmSecureKey = 'd2ViaXQuYnovbGljZW5zZS50eHQ='; - $charge = $order->getGrandTotal(); - $amountcents = round($order->getGrandTotal() * 100); + $charge = $order->getBaseGrandTotal(); + $amountcents = round($order->getBaseGrandTotal() * 100); $MerchantID = $this->getConfigData('merchantid'); $Password = $this->getConfigData('merchantpass'); $trlang = $this->_localeResolver->getLocale();