当前位置: 首页>>代码示例>>PHP>>正文


PHP CSalePaySystemAction::UnSerializeParams方法代码示例

本文整理汇总了PHP中CSalePaySystemAction::UnSerializeParams方法的典型用法代码示例。如果您正苦于以下问题:PHP CSalePaySystemAction::UnSerializeParams方法的具体用法?PHP CSalePaySystemAction::UnSerializeParams怎么用?PHP CSalePaySystemAction::UnSerializeParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CSalePaySystemAction的用法示例。


在下文中一共展示了CSalePaySystemAction::UnSerializeParams方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

            ?>
';
						var param_<?php 
            echo $val;
            ?>
_value_<?php 
            echo $arPersonType["ID"];
            ?>
 = '<?php 
            echo CUtil::JSEscape($valueTmp);
            ?>
';
						<?php 
        }
    } else {
        $arCorrespondence = CSalePaySystemAction::UnSerializeParams($arPaySystemAction["PARAMS"]);
        foreach ($arCorrespondence as $key => $value) {
            ?>
						var param_<?php 
            echo $key;
            ?>
_type_<?php 
            echo $arPersonType["ID"];
            ?>
 = '<?php 
            echo CUtil::JSEscape($value["TYPE"]);
            ?>
';
						var param_<?php 
            echo $key;
            ?>
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:pay_system_edit.php

示例2: addMissingKeysToParams

 /**
  * Adds params if they are missed
  * @return array Added params
  */
 public static function addMissingKeysToParams()
 {
     $result = array();
     $res = CSalePaySystemAction::GetList(array(), array("PS_ACTIVE" => "Y"), false, false, array("ID", "ACTION_FILE", "PARAMS"));
     while ($ps = $res->Fetch()) {
         $descriptionFile = $_SERVER["DOCUMENT_ROOT"] . $ps["ACTION_FILE"] . "/.description.php";
         if (!file_exists($descriptionFile) || !is_file($descriptionFile)) {
             continue;
         }
         $arPSCorrespondence = array();
         include $descriptionFile;
         if (!is_array($arPSCorrespondence) || empty($arPSCorrespondence)) {
             continue;
         }
         $arCorrespondence = CSalePaySystemAction::UnSerializeParams($ps["PARAMS"]);
         if (!is_array($arCorrespondence)) {
             continue;
         }
         $missingKeys = array_keys(array_diff_key($arPSCorrespondence, $arCorrespondence));
         if (!empty($missingKeys)) {
             $result[$ps["ID"]] = $missingKeys;
             foreach ($missingKeys as $key) {
                 $arCorrespondence[$key] = array_intersect_key($arPSCorrespondence[$key], array("TYPE" => true, "VALUE" => true));
             }
             $updRes = CSalePaySystemAction::update($ps["ID"], array("PARAMS" => CSalePaySystemAction::SerializeParams($arCorrespondence)));
             if ($updRes <= 0) {
                 $result[$ps["ID"]]["UPDATE_ERROR"] = true;
             }
         }
     }
     \CEventLog::Add(array("SEVERITY" => "INFO", "AUDIT_TYPE_ID" => "PS_PARAMS_CONVERT_RESULT", "MODULE_ID" => "sale", "ITEM_ID" => "PaySystems", "DESCRIPTION" => serialize($result)));
     return "";
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:37,代码来源:pay_system_helper.php

示例3: ShowError

}
$this->setFramemode(false);
if (!CModule::IncludeModule("sale")) {
    ShowError(GetMessage("SALE_MODULE_NOT_INSTALL"));
    return;
}
if (!array_key_exists('PAY_SYSTEM_ID_NEW', $arParams)) {
    $newPsId = CSalePaySystem::getNewIdsFromOld($arParams["PAY_SYSTEM_ID"], $arParams["PERSON_TYPE_ID"]);
    $newPsId = current($newPsId);
} else {
    $newPsId = $arParams["PAY_SYSTEM_ID_NEW"];
}
$dbPaySysAction = CSalePaySystemAction::GetList(array(), array('ID' => $newPsId), false, false, array("ACTION_FILE", "PARAMS", "ENCODING"));
if ($arPaySysAction = $dbPaySysAction->Fetch()) {
    if (strlen($arPaySysAction["ACTION_FILE"]) > 0) {
        $GLOBALS["SALE_CORRESPONDENCE"] = CSalePaySystemAction::UnSerializeParams($arPaySysAction["PARAMS"]);
        $pathToAction = $_SERVER["DOCUMENT_ROOT"] . $arPaySysAction["ACTION_FILE"];
        if (!isset($GLOBALS["SALE_INPUT_PARAMS"])) {
            $GLOBALS["SALE_INPUT_PARAMS"] = array();
        }
        $pathToAction = str_replace("\\", "/", $pathToAction);
        while (substr($pathToAction, strlen($pathToAction) - 1, 1) == "/") {
            $pathToAction = substr($pathToAction, 0, strlen($pathToAction) - 1);
        }
        if (file_exists($pathToAction)) {
            if (is_dir($pathToAction)) {
                if (file_exists($pathToAction . "/result_rec.php")) {
                    include $pathToAction . "/result_rec.php";
                }
            }
        }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:component.php

示例4:

						var param_<?php 
            echo $key;
            ?>
_value_<?php 
            echo $arPersonType["ID"];
            ?>
 = '<?php 
            echo CUtil::JSEscape($value["VALUE"]);
            ?>
';
						<?php 
        }
    }
    ?>
				<?php 
    $arTarif = CSalePaySystemAction::UnSerializeParams($arPaySystemAction["TARIF"]);
    ?>
				var tarif_<?php 
    echo $arPersonType["ID"];
    ?>
 = <?php 
    echo CUtil::PhpToJsObject($arTarif);
    ?>
;

				//-->
				</script>
				<div id="pay_sys_act_<?php 
    echo $arPersonType["ID"];
    ?>
" style="display: block; background-color: #E4EDF3;"></div><br>
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:pay_system_edit.php

示例5: InitStep

 function InitStep()
 {
     $this->SetTitle(GetMessage("WW_STEP4"));
     $this->SetPrevStep("step3");
     $this->SetNextStep("step5");
     $this->SetStepID("step4");
     $this->SetFinishStep("install");
     $this->SetCancelStep("cancel");
     $paySystem = array();
     $personType = array();
     $wizard =& $this->GetWizard();
     $paySystem = $wizard->GetVar("paySystem");
     $personType = $wizard->GetVar("personType");
     CModule::IncludeModule("sale");
     if (empty($paySystem)) {
         $paySystem = array();
     }
     foreach ($paySystem as $k => $v) {
         if (!empty($v)) {
             foreach ($v as $v1) {
                 $dbPaySystemAction = CSalePaySystemAction::GetList(array("NAME" => "ASC"), array("PAY_SYSTEM_ID" => $v1, "PERSON_TYPE_ID" => $k));
                 if ($arPaySystemAction = $dbPaySystemAction->Fetch()) {
                     $defVars["paySystemPopup"][$v1][$k] = $arPaySystemAction["NEW_WINDOW"];
                     $arCorrespondence = CSalePaySystemAction::UnSerializeParams($arPaySystemAction["PARAMS"]);
                     foreach ($arCorrespondence as $key => $value) {
                         $defVars[$v1 . "_" . $key . "_" . $k] = $value["TYPE"];
                         if (strlen($value["TYPE"]) > 0) {
                             $defVars["VALUE1_" . $v1 . "_" . $key . "_" . $k] = str_replace("'", "\\'", $value["VALUE"]);
                         } else {
                             $defVars["VALUE2_" . $v1 . "_" . $key . "_" . $k] = str_replace("'", "\\'", $value["VALUE"]);
                         }
                     }
                 }
             }
         }
     }
     $wizard->SetDefaultVars($defVars);
 }
开发者ID:Satariall,项目名称:izurit,代码行数:38,代码来源:wizard.php

示例6: Withdraw

 function Withdraw($sum, $currency, $arUserCard, $orderID = 0)
 {
     $sum = str_replace(",", ".", $sum);
     $sum = roundEx(DoubleVal($sum), SALE_VALUE_PRECISION);
     if ($sum <= 0) {
         $GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGUC_EMPTY_SUM"), "EMPTY_SUM");
         return false;
     }
     $currency = Trim($currency);
     if (strlen($currency) <= 0) {
         $GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGUC_EMPTY_CURRENCY"), "EMPTY_SUM_CURRENCY");
         return false;
     }
     if (!is_array($arUserCard) || count($arUserCard) <= 0) {
         $GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGUC_NO_PARAMS"), "EMPTY_CARD_ARRAY");
         return false;
     }
     $orderID = IntVal($orderID);
     if (DoubleVal($arUserCard["SUM_MAX"]) > 0) {
         $maxSum = roundEx(CCurrencyRates::ConvertCurrency($arUserCard["SUM_MAX"], $arUserCard["SUM_CURRENCY"], $currency), SALE_VALUE_PRECISION);
         if ($maxSum < $sum) {
             $GLOBALS["APPLICATION"]->ThrowException(str_replace("#SUM1#", SaleFormatCurrency($arUserCard["SUM_MAX"], $arUserCard["SUM_CURRENCY"]), str_replace("#SUM2#", SaleFormatCurrency($sum, $currency), GetMessage("SKGUC_CROSS_BOUND"))), "MAX_SUM_LIMIT");
             return false;
         }
     }
     $arPSAction = CSalePaySystemAction::GetByID($arUserCard["PAY_SYSTEM_ACTION_ID"]);
     if (!$arPSAction) {
         $GLOBALS["APPLICATION"]->ThrowException(str_replace("#ID#", $arUserCard["PAY_SYSTEM_ACTION_ID"], GetMessage("SKGUC_NO_ACTION")), "NO_PAY_SYSTEM_ACTION");
         return false;
     }
     $psActionPath = $_SERVER["DOCUMENT_ROOT"] . $arPSAction["ACTION_FILE"];
     if (!file_exists($psActionPath)) {
         $GLOBALS["APPLICATION"]->ThrowException(str_replace("#FILE#", $arPSAction["ACTION_FILE"], GetMessage("SKGUC_NO_PATH")), "NO_PS_PATH");
         return false;
     }
     if (is_file($psActionPath)) {
         $psActionPath = dirname($psActionPath);
     }
     if (!file_exists($psActionPath . "/action.php")) {
         $GLOBALS["APPLICATION"]->ThrowException(str_replace("#FILE#", $psActionPath . "/action.php", GetMessage("SKGUC_NO_SCRIPT")), "NO_PS_SCRIPT");
         return false;
     }
     $INPUT_CARD_TYPE = $arUserCard["CARD_TYPE"];
     $INPUT_CARD_NUM = CSaleUserCards::CryptData($arUserCard["CARD_NUM"], "D");
     $INPUT_CARD_EXP_MONTH = $arUserCard["CARD_EXP_MONTH"];
     $INPUT_CARD_EXP_YEAR = $arUserCard["CARD_EXP_YEAR"];
     $INPUT_CARD_CODE = $arUserCard["CARD_CODE"];
     $INPUT_SUM = $sum;
     if (DoubleVal($arUserCard["SUM_MIN"]) > 0) {
         $minSum = roundEx(CCurrencyRates::ConvertCurrency($arUserCard["SUM_MIN"], $arUserCard["SUM_CURRENCY"], $currency), SALE_VALUE_PRECISION);
         if ($minSum > $sum) {
             $INPUT_SUM = $minSum;
         }
     }
     $INPUT_CURRENCY = $currency;
     $GLOBALS["SALE_INPUT_PARAMS"] = array();
     $dbUser = CUser::GetByID(IntVal($arUserCard["USER_ID"]));
     if ($arUser = $dbUser->Fetch()) {
         $GLOBALS["SALE_INPUT_PARAMS"]["USER"] = $arUser;
     }
     if ($orderID > 0) {
         if ($arOrder = CSaleOrder::GetByID($orderID)) {
             $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"] = $arOrder;
             $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["SHOULD_PAY"] = DoubleVal($arOrder["PRICE"]) - DoubleVal($arOrder["SUM_PAID"]);
             $arDateInsert = explode(" ", $arOrder["DATE_INSERT"]);
             if (is_array($arDateInsert) && count($arDateInsert) > 0) {
                 $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_INSERT_DATE"] = $arDateInsert[0];
             } else {
                 $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_INSERT_DATE"] = $arOrder["DATE_INSERT"];
             }
         }
         $arCurOrderProps = array();
         $dbOrderPropVals = CSaleOrderPropsValue::GetList(array(), array("ORDER_ID" => $ORDER_ID), false, false, array("ID", "CODE", "VALUE", "ORDER_PROPS_ID", "PROP_TYPE"));
         while ($arOrderPropVals = $dbOrderPropVals->Fetch()) {
             $arCurOrderPropsTmp = CSaleOrderProps::GetRealValue($arOrderPropVals["ORDER_PROPS_ID"], $arOrderPropVals["CODE"], $arOrderPropVals["PROP_TYPE"], $arOrderPropVals["VALUE"], LANGUAGE_ID);
             foreach ($arCurOrderPropsTmp as $key => $value) {
                 $arCurOrderProps[$key] = $value;
             }
         }
         if (count($arCurOrderProps) > 0) {
             $GLOBALS["SALE_INPUT_PARAMS"]["PROPERTY"] = $arCurOrderProps;
         }
     }
     $GLOBALS["SALE_CORRESPONDENCE"] = CSalePaySystemAction::UnSerializeParams($arPSAction["PARAMS"]);
     include $psActionPath . "/action.php";
     $INPUT_CARD_NUM = "";
     if (strlen($OUTPUT_ERROR_MESSAGE) > 0) {
         $GLOBALS["APPLICATION"]->ThrowException($OUTPUT_ERROR_MESSAGE, "ERROR_MESSAGE");
         return false;
     }
     $arFields = array("LAST_STATUS" => $OUTPUT_STATUS, "LAST_STATUS_CODE" => $OUTPUT_STATUS_CODE, "LAST_STATUS_DESCRIPTION" => $OUTPUT_STATUS_DESCRIPTION, "LAST_STATUS_MESSAGE" => $OUTPUT_STATUS_MESSAGE, "LAST_SUM" => $OUTPUT_SUM, "LAST_CURRENCY" => $OUTPUT_CURRENCY, "LAST_DATE" => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG))));
     CSaleUserCards::Update($arUserCard["ID"], $arFields);
     if ($OUTPUT_STATUS == "Y") {
         $OUTPUT_SUM = str_replace(",", ".", $OUTPUT_SUM);
         $OUTPUT_SUM = DoubleVal($OUTPUT_SUM);
         if ($OUTPUT_CURRENCY != $currency) {
             $OUTPUT_SUM = roundEx(CCurrencyRates::ConvertCurrency($OUTPUT_SUM, $OUTPUT_CURRENCY, $currency), SALE_VALUE_PRECISION);
         }
         return $OUTPUT_SUM;
     }
//.........这里部分代码省略.........
开发者ID:Satariall,项目名称:izurit,代码行数:101,代码来源:user_cards.php

示例7: InitParamArrays

 function InitParamArrays($arOrder, $orderID = 0, $psParams = "")
 {
     $GLOBALS["SALE_INPUT_PARAMS"] = array();
     $GLOBALS["SALE_CORRESPONDENCE"] = array();
     if (!is_array($arOrder) || count($arOrder) <= 0 || !array_key_exists("ID", $arOrder)) {
         $arOrder = array();
         $orderID = IntVal($orderID);
         if ($orderID > 0) {
             $arOrderTmp = CSaleOrder::GetByID($orderID);
         }
         if (!empty($arOrderTmp)) {
             foreach ($arOrderTmp as $k => $v) {
                 $arOrder["~" . $k] = $v;
                 $arOrder[$k] = htmlspecialcharsbx($v);
             }
         }
     }
     if (count($arOrder) > 0) {
         $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"] = $arOrder;
     }
     $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["SHOULD_PAY"] = DoubleVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["PRICE"]) - DoubleVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["SUM_PAID"]);
     $arDateInsert = explode(" ", $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_INSERT"]);
     if (is_array($arDateInsert) && count($arDateInsert) > 0) {
         $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_INSERT_DATE"] = $arDateInsert[0];
     } else {
         $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_INSERT_DATE"] = $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_INSERT"];
     }
     $userID = IntVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["USER_ID"]);
     if ($userID > 0) {
         $dbUser = CUser::GetByID($userID);
         if ($arUser = $dbUser->GetNext()) {
             $GLOBALS["SALE_INPUT_PARAMS"]["USER"] = $arUser;
         }
     }
     $arCurOrderProps = array();
     $dbOrderPropVals = CSaleOrderPropsValue::GetList(array(), array("ORDER_ID" => $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["ID"]), false, false, array("ID", "CODE", "VALUE", "ORDER_PROPS_ID", "PROP_TYPE"));
     while ($arOrderPropVals = $dbOrderPropVals->Fetch()) {
         $arCurOrderPropsTmp = CSaleOrderProps::GetRealValue($arOrderPropVals["ORDER_PROPS_ID"], $arOrderPropVals["CODE"], $arOrderPropVals["PROP_TYPE"], $arOrderPropVals["VALUE"], LANGUAGE_ID);
         foreach ($arCurOrderPropsTmp as $key => $value) {
             $arCurOrderProps["~" . $key] = $value;
             $arCurOrderProps[$key] = htmlspecialcharsEx($value);
         }
     }
     if (count($arCurOrderProps) > 0) {
         $GLOBALS["SALE_INPUT_PARAMS"]["PROPERTY"] = $arCurOrderProps;
     }
     if (strlen($psParams) <= 0) {
         $dbPaySysAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => IntVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["PAY_SYSTEM_ID"]), "PERSON_TYPE_ID" => IntVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["PERSON_TYPE_ID"])), false, false, array("PARAMS"));
         if ($arPaySysAction = $dbPaySysAction->Fetch()) {
             $psParams = $arPaySysAction["PARAMS"];
         }
     }
     $GLOBALS["SALE_CORRESPONDENCE"] = CSalePaySystemAction::UnSerializeParams($psParams);
     foreach ($GLOBALS["SALE_CORRESPONDENCE"] as $key => $val) {
         $GLOBALS["SALE_CORRESPONDENCE"][$key]["~VALUE"] = $val["VALUE"];
         $GLOBALS["SALE_CORRESPONDENCE"][$key]["VALUE"] = htmlspecialcharsEx($val["VALUE"]);
     }
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:58,代码来源:pay_system_action.php

示例8: InitParamArrays

 function InitParamArrays($arOrder, $orderID = 0, $psParams = "", $relatedData = array())
 {
     if (!is_array($relatedData)) {
         $relatedData = array();
     }
     $GLOBALS["SALE_INPUT_PARAMS"] = array();
     $GLOBALS["SALE_CORRESPONDENCE"] = array();
     if (!is_array($arOrder) || count($arOrder) <= 0 || !array_key_exists("ID", $arOrder)) {
         $arOrder = array();
         $orderID = IntVal($orderID);
         if ($orderID > 0) {
             $arOrderTmp = CSaleOrder::GetByID($orderID);
         }
         if (!empty($arOrderTmp)) {
             foreach ($arOrderTmp as $k => $v) {
                 $arOrder["~" . $k] = $v;
                 $arOrder[$k] = htmlspecialcharsbx($v);
             }
         }
     }
     if (count($arOrder) > 0) {
         $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"] = $arOrder;
     }
     $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["SHOULD_PAY"] = DoubleVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["PRICE"]) - DoubleVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["SUM_PAID"]);
     $arDateInsert = explode(" ", $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_INSERT"]);
     if (is_array($arDateInsert) && count($arDateInsert) > 0) {
         $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_INSERT_DATE"] = $arDateInsert[0];
     } else {
         $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_INSERT_DATE"] = $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_INSERT"];
     }
     if (strlen(trim($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_BILL"])) > 0) {
         $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_BILL_DATE"] = ConvertTimeStamp(MakeTimeStamp($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_BILL"]), 'SHORT');
     } else {
         $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_BILL_DATE"] = "";
     }
     $userID = IntVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["USER_ID"]);
     if ($userID > 0) {
         $dbUser = CUser::GetByID($userID);
         if ($arUser = $dbUser->GetNext()) {
             $GLOBALS["SALE_INPUT_PARAMS"]["USER"] = $arUser;
         }
     }
     $arCurOrderProps = array();
     if (isset($relatedData["PROPERTIES"]) && is_array($relatedData["PROPERTIES"])) {
         $properties = $relatedData["PROPERTIES"];
         foreach ($properties as $key => $value) {
             $arCurOrderProps["~" . $key] = $value;
             $arCurOrderProps[$key] = htmlspecialcharsEx($value);
         }
     } else {
         $dbOrderPropVals = CSaleOrderPropsValue::GetList(array(), array("ORDER_ID" => $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["ID"]), false, false, array("ID", "CODE", "VALUE", "ORDER_PROPS_ID", "PROP_TYPE"));
         while ($arOrderPropVals = $dbOrderPropVals->Fetch()) {
             $arCurOrderPropsTmp = CSaleOrderProps::GetRealValue($arOrderPropVals["ORDER_PROPS_ID"], $arOrderPropVals["CODE"], $arOrderPropVals["PROP_TYPE"], $arOrderPropVals["VALUE"], LANGUAGE_ID);
             foreach ($arCurOrderPropsTmp as $key => $value) {
                 $arCurOrderProps["~" . $key] = $value;
                 $arCurOrderProps[$key] = htmlspecialcharsEx($value);
             }
         }
     }
     if (count($arCurOrderProps) > 0) {
         $GLOBALS["SALE_INPUT_PARAMS"]["PROPERTY"] = $arCurOrderProps;
     }
     if (strlen($psParams) <= 0) {
         $dbPaySysAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => IntVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["PAY_SYSTEM_ID"]), "PERSON_TYPE_ID" => IntVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["PERSON_TYPE_ID"])), false, false, array("PARAMS"));
         if ($arPaySysAction = $dbPaySysAction->Fetch()) {
             $psParams = $arPaySysAction["PARAMS"];
         }
     }
     $GLOBALS["SALE_CORRESPONDENCE"] = CSalePaySystemAction::UnSerializeParams($psParams);
     foreach ($GLOBALS["SALE_CORRESPONDENCE"] as $key => $val) {
         $GLOBALS["SALE_CORRESPONDENCE"][$key]["~VALUE"] = $val["VALUE"];
         $GLOBALS["SALE_CORRESPONDENCE"][$key]["VALUE"] = htmlspecialcharsEx($val["VALUE"]);
     }
     // fields with no interface
     $GLOBALS["SALE_CORRESPONDENCE"]['PAYER_STREET']["TYPE"] = 'PROPERTY';
     $GLOBALS["SALE_CORRESPONDENCE"]['PAYER_STREET']["VALUE"] = 'LOCATION_STREET';
     $GLOBALS["SALE_CORRESPONDENCE"]['PAYER_STREET']["~VALUE"] = 'LOCATION_STREET';
     $GLOBALS["SALE_CORRESPONDENCE"]['PAYER_VILLAGE']["TYPE"] = 'PROPERTY';
     $GLOBALS["SALE_CORRESPONDENCE"]['PAYER_VILLAGE']["VALUE"] = 'LOCATION_VILLAGE';
     $GLOBALS["SALE_CORRESPONDENCE"]['PAYER_VILLAGE']["~VALUE"] = 'LOCATION_VILLAGE';
     if (isset($relatedData["BASKET_ITEMS"]) && is_array($relatedData["BASKET_ITEMS"])) {
         $GLOBALS["SALE_INPUT_PARAMS"]["BASKET_ITEMS"] = $relatedData["BASKET_ITEMS"];
     }
     if (isset($relatedData["TAX_LIST"]) && is_array($relatedData["TAX_LIST"])) {
         $GLOBALS["SALE_INPUT_PARAMS"]["TAX_LIST"] = $relatedData["TAX_LIST"];
     }
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:87,代码来源:pay_system_action.php

示例9: str_replace

 if (strlen($actionFile) > 0) {
     $actionFile = str_replace("\\", "/", $actionFile);
     while (substr($actionFile, strlen($actionFile) - 1, 1) == "/") {
         $actionFile = substr($actionFile, 0, strlen($actionFile) - 1);
     }
     $pathToAction = $_SERVER["DOCUMENT_ROOT"] . $actionFile;
     if (!file_exists($pathToAction)) {
         $errorMessage .= GetMessage("CRM_PS_NO_SCRIPT") . ".<br>";
     }
 }
 if (strlen($errorMessage) <= 0) {
     $arActParams = array();
     if (isset($_POST['PS_ACTION_FIELDS_LIST']) && strlen($_POST['PS_ACTION_FIELDS_LIST']) > 0) {
         $arActFields = explode(",", $_POST['PS_ACTION_FIELDS_LIST']);
         $arPsActFields = CCrmPaySystem::getPSCorrespondence(CBXVirtualIo::GetInstance()->ExtractNameFromPath($pathToAction ? $pathToAction : 'bill'));
         $arPSActionParams = CSalePaySystemAction::UnSerializeParams($arPaySys['ACTION']['PARAMS']);
         foreach ($arActFields as $val) {
             $val = Trim($val);
             if (empty($arPsActFields[$val])) {
                 continue;
             }
             $typeTmp = $_POST["TYPE_" . $val];
             $valueTmp = $_POST["VALUE1_" . $val];
             if (strlen($typeTmp) <= 0) {
                 $valueTmp = $_POST["VALUE2_" . $val];
             }
             if ($arPsActFields[$val]['TYPE'] == 'FILE' && $typeTmp != 'FILE') {
                 continue;
             }
             if ($typeTmp == 'FILE') {
                 $valueTmp = array();
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例10: InitParamArrays

 function InitParamArrays($arOrder, $orderID = 0, $psParams = "", $relatedData = array(), $payment = array())
 {
     if (!is_array($relatedData)) {
         $relatedData = array();
     }
     $GLOBALS["SALE_INPUT_PARAMS"] = array();
     $GLOBALS["SALE_CORRESPONDENCE"] = array();
     if (!is_array($arOrder) || count($arOrder) <= 0 || !array_key_exists("ID", $arOrder)) {
         $arOrder = array();
         $orderID = IntVal($orderID);
         if ($orderID > 0) {
             $arOrderTmp = CSaleOrder::GetByID($orderID);
         }
         if (!empty($arOrderTmp)) {
             foreach ($arOrderTmp as $k => $v) {
                 $arOrder["~" . $k] = $v;
                 $arOrder[$k] = htmlspecialcharsbx($v);
             }
         }
     } else {
         if ($orderID == 0 && $arOrder['ID'] > 0) {
             $orderID = $arOrder['ID'];
         }
     }
     if (empty($payment)) {
         $payment = \Bitrix\Sale\Internals\PaymentTable::getRow(array('select' => array('ID', 'PAY_SYSTEM_ID', 'SUM', 'PAID', 'DATE_BILL'), 'filter' => array('ORDER_ID' => $orderID, '!PAY_SYSTEM_ID' => \Bitrix\Sale\Internals\PaySystemInner::getId())));
     }
     if (count($arOrder) > 0) {
         $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"] = $arOrder;
     }
     $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["SHOULD_PAY"] = $payment['SUM'];
     $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["PRICE"] = $payment['SUM'];
     $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["PAYMENT_ID"] = $payment['ID'];
     $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["PAYED"] = $payment['PAID'];
     $arDateInsert = explode(" ", $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_INSERT"]);
     if (is_array($arDateInsert) && count($arDateInsert) > 0) {
         $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_INSERT_DATE"] = $arDateInsert[0];
     } else {
         $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_INSERT_DATE"] = $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_INSERT"];
     }
     $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_BILL_DATE"] = ConvertTimeStamp(MakeTimeStamp($payment["DATE_BILL"]), 'SHORT');
     $userID = IntVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["USER_ID"]);
     if ($userID > 0) {
         $dbUser = CUser::GetByID($userID);
         if ($arUser = $dbUser->GetNext()) {
             $GLOBALS["SALE_INPUT_PARAMS"]["USER"] = $arUser;
         }
     }
     $arCurOrderProps = array();
     if (isset($relatedData["PROPERTIES"]) && is_array($relatedData["PROPERTIES"])) {
         $properties = $relatedData["PROPERTIES"];
         foreach ($properties as $key => $value) {
             $arCurOrderProps["~" . $key] = $value;
             $arCurOrderProps[$key] = htmlspecialcharsEx($value);
         }
     } else {
         $dbOrderPropVals = CSaleOrderPropsValue::GetList(array(), array("ORDER_ID" => $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["ID"]), false, false, array("ID", "CODE", "VALUE", "ORDER_PROPS_ID", "PROP_TYPE"));
         while ($arOrderPropVals = $dbOrderPropVals->Fetch()) {
             $arCurOrderPropsTmp = CSaleOrderProps::GetRealValue($arOrderPropVals["ORDER_PROPS_ID"], $arOrderPropVals["CODE"], $arOrderPropVals["PROP_TYPE"], $arOrderPropVals["VALUE"], LANGUAGE_ID);
             foreach ($arCurOrderPropsTmp as $key => $value) {
                 $arCurOrderProps["~" . $key] = $value;
                 $arCurOrderProps[$key] = htmlspecialcharsEx($value);
             }
         }
     }
     $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["PAY_SYSTEM_ID"] = $payment['PAY_SYSTEM_ID'];
     $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["~PAY_SYSTEM_ID"] = $payment['PAY_SYSTEM_ID'];
     $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["ORDER_PAYMENT_ID"] = $payment['ID'];
     $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["~ORDER_PAYMENT_ID"] = $payment['ID'];
     $shipment = \Bitrix\Sale\Internals\ShipmentTable::getRow(array('select' => array('DELIVERY_ID'), 'filter' => array('ORDER_ID' => $orderID, 'SYSTEM' => 'N')));
     if ($shipment) {
         $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DELIVERY_ID"] = $shipment['DELIVERY_ID'];
         $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["~DELIVERY_ID"] = $shipment['DELIVERY_ID'];
     }
     if (count($arCurOrderProps) > 0) {
         $GLOBALS["SALE_INPUT_PARAMS"]["PROPERTY"] = $arCurOrderProps;
     }
     if (strlen($psParams) <= 0) {
         $dbPaySysAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => !empty($payment) ? intval($payment['PAY_SYSTEM_ID']) : intval($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["PAY_SYSTEM_ID"]), "PERSON_TYPE_ID" => IntVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["PERSON_TYPE_ID"])), false, false, array("PARAMS"));
         if ($arPaySysAction = $dbPaySysAction->Fetch()) {
             $psParams = $arPaySysAction["PARAMS"];
         }
     }
     $GLOBALS["SALE_CORRESPONDENCE"] = CSalePaySystemAction::UnSerializeParams($psParams);
     foreach ($GLOBALS["SALE_CORRESPONDENCE"] as $key => $val) {
         $GLOBALS["SALE_CORRESPONDENCE"][$key]["~VALUE"] = $val["VALUE"];
         $GLOBALS["SALE_CORRESPONDENCE"][$key]["VALUE"] = htmlspecialcharsEx($val["VALUE"]);
     }
     // fields with no interface
     $GLOBALS["SALE_CORRESPONDENCE"]['PAYER_STREET']["TYPE"] = 'PROPERTY';
     $GLOBALS["SALE_CORRESPONDENCE"]['PAYER_STREET']["VALUE"] = 'LOCATION_STREET';
     $GLOBALS["SALE_CORRESPONDENCE"]['PAYER_STREET']["~VALUE"] = 'LOCATION_STREET';
     $GLOBALS["SALE_CORRESPONDENCE"]['PAYER_VILLAGE']["TYPE"] = 'PROPERTY';
     $GLOBALS["SALE_CORRESPONDENCE"]['PAYER_VILLAGE']["VALUE"] = 'LOCATION_VILLAGE';
     $GLOBALS["SALE_CORRESPONDENCE"]['PAYER_VILLAGE']["~VALUE"] = 'LOCATION_VILLAGE';
     $GLOBALS["SALE_CORRESPONDENCE"]['ORDER_PAYMENT_ID']["TYPE"] = 'ORDER';
     $GLOBALS["SALE_CORRESPONDENCE"]['ORDER_PAYMENT_ID']["VALUE"] = 'PAYMENT_ID';
     $GLOBALS["SALE_CORRESPONDENCE"]['ORDER_PAYMENT_ID']["~VALUE"] = 'PAYMENT_ID';
     $GLOBALS["SALE_CORRESPONDENCE"]['PAYED']["TYPE"] = 'ORDER';
     $GLOBALS["SALE_CORRESPONDENCE"]['PAYED']["VALUE"] = 'PAYED';
//.........这里部分代码省略.........
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:101,代码来源:pay_system_action.php


注:本文中的CSalePaySystemAction::UnSerializeParams方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。