diff --git a/upload/system/library/payfortFort/classes/Helper.php b/upload/system/library/payfortFort/classes/Helper.php index 73ddfa2..3cc1ed1 100644 --- a/upload/system/library/payfortFort/classes/Helper.php +++ b/upload/system/library/payfortFort/classes/Helper.php @@ -76,7 +76,9 @@ public function convertFortAmount($amount, $currency_value, $currency_code) else { $new_amount = round($amount, $decimal_points); } - $new_amount = $new_amount * (pow(10, $decimal_points)); + if($decimal_points != 0) { + $new_amount = $new_amount * (pow(10, $decimal_points)); + } return $new_amount; } @@ -96,6 +98,22 @@ public function getCurrencyDecimalPoints($currency) 'BHD' => 3, 'LYD' => 3, 'IQD' => 3, + 'CLF' => 4, + 'BIF' => 0, + 'DJF' => 0, + 'GNF' => 0, + 'ISK' => 0, + 'JPY' => 0, + 'KMF' => 0, + 'KRW' => 0, + 'CLP' => 0, + 'PYG' => 0, + 'RWF' => 0, + 'UGX' => 0, + 'VND' => 0, + 'VUV' => 0, + 'XAF' => 0, + 'BYR' => 0, ); if (isset($arrCurrencies[$currency])) { $decimalPoint = $arrCurrencies[$currency];