modified eCommerce Shopsoftware
   http://www.modified-shop.org

   Copyright (c) 2009 - 2013 [www.modified-shop.org]
   -----------------------------------------------------------------------------------------
 	 based on:
	  (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
	  (c) 2002-2003 osCommerce - www.oscommerce.com
	  (c) 2001-2003 TheMedia, Dipl.-Ing Thomas Plänkers - http://www.themedia.at & http://www.oscommerce.at
	  (c) 2003 XT-Commerce - community made shopping http://www.xt-commerce.com
  
   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
require_once DIR_FS_EXTERNAL . 'payone/classes/PayoneModified.php';
require_once DIR_FS_EXTERNAL . 'payone/lang/' . $_SESSION['language'] . '.php';
$payone = new PayoneModified();
if ($order->info['payment_method'] == 'payone_elv' && empty($_SESSION['payone_elv']['sepa_mandate_id']) == false) {
    if (isset($_SESSION['payone_elv']['sepa_download_pdf']) && $_SESSION['payone_elv']['sepa_download_pdf'] == 'true') {
        $mandate_file = $payone->retrieveSepaMandate($_SESSION['payone_elv']['sepa_mandate_id']);
        if ($mandate_file !== false) {
            if ($email_attachments != '') {
                $email_attachments .= ',';
            }
            $email_attachments .= DIR_FS_DOWNLOAD_PUBLIC . $mandate_file;
        }
    }
}
$clearing_data = $payone->getClearingData($order->info['order_id']);
if ($clearing_data['bankaccountholder'] != '') {
    $payment_info_array = array(CLEARING_INTRO, '', CLEARING_ACCOUNTHOLDER . $clearing_data['bankaccountholder'], CLEARING_BANK . $clearing_data['bankname'] . ' - ' . $clearing_data['bankcity'], CLEARING_ACCOUNT . $clearing_data['bankaccount'], CLEARING_BANKCODE . $clearing_data['bankcode'], CLEARING_IBAN . $clearing_data['bankiban'], CLEARING_BIC . $clearing_data['bankbic'], CLEARING_TEXT . $clearing_data['orders_id'], '', CLEARING_OUTRO);
    $smarty->assign('PAYMENT_INFO_HTML', implode('<br/>', $payment_info_array));
   http://www.modified-shop.org

   Copyright (c) 2009 - 2013 [www.modified-shop.org]
   -----------------------------------------------------------------------------------------
 	 based on:
	  (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
	  (c) 2002-2003 osCommerce - www.oscommerce.com
	  (c) 2001-2003 TheMedia, Dipl.-Ing Thomas Plänkers - http://www.themedia.at & http://www.oscommerce.at
	  (c) 2003 XT-Commerce - community made shopping http://www.xt-commerce.com
    (c) 2013 Gambio GmbH - http://www.gambio.de
  
   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
include '../../includes/application_top_callback.php';
require_once DIR_FS_EXTERNAL . 'payone/classes/PayoneModified.php';
$payone = new PayoneModified();
$logfile = 'payone_tx_status.log';
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
    $payone->log("not a POST request!", $logfile);
    echo "NACK\n";
    exit;
}
$payone->log("received status from " . $_SERVER['REMOTE_ADDR'], $logfile);
$payone->log(print_r($_POST, true), $logfile);
// include language
include DIR_WS_CLASSES . 'language.php';
$lng = new language(xtc_input_validation(DEFAULT_LANGUAGE, 'char', ''));
require_once DIR_FS_EXTERNAL . 'payone/lang/' . $lng->language['directory'] . '.php';
// make callback
$payone->saveTransactionStatus($_POST);
echo "TSOK\n";
   --------------------------------------------------------------


   based on:
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(ot_cod_fee.php,v 1.02 2003/02/24); www.oscommerce.com
   (C) 2001 - 2003 TheMedia, Dipl.-Ing Thomas Plänkers ; http://www.themedia.at & http://www.oscommerce.at
   (c) 2003 XT-Commerce - community made shopping http://www.xt-commerce.com ($Id: ot_cod_fee.php 1003 2005-07-10 18:58:52Z mz $)

   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
require_once 'includes/application_top.php';
// include language
require_once DIR_FS_EXTERNAL . 'payone/lang/' . $_SESSION['language'] . '.php';
require_once DIR_FS_EXTERNAL . 'payone/classes/PayoneModified.php';
$payone = new PayoneModified();
if ($payone->checkConfig() === false) {
    xtc_redirect(xtc_href_link('payone_config.php'));
}
// check start and end Date
$startDate = "";
$startDateG = 0;
if (isset($_GET['startD']) && xtc_not_null($_GET['startD'])) {
    $sDay = $_GET['startD'];
    $startDateG = 1;
} else {
    $sDay = 1;
}
if (isset($_GET['startM']) && xtc_not_null($_GET['startM'])) {
    $sMon = $_GET['startM'];
    $startDateG = 1;
   --------------------------------------------------------------


   based on:
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(ot_cod_fee.php,v 1.02 2003/02/24); www.oscommerce.com
   (C) 2001 - 2003 TheMedia, Dipl.-Ing Thomas Plänkers ; http://www.themedia.at & http://www.oscommerce.at
   (c) 2003 XT-Commerce - community made shopping http://www.xt-commerce.com ($Id: ot_cod_fee.php 1003 2005-07-10 18:58:52Z mz $)

   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
require_once 'includes/application_top.php';
// include language
require_once DIR_FS_EXTERNAL . 'payone/lang/' . $_SESSION['language'] . '.php';
require_once DIR_FS_EXTERNAL . 'payone/classes/PayoneModified.php';
$payone = new PayoneModified();
$messages_ns = 'messages_' . basename(__FILE__);
if (!isset($_SESSION[$messages_ns])) {
    $_SESSION[$messages_ns] = array();
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (isset($_POST['cmd'])) {
        if ($_POST['cmd'] == 'save_config') {
            $new_config = $_POST['config'];
            $old_config = $payone->getConfig();
            $config = $payone->mergeConfigs($old_config, $new_config);
            if (empty($new_config['credit_risk']['checkforgenre'])) {
                $config['credit_risk']['checkforgenre'] = array();
            } else {
                $config['credit_risk']['checkforgenre'] = $new_config['credit_risk']['checkforgenre'];
            }