126         if (
$myConfig->getConfigParam( 
'blPsBasketReservationEnabled' )) {
 
  127             $this->
getSession()->getBasketReservations()->renewExpiration();
 
  143             if ( 
$myConfig->getConfigParam( 
'blPsBasketReservationEnabled' ) && (!$oBasket || ( $oBasket && !$oBasket->getProductsCount() )) ) {
 
  148             if (!$oUser && ($oBasket && $oBasket->getProductsCount() > 0)) {
 
  150             } elseif ( !$oBasket || !$oUser || ( $oBasket && !$oBasket->getProductsCount() ) ) {
 
  157             $sPayErrorText = 
oxConfig::getParameter(
'payerrortext')?
'payerrortext='.oxConfig::getParameter( 
'payerrortext' ):
'';
 
  158             $sRedirectURL = 
$myConfig->getShopSecureHomeURL().
'sslredirect=forced&cl=payment&'.$sPayError.
"&".$sPayErrorText;
 
  183         if ( $this->
getConfig()->getConfigParam( 
'blOtherCountryOrder' ) ) {
 
  184             $oPayment = 
oxNew( 
'oxpayment' );
 
  185             if ( $oPayment->load( 
'oxempty' ) ) {
 
  186                 $this->_oEmptyPayment = $oPayment;
 
  189                 $this->_sPaymentError = -2;
 
  192             $this->_sPaymentError = -2;
 
  206         if (!($iPayError || $sPayErrorText)) {
 
  213             $this->_sPaymentError = $iPayError;
 
  215         if ( $sPayErrorText ) {
 
  217             $this->_sPaymentErrorText = $sPayErrorText;
 
  231         $oBasket = $oSession->getBasket();
 
  232         $oBasket->setShipping( null );
 
  233         $oBasket->onUpdate();
 
  234         $oSession->setVariable( 
'sShipSet', $this->
getConfig()->getRequestParameter( 
'sShipSet' ) );
 
  257             $oSession->setVariable( 
'payerror', 2 );
 
  262             $sShipSetId = $oSession->getVariable(
'sShipSet');
 
  265             $sPaymentId = $oSession->getVariable(
'paymentid');
 
  268             $aDynvalue = $oSession->getVariable(
'dynvalue');
 
  272         if ( !
$myConfig->getConfigParam( 
'blOtherCountryOrder' ) && $sPaymentId == 
'oxempty' ) {
 
  277         if ( !$sPaymentId ) {
 
  278             $oSession->setVariable( 
'payerror', 1 );
 
  283             $oSession->setVariable( 
'payerror', 7 );
 
  287         $oBasket = $oSession->getBasket();
 
  288         $oBasket->setPayment(null);
 
  289         $oPayment = 
oxNew( 
'oxpayment' );
 
  290         $oPayment->load( $sPaymentId );
 
  293         $dBasketPrice = $oBasket->getPriceForPayment();
 
  295         $blOK = $oPayment->isValidPayment( $aDynvalue, 
$myConfig->getShopId(), $oUser, $dBasketPrice, $sShipSetId );
 
  298             $oSession->setVariable( 
'paymentid', $sPaymentId );
 
  299             $oSession->setVariable( 
'dynvalue', $aDynvalue );
 
  302                 $oBasket->setTsProductId($sTsProductId);
 
  303                 $oSession->setVariable( 
'stsprotection', $sTsProductId );
 
  305                 $oSession->deleteVariable( 
'stsprotection' );
 
  306                 $oBasket->setTsProductId(null);
 
  308             $oBasket->setShipping($sShipSetId);
 
  309             $oSession->deleteVariable( 
'_selected_paymentid' );
 
  312             $oSession->setVariable( 
'payerror', $oPayment->getPaymentErrorNumber() );
 
  315             $oSession->deleteVariable( 
'paymentid' );
 
  316             $oSession->setVariable( 
'_selected_paymentid', $sPaymentId );
 
  317             $oSession->deleteVariable( 
'stsprotection' );
 
  318             $oBasket->setTsProductId(null);
 
  330         if ( $this->_oPaymentList === null ) {
 
  331             $this->_oPaymentList = 
false;
 
  334             if ( !$sActShipSet ) {
 
  341             list( $aAllSets, $sActShipSet, $aPaymentList ) = 
oxRegistry::get(
"oxDeliverySetList")->getDeliverySetData( $sActShipSet, $this->
getUser(), $oBasket );
 
  343             $oBasket->setShipping( $sActShipSet );
 
  347             $this->_oPaymentList = $aPaymentList;
 
  348             $this->_aAllSets     = $aAllSets;
 
  361         if ( $this->_aAllSets === null ) {
 
  362             $this->_aAllSets = 
false;
 
  378         if ( $this->_iAllSetsCnt === null ) {
 
  379             $this->_iAllSetsCnt = 0;
 
  382                 $this->_iAllSetsCnt = count($this->_aAllSets);
 
  396     protected function _setValues( & $aPaymentList, $oBasket = null )
 
  398         if ( is_array($aPaymentList) ) {
 
  399             foreach ( $aPaymentList as $oPayment ) {
 
  400                 $oPayment->calculate( $oBasket );
 
  401                 $oPayment->aDynValues     = $oPayment->getDynValues();
 
  402                 if ( $oPayment->oxpayments__oxchecked->value ) {
 
  403                     $this->_sCheckedId = $oPayment->getId();
 
  456         return !$this->
getConfig()->getConfigParam( 
'blSkipDebitOldBankInfo' );
 
  466         if ( $this->_aDynValue === null ) {
 
  467             $this->_aDynValue = 
false;
 
  471                 $this->_aDynValue  = $aDynValue;
 
  479             if ( isset( $aPaymentList[
'oxiddebitnote'] ) ) {
 
  495         $oUserPayment = 
oxNew( 
'oxuserpayment');
 
  497         if ( $oUserPayment->getPaymentByPaymentType( $this->getUser(), 
'oxiddebitnote' ) ) {
 
  498             $aAddPaymentData = 
oxRegistry::getUtils()->assignValuesFromText( $oUserPayment->oxuserpayments__oxvalue->value );
 
  501             foreach ( $aAddPaymentData as $oData ) {
 
  502                 if ( !isset( $this->_aDynValue[$oData->name] ) ||
 
  503                    (  isset( $this->_aDynValue[$oData->name] ) && !$this->_aDynValue[$oData->name] ) ) {
 
  504                     $this->_aDynValue[$oData->name] = $oData->value;
 
  518         if ( $this->_sCheckedPaymentId === null ) {
 
  523                 $sCheckedId = $sPaymentID;
 
  524             } elseif ( ( $sSelectedPaymentID = 
oxSession::getVar( 
'_selected_paymentid' ) ) ) {
 
  525                 $sCheckedId = $sSelectedPaymentID;
 
  528                 if ( $oUser = $this->
getUser()) {
 
  529                     $oOrder = 
oxNew(
'oxorder');
 
  530                     if ( ( $sLastPaymentId = $oOrder->getLastUserPaymentType( $oUser->getId()) ) ) {
 
  531                         $sCheckedId = $sLastPaymentId;
 
  537             if ( !$sCheckedId && $this->_sCheckedId ) {
 
  543             if ( isset( $oPaymentList ) && $oPaymentList && !isset( $oPaymentList[$sCheckedId] ) ) {
 
  545                 $sCheckedId = key( $oPaymentList );
 
  547             $this->_sCheckedPaymentId = $sCheckedId;
 
  560         if ( $this->_iPaymentCnt === null ) {
 
  561             $this->_iPaymentCnt = 
false;
 
  564                 $this->_iPaymentCnt = count($oPaymentList);
 
  577         if ( $this->_aCreditYears === null ) {
 
  578             $this->_aCreditYears = 
false;
 
  580             $this->_aCreditYears = range( date(
'Y'), date(
'Y') + 10 );
 
  595         if ( !is_array( $aKeys ) || count( $aKeys ) < 1 ) {
 
  599         foreach ( $aKeys as $sKey ) {
 
  600             if ( isset( $aData[$sKey] ) && !empty( $aData[$sKey] ) ) {
 
  624             $this->_blDynDataFiltered = 
false;
 
  628         $aDynData = $this->
getSession()->getVar(
"dynvalue");
 
  630         $aFields = array(
"kktype", 
"kknumber", 
"kkname", 
"kkmonth", 
"kkyear", 
"kkpruef");
 
  634                 $this->_blDynDataFiltered = 
true;
 
  636             $aDynData[
"kktype"] = null;
 
  637             $aDynData[
"kknumber"] = null;
 
  638             $aDynData[
"kkname"] = null;
 
  639             $aDynData[
"kkmonth"] = null;
 
  640             $aDynData[
"kkyear"] = null;
 
  641             $aDynData[
"kkpruef"] = null;
 
  648             $this->_blDynDataFiltered = 
true;
 
  651         unset($_REQUEST[
"dynvalue"][
"kktype"]);
 
  652         unset($_REQUEST[
"dynvalue"][
"kknumber"]);
 
  653         unset($_REQUEST[
"dynvalue"][
"kkname"]);
 
  654         unset($_REQUEST[
"dynvalue"][
"kkmonth"]);
 
  655         unset($_REQUEST[
"dynvalue"][
"kkyear"]);
 
  656         unset($_REQUEST[
"dynvalue"][
"kkpruef"]);
 
  658         unset($_POST[
"dynvalue"][
"kktype"]);
 
  659         unset($_POST[
"dynvalue"][
"kknumber"]);
 
  660         unset($_POST[
"dynvalue"][
"kkname"]);
 
  661         unset($_POST[
"dynvalue"][
"kkmonth"]);
 
  662         unset($_POST[
"dynvalue"][
"kkyear"]);
 
  663         unset($_POST[
"dynvalue"][
"kkpruef"]);
 
  665         unset($_GET[
"dynvalue"][
"kktype"]);
 
  666         unset($_GET[
"dynvalue"][
"kknumber"]);
 
  667         unset($_GET[
"dynvalue"][
"kkname"]);
 
  668         unset($_GET[
"dynvalue"][
"kkmonth"]);
 
  669         unset($_GET[
"dynvalue"][
"kkyear"]);
 
  670         unset($_GET[
"dynvalue"][
"kkpruef"]);
 
  681         if ( $this->_aTsProducts === null ) {
 
  683             $dVat = $oBasket->getAdditionalServicesVatPercent();
 
  684             if ( $dPrice = $oBasket->getPrice()->getBruttoPrice() ) {
 
  685                 $oTsProtection = 
oxNew(
'oxtsprotection');
 
  686                 $oTsProtection->setVat( $dVat );
 
  687                 $this->_aTsProducts = $oTsProtection->getTsProducts($dPrice);
 
  700         if ( $this->_sCheckedProductId === null ) {
 
  701             $this->_sCheckedProductId = 
false;
 
  703                 $this->_sCheckedProductId = $sId;
 
  706         return $this->_sCheckedProductId;
 
  721         $aPath[
'link']  = $this->
getLink();
 
  735         return $this->
getConfig()->getConfigParam(
'blShowVATForPayCharge');