case '3':
             $classname = 'xml_neckermann_at';
             $file_path = SP_NECKERMANNAT_DECRYPT_PATH;
             break;
         case '4':
             break;
         case '5':
             break;
         default:
             break;
     }
 } else {
     echo "Missing information for new SP {$jng_sp_name}";
     exit;
 }
 $files = $class_jd->getFilesForProcess($jng_sp_id, $process_status[$jng_sp_id]);
 $xfc = 0;
 //xml_file_counter
 $xml_parser = array();
 $orders_created_collection = array();
 foreach ($files as $file) {
     $xmlfilename = $file_path . $file['filename'];
     if (in_array($jng_sp_id, $xmlwithgpg)) {
         $xmlfilename = str_replace('.gpg', '', $xmlfilename);
     }
     $xmlfile = file_get_contents($xmlfilename);
     if (file_exists($xmlfilename)) {
         $import_status = true;
         $import_date = date('Y-m-d H:i:s');
         if ($jng_sp_id == '2') {
             ///////////////
        logThis($files_total . ' files downloaded:');
        foreach ($files as $f) {
            logThis(basename($f));
        }
    } else {
        logThis('No files downloaded');
    }
}
/////////////////////////////
// STEP 2: GENERATE ORDERS //
/////////////////////////////
logThis('STEP 2: GENERATE ORDERS');
$files_imported = 0;
$file_not_exist = array();
//$order_files[] = SP_TRADEBYTE_DOWNLOAD_ORDERS_PATH.'TBORDER_123.xml';
$order_files = $class_jd->getFilesForProcess(0, 'R');
$order_files_total = count($order_files);
logThis($order_files_total . ' file(s) found:');
$orders_created = array();
$items_created = 0;
$orders_prepayment_paid = array();
$orders_canceled = array();
if ($order_files_total > 0) {
    //Get all known SP with connection to Tradebyte
    $sp_list = $class_sp->retrieveList("tb_used = 1");
    $sp_tradebyte_id = array();
    foreach ($sp_list as $sp) {
        $sp_tradebyte_id[$sp['tb_channel']] = $sp['jng_sp_id'];
    }
    $file_counter = 0;
    $daily_counter = array();
        $cron_result[] = count($downloaded) . " files downloaded:";
        foreach ($downloaded as $d) {
            $cron_result[] = '- ' . $d;
        }
    }
}
////////////////////////////
// STEP 2: DECRYPT ORDERS //
////////////////////////////
$cron_result[] = 'STEP 2: DECRYPT ORDERS';
//initialize encryption options n paths
putenv('GNUPGHOME=' . GNUPGHOME);
$passphrase = JNGPASSPHRASE;
$download_path = SP_NECKERMANN_DOWNLOAD_PATH;
$archived_path = SP_NECKERMANN_ARCHIVE_PATH;
$files = $class_jd->getFilesForProcess($jng_sp_id, $download_status_to_decrypt);
if (count($files) > 0) {
    $decrypted = array();
    $decrypt_failed = array();
    foreach ($files as $file) {
        $raw_filename = $file['filename'];
        $xml_filename = str_replace('.gpg', '', $raw_filename);
        $decrypt_path = $file['type'] == 'PCL' ? SP_NECKERMANN_INVOICE_PATH : SP_NECKERMANN_DECRYPT_PATH;
        $archive_ext_path = $file['type'] == 'PCL' ? 'pcl' : 'xml';
        $encrypted_file = SP_NECKERMANN_DOWNLOAD_PATH . $raw_filename;
        $decrypted_file = $decrypt_path . $xml_filename;
        //$shell_string = "gpg --output $decrypted_file --passphrase $passphrase --decrypt $encrypted_file";
        $shell_string = "echo {$passphrase}|gpg --output {$decrypted_file} --batch --passphrase-fd 0 --decrypt {$encrypted_file}";
        shell_exec($shell_string);
        $status = file_exists($decrypted_file);
        if ($status) {