<?php
/*
$Id$
Copyright (C) 2007 - 2010 iclear GmbH
All rights reserved.
This program is free software licensed under the GNU General Public License (GPL).
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
*************************************************************************/
if(!class_exists('IclearWrapperMage', false)) {
require dirname(__FILE__) . '/magento.base.php';
}
define('IC_WRAPPER_ID', 'magento-1.x' );
class IclearWrapper extends IclearWrapperMage {
// class constructor
function __construct(&$icCore) {
$this->icVersion = '$Id$';
global $icCore;
parent::__construct($icCore);
}
function storeOrder() {
$rc = false;
if($basket = $this->icCore->getBasket()) {
global $SESS_LIFE;
// $SESS_LIFE used in session modules / functions 2 determine session lifetime (time() + $SESS_LIFE)
$SESS_LIFE = 1440;
$icLang = $this->icCore->getLanguage();
$session = Mage::getSingleton('checkout/session');
$_SESSION = $basket->session();
Mage::getSingleton('core/session', array('name' => 'frontend'))->init('frontend');
$session->setSessionId($basket->sessionID());
$session->init('checkout');
$customer_id = $basket->customerID();
$order = $basket->getOrder();
switch($basket->language()) {
case 'EN':
$language = 'english';
break;
case 'DE':
default:
$language = 'german';
break;
}
$onepage = Mage::getSingleton('checkout/type_onepage');
$onepage->saveOrder();
// set correct order state if it's an waiting order
$orderID = $onepage->getCheckout()->getLastOrderId();
$basket->orderID($orderID);
$order = Mage::getSingleton('sales/order')->load($orderID);
$payment = Mage::getSingleton('Iclear_Sendorderb2c_Model_Iclearpayment');
if($basket->status() == IC_ORDER_WAIT) {
$order->setState($payment->getPendingState());
$order->addStatusToHistory(
$payment->getPendingState(),
'iclear payment in pending state!');
}
}
return $rc;
}
}
?>
| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| index.html | 2013-11-12 21:04 | 0 B | 76129f60960:kunden | -xw-x----- | |
| jtl-3.x.config.php | 2013-11-12 21:04 | 1.75 KB | 76129f60960:kunden | -xw-x----- | |
| jtl-3.x.php | 2013-11-12 21:03 | 2.45 KB | 76129f60960:kunden | -xw-x----- | |
| jtl.base.php | 2013-11-12 21:03 | 17.62 KB | 76129f60960:kunden | -xw-x----- | |
| magento-1.3.x.config.php | 2013-11-12 21:03 | 2.15 KB | 76129f60960:kunden | -xw-x----- | |
| magento-1.3.x.php | 2013-11-12 21:04 | 2.98 KB | 76129f60960:kunden | -xw-x----- | |
| magento-1.4.x.config.php | 2013-11-12 21:03 | 2.17 KB | 76129f60960:kunden | -xw-x----- | |
| magento-1.4.x.php | 2013-11-12 21:04 | 2.99 KB | 76129f60960:kunden | -xw-x----- | |
| magento.base.php | 2013-11-12 21:03 | 15.31 KB | 76129f60960:kunden | -xw-x----- | |
| osc22ms1.config.php | 2013-11-12 21:04 | 8.71 KB | 76129f60960:kunden | -xw-x----- | |
| osc22ms1.php | 2013-11-12 21:04 | 42.89 KB | 76129f60960:kunden | -xw-x----- | |
| osc22ms2.config.php | 2013-11-12 21:03 | 3.55 KB | 76129f60960:kunden | -xw-x----- | |
| oxid-4.x.azure.config.php | 2013-11-12 21:04 | 41 B | 76129f60960:kunden | -xw-x----- | |
| oxid-4.x.config.php | 2013-11-12 21:04 | 1.97 KB | 76129f60960:kunden | -xw-x----- | |
| oxid-4.x.php | 2013-11-12 21:03 | 3.49 KB | 76129f60960:kunden | -xw-x----- | |
| oxid.base.php | 2013-11-12 21:04 | 22.73 KB | 76129f60960:kunden | -xw-x----- | |
| shopware-3.5.x.config.php | 2013-11-12 21:04 | 2.58 KB | 76129f60960:kunden | -xw-x----- | |
| shopware-3.5.x.php | 2013-11-12 21:03 | 2.47 KB | 76129f60960:kunden | -xw-x----- | |
| shopware.base.php | 2013-11-12 21:04 | 21.3 KB | 76129f60960:kunden | -xw-x----- | |
| veyton4.base.php | 2013-11-12 21:04 | 12.01 KB | 76129f60960:kunden | -xw-x----- | |
| veyton4.config.php | 2013-11-12 21:04 | 2.76 KB | 76129f60960:kunden | -xw-x----- | |
| veyton4.php | 2013-11-12 21:03 | 3.1 KB | 76129f60960:kunden | -xw-x----- | |
| xtc304.base.php | 2013-11-12 21:03 | 37.51 KB | 76129f60960:kunden | -xw-x----- | |
| xtc304sp1.config.php | 2013-11-12 21:04 | 5.2 KB | 76129f60960:kunden | -xw-x----- | |
| xtc304sp1.php | 2013-11-12 21:03 | 28.2 KB | 76129f60960:kunden | -xw-x----- | |
| xtc304sp2.config.php | 2013-11-12 21:04 | 5.97 KB | 76129f60960:kunden | -xw-x----- | |
| xtc304sp2.ecb108.config.php | 2013-11-12 21:04 | 5.91 KB | 76129f60960:kunden | -xw-x----- | |
| xtc304sp2.gambio1014.config.php | 2013-11-12 21:04 | 8.1 KB | 76129f60960:kunden | -xw-x----- | |
| xtc304sp2.gambiogx2.config.php | 2013-11-12 21:04 | 2.59 KB | 76129f60960:kunden | -xw-x----- | |
| xtc304sp2.php | 2013-11-12 21:04 | 30.78 KB | 76129f60960:kunden | -xw-x----- | |
| xtc304sp2.xtcm102.config.php | 2013-11-12 21:04 | 5.94 KB | 76129f60960:kunden | -xw-x----- | |