return user vars - they are passed through to sofortüberwiesung and back.

@param TdbShopOrder $oOrder

@return array
488685
protected function GetTransferUserVariables(TdbShopOrder $oOrder)
    {
        $aUserVar = array();
        $sReturnURLBase = $this->getActivePageService()->getActivePage()->GetRealURLPlain(array(), true);
        if ('.html' === substr($sReturnURLBase, -5)) {
            $sReturnURLBase = substr($sReturnURLBase, 0, -5);
        }
        if ('/' !== substr($sReturnURLBase, -1)) {
            $sReturnURLBase .= '/';
        }
        $sReturnURLBase.self::URL_IDENTIFIER;

        $sSpot = '';
        $oGlobal = TGlobal::instance();
        if ($oGlobal) {
            $oModule = $oGlobal->GetExecutingModulePointer();
            if ($oModule) {
                $sSpot = $oModule->sModuleSpotName;
            }
        }

        $aUserVar['user_variable_0'] = $this->GetResponseURL('success');
        $aUserVar['user_variable_1'] = $this->GetResponseURL('failure');
        $aUserVar['user_variable_2'] = $this->GetResponseURL('notify').'/idnt_'.$this->sqlData['cmsident'];
        $aUserVar['user_variable_3'] = $oOrder->id;
        $aUserVar['user_variable_4'] = $sSpot;
        $aUserVar['user_variable_5'] = $this->sqlData['cmsident'];

        return $aUserVar;
    }
527702
protected function _getOrder()
    {
        $sOrderId = $this->_getContainer()->getConfig()->getRequestParameter('oxid');

        if ($sOrderId !== null) {
            /** @var oxOrder $oOrder */
            $oOrder = $this->_getContainer()->getObjectFactory()->createOxidObject('oxOrder');

            if ($oOrder->load($sOrderId) === true) {
                return $oOrder;
            }
        }

        return null;
    }
932185
public static function recursiveGetObjectVars($obj) {
		$arr = array();
		$_arr = is_object($obj) ? get_object_vars($obj) : $obj;

		foreach ($_arr as $key => $val) {
			$val = (is_array($val) || is_object($val)) ? self::recursiveGetObjectVars($val) : $val;

			// Transform boolean into 1 or 0 to make it safe across all Opauth HTTP transports
			if (is_bool($val)) $val = ($val) ? 1 : 0;

			$arr[$key] = $val;
		}

		return $arr;
	}
513029
public function processOrderReference(oxOrder $oOrder, stdClass $oOrderReference)
    {
        $sOrderReferenceStatus = $oOrderReference
            ->OrderReferenceStatus
            ->State;

        //Do re-authorization if order was suspended and now it's opened
        if ($sOrderReferenceStatus === 'Open'
            && (string)$oOrder->getFieldData('oxtransstatus') === 'AMZ-Order-Suspended'
        ) {
            $this->authorize($oOrder);
        } else {
            $oOrder->assign(array('oxtransstatus' => 'AMZ-Order-'.$sOrderReferenceStatus));
            $oOrder->save();
        }
    }
677228
protected function GetDescriptionVariables()
    {
        $aParameter = parent::GetDescriptionVariables();

        // add some data about the order so that we can display the details on the closing page
        $oUserOrder = &TShopBasket::GetLastCreatedOrder();
        if (!is_null($oUserOrder)) {
            foreach ($oUserOrder as $sProperty => $sPropertyValue) {
                if ('field' == substr($sProperty, 0, 5)) {
                    $aParameter[$sProperty] = $sPropertyValue;
                }
            }
            $aParameter['sOrderNumber'] = $oUserOrder->fieldOrdernumber;
        }

        $oShop = TdbShop::GetInstance();
        // add link to display a printable version of the order
        $aParameter['sLinkPrintableVersion'] = $oShop->GetLinkToSystemPage('print-order', array('id' => $oUserOrder->id));
        $aParameter[strtolower('sLinkPrintableVersion')] = $aParameter['sLinkPrintableVersion']; // links should be all lowercase - some customers force this (and some wysiwyg may require this as well) so we provide both variations
        $aParameter['oLastOrder'] = $oUserOrder;

        return $aParameter;
    }
903438
public static function get_debug_vars($obj)
    {
        $config_vars = $obj->config_vars;
        $tpl_vars = array();
        foreach ($obj->tpl_vars as $key => $var) {
            $tpl_vars[$key] = clone $var;
            if ($obj instanceof Smarty_Internal_Template) {
                $tpl_vars[$key]->scope = $obj->source->type . ':' . $obj->source->name;
            } elseif ($obj instanceof Smarty_Data) {
                $tpl_vars[$key]->scope = 'Data object';
            } else {
                $tpl_vars[$key]->scope = 'Smarty root';
            }
        }

        if (isset($obj->parent)) {
            $parent = self::get_debug_vars($obj->parent);
            $tpl_vars = array_merge($parent->tpl_vars, $tpl_vars);
            $config_vars = array_merge($parent->config_vars, $config_vars);
        } else {
            foreach (Smarty::$global_tpl_vars as $name => $var) {
                if (!array_key_exists($name, $tpl_vars)) {
                    $clone = clone $var;
                    $clone->scope = 'Global';
                    $tpl_vars[$name] = $clone;
                }
            }
        }

        return (object)array('tpl_vars' => $tpl_vars, 'config_vars' => $config_vars);
    }
472927
public function SaveVATList(TdbShopVatList $oVatList)
    {
        // TODO
        if (!is_null($this->id)) {
            while ($oVat = $oVatList->Next()) {
                $oOrderVat = TdbShopOrderVat::GetNewInstance();
                /** @var $oOrderVat TdbShopOrderVat */
                $aVatData = array('shop_order_id' => $this->id, 'name' => $oVat->GetName(), 'vat_percent' => $oVat->fieldVatPercent, 'value' => $oVat->GetVatValue());
                $oOrderVat->LoadFromRow($aVatData);
                $oOrderVat->AllowEditByAll(true);
                $oOrderVat->Save();
            }
        }
    }
277386
public function ExecutePayment(TdbShopOrder &$oOrder, $sMessageConsumer = '')
    {
        $bPaymentOk = parent::ExecutePayment($oOrder, $sMessageConsumer);

        $aParams = array();
        // payment preauthorization values
        if (isset($_SESSION['3ds_payment'])) {
            $aParams = $_SESSION['3ds_payment'];
            unset($_SESSION['3ds_payment']);
        }

        // execute preauthorization
        $aResponse = $this->PayOnePreauthorization($aParams, $oOrder);
        if ($aResponse['success']) {
            $bPaymentOk = true;
            // reset payOne session
            if (isset($_SESSION['PayOneResponse'])) {
                unset($_SESSION['PayOneResponse']);
            }
        } else {
            $bPaymentOk = false;
        }

        if (!$bPaymentOk) {
            $oMsgManager = TCMSMessageManager::GetInstance();
            $oMsgManager->AddMessage($sMessageConsumer, 'ERROR-ORDER-REQUEST-PAYMENT-ERROR', array('errorMsg' => $aResponse['errormessage']));
        }

        return $bPaymentOk;
    }
1204316
public function RenderHTMLCode(&$oOrder)
    {
        $aParameter = $oOrder->GetSQLWithTablePrefix($oOrder->table);

        $aParameter['dNetProductValue'] = $oOrder->GetNetProductValue();
        $aParameter['dNetProductAfterDiscountsAndVouchersValue'] = $aParameter['dNetProductValue'];

        $aParameter['sAffiliateCode'] = $this->sCode;
        $oParamList = $this->GetFieldPkgShopAffiliateParameterList();
        while ($oParam = $oParamList->Next()) {
            $aParameter[$oParam->fieldName] = $oParam->fieldValue;
        }
        $this->GetAdditionalViewVariables($oOrder, $aParameter);

        $stringReplacer = new TPkgCmsStringUtilities_VariableInjection();

        return $stringReplacer->replace($this->fieldOrderSuccessCode, $aParameter);
    }
866602
protected function getDetailLink(TdbShopOrder $oOrder)
    {
        $aParameters = array(
            $this->getActiveOrderParameter() => $oOrder->fieldOrdernumber,
        );

        return '?'.TTools::GetArrayAsURL($aParameters);
    }
1039042
static function vars(Store $s, $oq) {return array_combine(self::s()->keys(), [
		df_oq_customer_name($oq)
		,df_oq_iid($oq)
		,df_oqi_s($oq)
		,df_domain_current($s)
		,$s->getFrontendName()
		,df_store_url_link($s)
	]);}
289673
public function getInstancesOf(string $type, bool $reverseOrder = false): array
    {
        $plugins = array_filter(
            $this->getInstances(),
            function ($plugin) use ($type) {
                return is_a($plugin, $type);
            }
        );

        if ($reverseOrder) {
            $plugins = array_reverse($plugins, true);
        }

        return array_diff_key($plugins, array_flip($this->disabled));
    }
1151879
protected function getVatList(TdbShopOrder $oOrder, IMapperCacheTriggerRestricted $oCacheTriggerManager, $bCachingEnabled)
    {
        $aVat = array();

        $oVatList = &$oOrder->GetFieldShopOrderVatList();
        $oVatList->GoToStart();
        if (0 < $oVatList->Length()) {
            while ($oVat = &$oVatList->Next()) {
                $dVatValue = $oVat->fieldValue;
                if (0 == $dVatValue) {
                    continue;
                }
                if ($bCachingEnabled) {
                    $oCacheTriggerManager->addTrigger($oVat->table, $oVat->id);
                }
                $aVatTmp = array('sName' => $oVat->fieldName, 'iPercent' => $oVat->fieldVatPercent, 'sPercent' => $oVat->fieldVatPercentFormated, 'dValue' => $dVatValue, 'sValue' => TCMSLocal::GetActive()->FormatNumber($dVatValue, 2));
                $aVat[] = $aVatTmp;
            }
            $oVatList->GoToStart();
        }

        return $aVat;
    }
667981
protected function SaveOrderIdAsLastCreatedOrderInSession($oOrder)
    {
        $_SESSION[self::SESSION_KEY_LAST_CREATED_ORDER_ID] = $oOrder->id;
        $myOrderHistory = $this->myOrderDetailHandlerFactory();
        $myOrderHistory->addOrderIdToMyList($oOrder->id, ('' !== $oOrder->fieldDataExtranetUserId) ? $oOrder->fieldDataExtranetUserId : null);
    }
1103555
private function getBBVariable()
    {
        return [
            'bb' => [
                'debug'      => $this->getApplication()->isDebugMode(),
                'token'      => $this->getApplication()->getBBUserToken(),
                'request'    => $this->getApplication()->getRequest(),
                'routing'    => $this->getApplication()->getRouting(),
                'translator' => $this->getApplication()->getContainer()->get('translator'),
            ],
        ];
    }
909196
public static function &GetLastCreatedOrder($bResetValue = false)
    {
        $oOrder = null;
        if (array_key_exists(self::SESSION_KEY_LAST_CREATED_ORDER_ID, $_SESSION)) {
            $oOrder = TdbShopOrder::GetNewInstance();
            /** @var $oOrder TdbShopOrder */
            if ($oOrder->Load($_SESSION[self::SESSION_KEY_LAST_CREATED_ORDER_ID])) {
                // now we want to make sure that the current user is the owner of that order. this is
                // the case if: the user is logged in and the user id in the order matches, or the user is
                // not logged in and the order has no user id
                $oUser = TdbDataExtranetUser::GetInstance();
                $isOwner = ($oUser->IsLoggedIn() && $oOrder->fieldDataExtranetUserId == $oUser->id);
                $isOwner = ($isOwner || (!$oUser->IsLoggedIn() && $oOrder->fieldDataExtranetUserId < 1));
                if (!$isOwner) {
                    $oOrder = null;
                }
            } else {
                $oOrder = null;
            }
            if ($bResetValue) {
                unset($_SESSION[self::SESSION_KEY_LAST_CREATED_ORDER_ID]);
            }
        }

        return $oOrder;
    }
426827
protected function getFormParameters(OrderInterface $order)
    {
        return [
            'PSPID' => $this->getOption('pspid'),
            'orderId' => $order->getReference(),
            'amount' => $order->getTotalInc() * 100,
            'currency' => $order->getCurrency()->getLabel(),
            'language' => $order->getLocale(),
            'CN' => $order->getBillingName(),
            'EMAIL' => $order->getBillingEmail(),
            'ownerZIP' => $order->getBillingPostcode(),
            'owneraddress' => $this->getAddress($order),
            'ownercty' => $order->getBillingCity(),
            'ownertelno' => $order->getBillingPhone() ?: $order->getBillingMobile(),

            'homeurl' => $this->getOption('home_url'),
            'catalogurl' => $this->getOption('catalog_url'),

            'COMPLUS' => '',
            'PARAMPLUS' => 'bank='.$this->getCode(),
            'PARAMVAR' => '',

            'PM' => 'CreditCard',
            'WIN3DS' => 'MAINW',
            'PMLIST' => 'VISA;MasterCard;CB',
            'PMListType' => 2,

            'accepturl' => $this->generateAbsoluteUrlFromOption('url_callback', $order),
            'declineurl' => $this->generateAbsoluteUrlFromOption('url_callback', $order),
            'exceptionurl' => $this->generateAbsoluteUrlFromOption('url_return_ko', $order),
            'cancelurl' => $this->generateAbsoluteUrlFromOption('url_return_ko', $order),

            'operation' => $this->getOperation(),
        ];
    }