<?php
namespace Hepsipay;
class Formatter
{
    public static function formatAmount($amount)
	{        
		if (strpos($amount, ".") !== false) 
		{
			$amount = str_replace('.', '', $amount);
		}
		
		if (strpos($amount, ",") !== false) 
		{
			$amount = str_replace(',', '.', $amount);
		}
		
		return number_format($amount, 2, '', '');
	}
}
