//load all module files so that they can be used from $_SESSION // @TODO delete this in cms 2.0 and find better way // this has to be loaded before application_top because session vars needs the files for class definition if (is_dir(DIR_FS_CATALOG . 'includes/modules/checkout/modules/Icepay')) { $object = glob(DIR_FS_CATALOG . 'includes/modules/checkout/modules/Icepay/*_module.php'); require_once $object[0]; } $temp_orders_id = $_POST['Reference']; // @TODO End Of Delete require_once 'includes/application_top.php'; $Analytics = new Analytics(); if (!is_object($Modules)) { //start modules class $Modules = new Modules(); } $Checkout = Checkout::instance(false); $temp_data = $Checkout->get_all_data_from_temp_db($temp_orders_id); //get all orders data $icepay = new Icepay_Postback(); $icepay->setMerchantID($Icepay->instances[$temp_data[$temp_orders_id]['orders']['payment_method']]['merchant_id'])->setSecretCode($Icepay->instances[$temp_data[$temp_orders_id]['orders']['payment_method']]['secret_code'])->enableLogging()->logToFile(true, realpath("../logs"))->logToScreen(); $data = ''; foreach ($_POST as $key => $value) { $data .= $key . ': ' . "\n"; $data .= $value . "\n\n"; } tep_db_query('INSERT INTO payment_log (type, data, date) VALUES ("Icepay", "' . $data . '", NOW())'); tep_db_query('DELETE FROM payment_log WHERE date < DATE_SUB(NOW(), INTERVAL 30 DAY)'); try { if ($icepay->validate()) { if ($temp_data[$temp_orders_id]['orders']['processed_order_id'] > 0) { //Update order status
tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array1); $address_id = tep_db_insert_id(); tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int) $address_id . "' where customers_id = '" . (int) $customer_id . "'"); tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int) $customer_id . "', '0', now())"); } ?> <?php } // nikhil ?> </div> </div> <div class="row"> <div class="span8"> <?php $Checkout = Checkout::instance(); ?> </div> <div class="span4 active summary"> <div class="step_title"><?php echo Translate('Overzicht'); ?> </div> <?php foreach (Checkout::$checkout_steps['summary']['modules'] as $type) { foreach ($Modules->modules[$type] as $module) { echo ${$module}->output(); } } ?> <a href="<?php
static function instance($show_step = true) { if (!self::$instance) { self::$instance = new Checkout($show_step); } return self::$instance; }