public static function pRound($value, $country)
    {
        $multiply = 1; //Round to closest integer
        $country = KlarnaCountry::getCode($country);
        switch($country) {
        case "FI":
        case "DE":
        case "NL":
        case "AT":
            $multiply = 10; //Round to closest decimal
            break;
        }

        return floor(($value*$multiply)+0.5)/$multiply;
    }
public static function pRound($value, $country)
    {
        $multiply = 1; //Round to closest integer
        $country = KlarnaCountry::getCode($country);
        switch($country) {
        case "FI":
        case "DE":
        case "NL":
        case "AT":
            $multiply = 10; //Round to closest decimal
            break;
        }

        return floor(($value*$multiply)+0.5)/$multiply;
    }
public static function pRound ( $ value , $ country ) { $ multiply = 1 ; //Round to closest integer $ country = KlarnaCountry :: getCode ( $ country ) ; switch ( $ country ) { case "FI" : case "DE" : case "NL" : case "AT" : $ multiply = 10 ; //Round to closest decimal break ; } return floor ( ( $ value * $ multiply ) + 0.5 ) / $ multiply ; }
Rounds a value depending on the specified country.

@param int|float $value   The value to be rounded.
@param int       $country KlarnaCountry constant.

@return float|int
Rounds a value depending on the specified country .