* but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @package pi_ratepay_rate_calculator
 * Code by PayIntelligent GmbH  <http://www.payintelligent.de/>
 */
$pi_calculator = new PiRatepayRateCalc();

$pi_calculator->unsetData();
$pi_config = $pi_calculator->getRatepayRateConfig();
$pi_monthAllowed = $pi_config['month_allowed'];
$pi_monthAllowedArray = explode(',', $pi_monthAllowed);

$pi_amount = $pi_calculator->getRequestAmount();
$pi_language = $pi_calculator->getLanguage();
$pi_firstday = $pi_calculator->getRequestFirstday();

if ($pi_language == "DE") {
    require_once $calcPath.'/languages/german.php';
    $pi_currency = 'EUR';
    $pi_decimalSeperator = ',';
    $pi_thousandSeperator = '.';
} else {
    require_once $calcPath.'/languages/english.php';
    $pi_currency = 'EUR';
    $pi_decimalSeperator = '.';
    $pi_thousandSeperator = ',';
}

$pi_amount = number_format($pi_amount, 2, $pi_decimalSeperator, $pi_thousandSeperator);