<?php
/*************************************************************************
$Id: iclear.php 499 2010-10-06 20:33:34Z dis $
iclear payment system - because secure is simply secure
http://www.iclear.de
Copyright (c) 2001 - 2010 iclear - Christian Arnold
Released under the GNU General Public License
************************************************************************
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('IclearWrapperOxid', false)) {
require $icCore->getPath( 'wrapper' ) . 'oxid.base.php';
}
define('IC_WRAPPER_ID', 'oxid-4.x' );
class IclearWrapper extends IclearWrapperOxid {
// class constructor
function __construct(&$icCore) {
$this->icVersion = '$Id$';
global $icCore;
parent::__construct($icCore);
}
function storeOrder( ) {
$rc = false;
$bIsPaid = false;
$aSession = array();
if( $basket = $this->icCore->getBasket( ) ) {
$icLang = $this->icCore->getLanguage( );
if( $basket->status( ) == IC_ORDER_OPEN )
$bIsPaid = true;
else if ( $basket->status( ) == IC_ORDER_WAIT )
$bIsPaid = false;
else {
$basket->addError ( "storeOrder: Order not in open or wait state." );
return $rc;
}
$order = $basket->getOrder( );
$oSes = oxSession::getInstance( );
if ( $oSes->getId() != $basket->sessionID( ) ) {
$oSes->destroy();
$aSession = $basket->session( );
$_SERVER['HTTP_USER_AGENT'] = $aSession['user_agent'];
$_COOKIE['sid_key'] = $aSession['sid_key'];
$_COOKIE['sid'] = $basket->sessionID( );
$oSes->start( );
}
$oUser = $oSes->getUser( );
$oBasket = $oSes->getBasket( );
$oBasket->setPayment( IC_OXID_MODULE_NAME );
if ( $oUser ) {
try {
$oOrder = oxNew( 'oxorder' );
$iSuccess = $oOrder->finalizeIclearOrder( $oBasket, $oUser, false, $bIsPaid );
$oUser->onOrderExecute( $oBasket, $iSuccess );
$basket->orderID ( $oOrder->getId( ) );
$rc = true;
} catch ( oxOutOfStockException $oEx ) {
oxUtilsView::getInstance()->addErrorToDisplay( $oEx, false, true, 'basket' );
$basket->addError ( "storeOrder: Cannot store Order:" . $oEx->getString() );
} catch ( oxNoArticleException $oEx ) {
oxUtilsView::getInstance()->addErrorToDisplay( $oEx );
$basket->addError ( "storeOrder: Cannot store Order:" . $oEx->getString() );
} catch ( oxArticleInputException $oEx ) {
oxUtilsView::getInstance()->addErrorToDisplay( $oEx );
$basket->addError ( "storeOrder: Cannot store Order:" . $oEx->getString() );
}
} else {
$basket->addError ( "storeOrder: Cannot load user session." );
}
$oSes->freeze( );
}
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----- | |