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


PHP CSalePaySystemAction::GetList方法代码示例

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


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

示例1: OnSaleCancelOrderHandler

 public static function OnSaleCancelOrderHandler($ID, $val) {
   if ( $val == 'Y' && self::$cancel ) {
     $arOrder = CSaleOrder::GetByID($ID);
     $resPaySystemAction = CSalePaySystemAction::GetList(array(), array('PAY_SYSTEM_ID'=>$arOrder['PAY_SYSTEM_ID'], 'PERSON_TYPE_ID'=>$arOrder['PERSON_TYPE_ID']), false, false, array());
     $arPaySystemAction = $resPaySystemAction->GetNext();
     $urlCancel = $_SERVER['DOCUMENT_ROOT'].$arPaySystemAction['ACTION_FILE'].'/cancel.php';
     if (preg_match('/\/alfabank$/', $arPaySystemAction['ACTION_FILE']) && file_exists($urlCancel)) {
       include $urlCancel;
     }
   }
 }
开发者ID:ASDAFF,项目名称:bitrix-2,代码行数:11,代码来源:handler.php

示例2: getValues

 public static function getValues($psId = false, $persId = false)
 {
     $arResult = array();
     //get saved
     if (intval($psId) > 0) {
         $dbPSAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => $psId, "PERSON_TYPE_ID" => $persId));
         if ($arPSAction = $dbPSAction->Fetch()) {
             $arResult = self::extractFromField($arPSAction["TARIF"]);
         }
     }
     //or get default
     if (empty($arResult)) {
         $arResult = CSaleHelper::getOptionOrImportValues('ps_payment_forward_calc_tarifs', array('CSalePaySystemTarifPFC', 'getAllCMTarifsFromCsv'));
     }
     return $arResult;
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:16,代码来源:tarif.php

示例3: array

		}
	}
	//}

	foreach($arPaySystems as $val)
	{
		$dbSalePaySystem = CSalePaySystem::GetList(array(), array("LID" => WIZARD_SITE_ID, "NAME" => $val["NAME"]), false, false, array("ID", "NAME"));
		if ($arSalePaySystem = $dbSalePaySystem->GetNext())
		{
			if ($arSalePaySystem["NAME"] == GetMessage("SALE_WIZARD_PS_SB") || $arSalePaySystem["NAME"] == GetMessage("SALE_WIZARD_PS_BILL") || $arSalePaySystem["NAME"] == GetMessage("SALE_WIZARD_PS_OS"))
			{
				foreach($val["ACTION"] as $action)
				{
					$arGeneralInfo["paySystem"][$val["CODE_TEMP"]][$action["PERSON_TYPE_ID"]] = $arSalePaySystem["ID"];
					$action["PAY_SYSTEM_ID"] = $arSalePaySystem["ID"];
					$dbSalePaySystemAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" =>  $arSalePaySystem["ID"], "PERSON_TYPE_ID" => $action["PERSON_TYPE_ID"]), false, false, array("ID"));
					if ($arSalePaySystemAction = $dbSalePaySystemAction->GetNext())
					{
						CSalePaySystemAction::Update($arSalePaySystemAction["ID"], $action);
					}
					else
					{
						if (strlen($action["ACTION_FILE"]) > 0
							&& file_exists($_SERVER["DOCUMENT_ROOT"].$action["ACTION_FILE"]."/logo.gif"))
						{
							$action["LOGOTIP"] = CFile::MakeFileArray($_SERVER["DOCUMENT_ROOT"].$action["ACTION_FILE"]."/logo.gif");
						}

						CSalePaySystemAction::Add($action);
					}
				}
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:step1.php

示例4: die

#ini_set( "display_errors", true );
#error_reporting( E_ALL );
if ($_SERVER["REQUEST_METHOD"] !== "POST") {
    die;
}
if (!(require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php")) {
    die('prolog_before.php not found!');
}
if (CModule::IncludeModule('sale')) {
    $ordArray = explode("_", $_POST['order_id']);
    $ORDER_ID = $ordArray[1];
    $User_ID = $ordArray[2];
    $arOrder = CSaleOrder::GetByID($ORDER_ID);
    $payID = $arOrder['PAY_SYSTEM_ID'];
    $temp = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => $payID));
    $payData = $temp->Fetch();
    include $_SERVER['DOCUMENT_ROOT'] . $payData['ACTION_FILE'] . "/oplata.cls.php";
    $oplataOpt = array();
    $b = unserialize($payData['PARAMS']);
    foreach ($b as $k => $v) {
        $oplataOpt[$k] = $v['VALUE'];
    }
    $oplata = new Oplata();
    $oplataResult = $oplata->isPaymentValid($oplataOpt, $_REQUEST);
    if ($_REQUEST['order_status'] == Oplata::ORDER_DECLINED) {
        $answer = 'declined';
    } elseif ($oplataResult === true) {
        $answer = 'OK';
    } else {
        $answer = $oplataResult;
开发者ID:ASDAFF,项目名称:Oplata-bitrix,代码行数:30,代码来源:oplata_result.php

示例5: array

<?php

require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php";
$APPLICATION->SetTitle("Оплата заказа");
include 'HootkiGrosh.php';
if (CModule::IncludeModule("sale")) {
    if ($_REQUEST['purchaseid']) {
        $billID = $_REQUEST['purchaseid'];
        $arRes = CSalePaySystemAction::GetList(array(), array('ACTION_FILE' => '/bitrix/php_interface/include/sale_payment/hutkigrosh'), false, false, array('PARAMS'));
        $obRes = $arRes->Fetch();
        $arParam = unserialize($obRes['PARAMS']);
        $arPropPS['LOGIN'] = $arParam['LOGIN']['VALUE'];
        $arPropPS['PWD'] = $arParam['PWD']['VALUE'];
        $arPropPS['MODE'] = $arParam['MODE']['VALUE'];
        $hg = new \Alexantr\HootkiGrosh\HootkiGrosh($arPropPS['MODE']);
        $res = $hg->apiLogIn($arPropPS['LOGIN'], $arPropPS['PWD']);
        // Ошибка авторизации
        if (!$res) {
            echo $hg->getError();
            $hg->apiLogOut();
            // Завершаем сеанс
        }
        // получаем информацию о счете
        $info = $hg->apiBillInfo($billID);
        if (!$info) {
            echo $hg->getError();
            $hg->apiLogOut();
            // Завершаем сеанс
            exit;
        }
        $ORDER_ID = $info['invId'];
开发者ID:esasby,项目名称:hgrosh,代码行数:31,代码来源:ok.php

示例6: array

        $bVarsFromForm = true;
    }
}
$dbUserCards = CSaleUserCards::GetList(array("DATE_UPDATE" => "DESC"), array("ID" => $ID, "USER_ID" => IntVal($GLOBALS["USER"]->GetID())), false, false, array("ID", "USER_ID", "ACTIVE", "SORT", "PAY_SYSTEM_ACTION_ID", "CURRENCY", "CARD_TYPE", "CARD_NUM", "CARD_CODE", "CARD_EXP_MONTH", "CARD_EXP_YEAR", "DESCRIPTION", "SUM_MIN", "SUM_MAX", "SUM_CURRENCY", "TIMESTAMP_X", "LAST_STATUS", "LAST_STATUS_CODE", "LAST_STATUS_DESCRIPTION", "LAST_STATUS_MESSAGE", "LAST_SUM", "LAST_CURRENCY", "LAST_DATE"));
if ($arUserCards = $dbUserCards->GetNext()) {
    $arResult = $arUserCards;
    $arResult["CARD_NUM"] = CSaleUserCards::CryptData($arResult["CARD_NUM"], "D");
} else {
    $arResult["ID"] = 0;
    $arResult["ACTIVE"] = "Y";
    $arResult["SORT"] = 100;
}
if ($bVarsFromForm) {
    foreach ($_POST as $k => $v) {
        $arResult[$k] = htmlspecialcharsex($v);
        $arResult['~' . $k] = $v;
    }
}
$arResult["ERROR_MESSAGE"] = $errorMessage;
$dbPaySysActions = CSalePaySystemAction::GetList(array("PERSON_TYPE_ID" => "ASC", "NAME" => "ASC", "PT_NAME" => "ASC", "PS_NAME" => "ASC"), array("PS_LID" => SITE_ID, "HAVE_ACTION" => "Y"), false, false, array("*"));
$arResult["PAY_SYSTEM"] = array();
while ($arPaySysActions = $dbPaySysActions->GetNext()) {
    $arResult["PAY_SYSTEM"][] = $arPaySysActions;
}
$dbCurrency = CCurrency::GetList($by = "sort", $order = "asc");
$arResult["CURRENCY_INFO"] = array();
while ($arCurrency = $dbCurrency->GetNext()) {
    $arResult["CURRENCY_INFO"][] = $arCurrency;
}
$arResult["CARD_TYPE_INFO"] = array("VISA" => "Visa", "MASTERCARD" => "MasterCard", "AMEX" => "Amex", "DINERS" => "Diners", "DISCOVER" => "Discover", "JCB" => "JCB", "ENROUTE" => "Enroute");
$this->IncludeComponentTemplate();
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:component.php

示例7: GetMessage

    if (empty($arBasketItems)) {
        $arResult["ERROR_MESSAGE"] = GetMessage("SALE_EMPTY_BASKET");
    }
    if (!isset($_POST["BasketOrder"])) {
        $errorMessage = "";
    }
    $errorMessage .= $productLimit;
    $arResult["ERROR_MESSAGE"] = $errorMessage;
} else {
    $arResult["ORDER_BASKET"]["CONFIRM_ORDER"] = "Y";
    $arResult["ORDER_BASKET"]["ORDER_ID"] = intval($ORDER_ID);
    $arResult["ORDER_ID"] = intval($ORDER_ID);
    $dbOrder = CSaleOrder::GetList(array("DATE_UPDATE" => "DESC"), array("LID" => SITE_ID, "USER_ID" => $currentUserId, "ID" => $arResult["ORDER_BASKET"]["ORDER_ID"]));
    if ($arOrder = $dbOrder->GetNext()) {
        if (intval($arOrder["PAY_SYSTEM_ID"]) > 0) {
            $dbPaySysAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => $arOrder["PAY_SYSTEM_ID"], "PERSON_TYPE_ID" => $arOrder["PERSON_TYPE_ID"]), false, false, array("NAME", "ACTION_FILE", "NEW_WINDOW", "PARAMS", "ENCODING"));
            if ($arPaySysAction = $dbPaySysAction->Fetch()) {
                $arPaySysAction["NAME"] = htmlspecialcharsEx($arPaySysAction["NAME"]);
                if (strlen($arPaySysAction["ACTION_FILE"]) > 0) {
                    if ($arPaySysAction["NEW_WINDOW"] != "Y") {
                        CSalePaySystemAction::InitParamArrays($arOrder, $arOrder["ID"], $arPaySysAction["PARAMS"]);
                        $pathToAction = $_SERVER["DOCUMENT_ROOT"] . $arPaySysAction["ACTION_FILE"];
                        $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) && file_exists($pathToAction . "/payment.php")) {
                                $pathToAction .= "/payment.php";
                            }
                            $arPaySysAction["PATH_TO_ACTION"] = $pathToAction;
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php

示例8: 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

示例9: 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

示例10: 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

示例11: isset

        $psIDParName = 'ps_id';
    }
    $psID = isset($_REQUEST[$psIDParName]) ? intval($_REQUEST[$psIDParName]) : 0;
}
$arPaySys = array();
$actionID = 0;
if ($psID > 0) {
    if (!($arPaySys = CSalePaySystem::GetByID($psID))) {
        ShowError(GetMessage('CRM_PS_NOT_FOUND'));
        @define('ERROR_404', 'Y');
        if ($arParams['SET_STATUS_404'] === 'Y') {
            CHTTP::SetStatus("404 Not Found");
        }
        return;
    }
    $dbPSAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => $psID));
    if ($arPSAction = $dbPSAction->Fetch()) {
        $actionID = IntVal($arPSAction["ID"]);
        $arPaySys['ACTION'] = $arPSAction;
    }
}
$arResult['PS_ID'] = $psID;
$arResult['PAY_SYSTEM'] = $arPaySys;
$arResult['FORM_ID'] = 'CRM_PS_EDIT_FORM';
$arResult['GRID_ID'] = 'CRM_PS_EDIT_GRID';
$arResult['BACK_URL'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_PS_LIST'], array());
if (check_bitrix_sessid()) {
    if ($_SERVER['REQUEST_METHOD'] == 'POST' && (isset($_POST['save']) || isset($_POST['apply']))) {
        $psID = isset($_POST['ps_id']) ? intval($_POST['ps_id']) : 0;
        $arPersonTypeId = isset($_POST['PERSON_TYPE_ID']) ? intval($_POST['PERSON_TYPE_ID']) : 0;
        $arFields = array();
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例12: array

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!CModule::IncludeModule("sale")) {
    return;
}
$arPaySys = array();
$arPaySys = array("0" => GetMessage("SOPR_CHOOSE_PC"));
$dbPaySystem = CSalePaySystem::GetList($arOrder = array("SORT" => "ASC", "PSA_NAME" => "ASC"), array("ACTIVE" => "Y", "PSA_HAVE_RESULT_RECEIVE" => "Y"));
while ($arPaySystem = $dbPaySystem->Fetch()) {
    $arPaySys[$arPaySystem["ID"]] = $arPaySystem["NAME"];
}
$arPaySysActionArray = array();
$arPersonTypeSelected = array();
$arPersonTypeSelected = array("0" => GetMessage("SOPR_CHOOSE_PT"));
if (IntVal($arCurrentValues["PAY_SYSTEM_ID"]) > 0) {
    $dbPersonType = CSalePersonType::GetList($arOrder = array("SORT" => "ASC", "NAME" => "ASC"));
    while ($arPersonType = $dbPersonType->Fetch()) {
        $arPersonTypeArray[$arPersonType["ID"]] = $arPersonType["NAME"];
    }
    $dbPaySysAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => $arCurrentValues["PAY_SYSTEM_ID"]), false, false);
    while ($arPaySysAction = $dbPaySysAction->Fetch()) {
        $arPersonTypeSelected[$arPaySysAction["PERSON_TYPE_ID"]] = $arPersonTypeArray[$arPaySysAction["PERSON_TYPE_ID"]];
    }
}
$arComponentParameters = array("PARAMETERS" => array("PAY_SYSTEM_ID" => array("NAME" => GetMessage("SOPR_PC"), "TYPE" => "LIST", "MULTIPLE" => "N", "VALUES" => $arPaySys, "COLS" => 25, "ADDITIONAL_VALUES" => "N", "PARENT" => "BASE", "REFRESH" => "Y"), "PERSON_TYPE_ID" => array("NAME" => GetMessage("SOPR_PT"), "TYPE" => "LIST", "MULTIPLE" => "N", "VALUES" => $arPersonTypeSelected, "COLS" => 25, "ADDITIONAL_VALUES" => "N", "PARENT" => "BASE")));
开发者ID:Satariall,项目名称:izurit,代码行数:28,代码来源:.parameters.php

示例13: htmlspecialcharsbx

    $arResult["COUPON"] = htmlspecialcharsbx($arCoupons[0]);
}
if (count($arBasketItems) <= 0) {
    $arResult["ERROR_MESSAGE"] = GetMessage("SALE_EMPTY_BASKET");
}
$arResult["DISCOUNT_PRICE_ALL"] = $DISCOUNT_PRICE_ALL;
$arResult["DISCOUNT_PRICE_ALL_FORMATED"] = SaleFormatCurrency($DISCOUNT_PRICE_ALL, $allCurrency);
if ($arParams["USE_PREPAYMENT"] == "Y") {
    if (doubleval($arResult["allSum"]) > 0) {
        $personType = array();
        $dbPersonType = CSalePersonType::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("LID" => SITE_ID, "ACTIVE" => "Y"));
        while ($arPersonType = $dbPersonType->GetNext()) {
            $personType[] = $arPersonType["ID"];
        }
        if (!empty($personType)) {
            $dbPaySysAction = CSalePaySystemAction::GetList(array(), array("PS_ACTIVE" => "Y", "HAVE_PREPAY" => "Y", "PERSON_TYPE_ID" => $personType), false, false, array("ID", "PAY_SYSTEM_ID", "PERSON_TYPE_ID", "NAME", "ACTION_FILE", "RESULT_FILE", "NEW_WINDOW", "PARAMS", "ENCODING", "LOGOTIP"));
            if ($arPaySysAction = $dbPaySysAction->Fetch()) {
                CSalePaySystemAction::InitParamArrays(false, false, $arPaySysAction["PARAMS"]);
                $pathToAction = $_SERVER["DOCUMENT_ROOT"] . $arPaySysAction["ACTION_FILE"];
                $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) && file_exists($pathToAction . "/pre_payment.php")) {
                        $pathToAction .= "/pre_payment.php";
                    }
                    include_once $pathToAction;
                    $psPreAction = new CSalePaySystemPrePayment();
                    if ($psPreAction->init()) {
                        $orderData = array("PATH_TO_ORDER" => $arParams["PATH_TO_ORDER"], "AMOUNT" => $arResult["allSum"]);
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:component.php

示例14: getBasketItems

	public function getBasketItems()
	{
		global $APPLICATION;
		$bUseCatalog = CModule::IncludeModule("catalog");
		$bUseIblock = $bUseCatalog;

		CSaleBasket::UpdateBasketPrices(CSaleBasket::GetBasketUserID(), SITE_ID);

		$bShowReady = False;
		$bShowDelay = False;
		$bShowSubscribe = False;
		$bShowNotAvail = False;
		$allSum = 0;
		$allWeight = 0;
		$allCurrency = CSaleLang::GetLangCurrency(SITE_ID);
		$allVATSum = 0;
		$arParents = array();

		$arResult["ITEMS"]["AnDelCanBuy"] = array();
		$arResult["ITEMS"]["DelDelCanBuy"] = array();
		$arResult["ITEMS"]["nAnCanBuy"] = array();
		$arResult["ITEMS"]["ProdSubscribe"] = array();
		$DISCOUNT_PRICE_ALL = 0;

		// BASKET PRODUCTS (including measures, ratio, iblock properties data)

		$arImgFields = array("PREVIEW_PICTURE", "DETAIL_PICTURE");
		$arBasketItems = array();
		$arSku2Parent = array();
		$arSetParentWeight = array();
		$dbItems = CSaleBasket::GetList(
			array("ID" => "ASC"),
			array(
				"FUSER_ID" => CSaleBasket::GetBasketUserID(),
				"LID" => SITE_ID,
				"ORDER_ID" => "NULL"
			),
			false,
			false,
			array(
				"ID", "NAME", "CALLBACK_FUNC", "MODULE", "PRODUCT_ID", "QUANTITY", "DELAY", "CAN_BUY",
				"PRICE", "WEIGHT", "DETAIL_PAGE_URL", "NOTES", "CURRENCY", "VAT_RATE", "CATALOG_XML_ID",
				"PRODUCT_XML_ID", "SUBSCRIBE", "DISCOUNT_PRICE", "PRODUCT_PROVIDER_CLASS", "TYPE", "SET_PARENT_ID"
			)
		);
		while ($arItem = $dbItems->GetNext())
		{
			$arBasketItems[] = $arItem;

			if (CSaleBasketHelper::isSetItem($arItem))
				continue;

			$arElementId[] = $arItem["PRODUCT_ID"];

			if ($bUseCatalog)
			{
				$arParent = CCatalogSku::GetProductInfo($arItem["PRODUCT_ID"]);

				if ($arParent)
				{
					$arElementId[] = $arParent["ID"];
					$arSku2Parent[$arItem["PRODUCT_ID"]] = $arParent["ID"];

					$arParents[$arItem["PRODUCT_ID"]]["PRODUCT_ID"] = $arParent["ID"];
					$arParents[$arItem["PRODUCT_ID"]]["IBLOCK_ID"] = $arParent["IBLOCK_ID"];
				}
			}
		}

		// get measures, ratio, sku props data and available quantity
		if (!empty($arBasketItems) && $bUseCatalog)
		{
			$arBasketItems = getMeasures($arBasketItems);
			$arBasketItems = getRatio($arBasketItems);
			$arBasketItems = $this->getAvailableQuantity($arBasketItems);
		}

		// get product properties data
		$arProductData = getProductProps($arElementId, array_merge(array("ID"), $arImgFields, $this->arCustomSelectFields));

		foreach ($arBasketItems as &$arItem)
		{

			$quantityIsFloat = false;
			if (number_format(doubleval($arItem['QUANTITY']), 2, '.', '') != intval($arItem['QUANTITY']))
			{
				$quantityIsFloat = true;
			}

			$arItem["QUANTITY"] = ($quantityIsFloat === false && $this->quantityFloat != "Y") ? intval($arItem['QUANTITY']) : number_format(doubleval($arItem['QUANTITY']), 2, '.', '');

			$arItem["PROPS"] = array();

			$dbProp = CSaleBasket::GetPropsList(
				array("SORT" => "ASC", "ID" => "ASC"),
				array("BASKET_ID" => $arItem["ID"], "!CODE" => array("CATALOG.XML_ID", "PRODUCT.XML_ID"))
			);
			while ($arProp = $dbProp->GetNext())
				$arItem["PROPS"][] = $arProp;

//.........这里部分代码省略.........
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:101,代码来源:class.php

示例15: OnPostForm

 function OnPostForm()
 {
     $wizard =& $this->GetWizard();
     if ($wizard->IsNextButtonClick()) {
         $arResult = $wizard->GetVars(true);
         COption::SetOptionString("sale", "order_email", $arResult["orderEmail"]);
         COption::SetOptionString("sale", "delete_after", $arResult["saveBasket"]);
         COption::SetOptionString("sale", "default_currency", $arResult["currencyID"]);
         $arFields["LID"] = $arResult["siteID"];
         $arFields["CURRENCY"] = $arResult["currencyID"];
         CSaleLang::Update($arResult["siteID"], array("LID" => $arResult["siteID"], "CURRENCY" => $arResult["currencyID"]));
         CSaleGroupAccessToSite::DeleteBySite($arResult["siteID"]);
         foreach ($arResult["groupID"] as $v) {
             CSaleGroupAccessToSite::Add(array("SITE_ID" => $arResult["siteID"], "GROUP_ID" => $v));
         }
         if (!empty($arResult["1C_GROUP_PERMISSIONS"])) {
             COption::SetOptionString("catalog", "1C_GROUP_PERMISSIONS", implode(",", $arResult["1C_GROUP_PERMISSIONS"]));
         }
         COption::SetOptionString("catalog", "1C_ELEMENT_ACTION", $arResult["1C_ELEMENT_ACTION"]);
         COption::SetOptionString("catalog", "1C_SECTION_ACTION", $arResult["1C_SECTION_ACTION"]);
         COption::SetOptionString("catalog", "1C_INTERVAL", $arResult["1C_INTERVAL"]);
         COption::SetOptionString("catalog", "1C_FILE_SIZE_LIMIT", $arResult["1C_FILE_SIZE_LIMIT"]);
         COption::SetOptionString("catalog", "1C_SITE_LIST", $arResult["siteID"]);
         if (!empty($arResult["1C_GROUP_PERMISSIONS"])) {
             COption::SetOptionString("sale", "1C_SALE_GROUP_PERMISSIONS", implode(",", $arResult["1C_GROUP_PERMISSIONS"]));
         }
         COption::SetOptionString("sale", "1C_EXPORT_PAYED_ORDERS", $arResult["1C_EXPORT_PAYED_ORDERS"]);
         COption::SetOptionString("sale", "1C_EXPORT_ALLOW_DELIVERY_ORDERS", $arResult["1C_EXPORT_ALLOW_DELIVERY_ORDERS"]);
         COption::SetOptionString("sale", "1C_EXPORT_FINAL_ORDERS", $arResult["1C_EXPORT_FINAL_ORDERS"]);
         COption::SetOptionString("sale", "1C_FINAL_STATUS_ON_DELIVERY", $arResult["1C_FINAL_STATUS_ON_DELIVERY"]);
         COption::SetOptionString("sale", "1C_SALE_SITE_LIST", $arResult["siteID"]);
         foreach ($arResult["groupID"] as $v) {
             $perm = $GLOBALS["APPLICATION"]->GetGroupRight("sale", $v);
             if ($perm != "W") {
                 $GLOBALS["APPLICATION"]->SetGroupRight("sale", $v, "U");
             }
         }
         $dbStatus = CSaleStatus::GetList(array("SORT" => "ASC"), array("LID" => $arResult["siteID"]), false, false, array("ID", "LID", "SORT"));
         while ($arStatus = $dbStatus->Fetch()) {
             $arPerms = array();
             foreach ($arResult["groupID"] as $v) {
                 $arPerms[] = array("GROUP_ID" => $v, "PERM_VIEW" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_DELETE"] == "Y" || $arResult["perm"][$arStatus["ID"]][$v]["PERM_UPDATE"] == "Y" || $arResult["perm"][$arStatus["ID"]][$v]["PERM_PAYMENT"] == "Y" || $arResult["perm"][$arStatus["ID"]][$v]["PERM_DELIVERY"] == "Y" || $arResult["perm"][$arStatus["ID"]][$v]["PERM_CANCEL"] == "Y" ? "Y" : $arResult["perm"][$arStatus["ID"]][$v]["PERM_VIEW"], "PERM_CANCEL" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_CANCEL"], "PERM_MARK" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_MARK"], "PERM_DEDUCTION" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_DEDUCTION"], "PERM_DELIVERY" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_DELIVERY"], "PERM_PAYMENT" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_PAYMENT"], "PERM_STATUS" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_STATUS"], "PERM_STATUS_FROM" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_STATUS_FROM"], "PERM_UPDATE" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_UPDATE"], "PERM_DELETE" => $arResult["perm"][$arStatus["ID"]][$v]["PERM_DELETE"]);
             }
             CSaleStatus::Update($arStatus["ID"], array("PERMS" => $arPerms, "SORT" => $arStatus["SORT"]));
         }
         $paySystemID = array();
         $paySystem = array();
         foreach ($arResult["paySystem"] as $pType => $pSystem) {
             if (!empty($pSystem)) {
                 foreach ($pSystem as $v) {
                     $paySystem[$v][] = $pType;
                     if (!in_array($v, $paySystemID)) {
                         $paySystemID[] = $v;
                     }
                 }
             }
         }
         $dbPaySys = CSalePaySystem::GetList(array(), array("ACTIVE" => "Y"), false, false, array("ID", "ACTIVE"));
         while ($arPaySys = $dbPaySys->Fetch()) {
             if (!in_array($arPaySys["ID"], $paySystemID)) {
                 CSalePaySystem::Update($arPaySys["ID"], array("ACTIVE" => "N"));
             }
         }
         foreach ($paySystem as $pID => $value) {
             $dbPaySysAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => $pID));
             while ($arPaySysAction = $dbPaySysAction->Fetch()) {
                 if (!in_array($arPaySysAction["PERSON_TYPE_ID"], $value)) {
                     CSalePaySystemAction::Delete($arPaySysAction["ID"]);
                 }
             }
         }
         function LocalGetPSActionParams($fileName)
         {
             $arPSCorrespondence = array();
             if (file_exists($fileName) && is_file($fileName)) {
                 include $fileName;
             }
             return $arPSCorrespondence;
         }
         foreach ($paySystem as $pID => $value) {
             foreach ($value as $personID) {
                 $arFields = array();
                 $arPaySysAction = "";
                 $dbPaySysAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => $pID, "PERSON_TYPE_ID" => $personID));
                 if ($arPaySysAction = $dbPaySysAction->Fetch()) {
                     $pathToAction = $_SERVER["DOCUMENT_ROOT"] . $arPaySysAction["ACTION_FILE"];
                 } else {
                     $dbPaySysAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => $pID));
                     if ($arPaySysActionTmp = $dbPaySysAction->Fetch()) {
                         $pathToAction = $_SERVER["DOCUMENT_ROOT"] . $arPaySysActionTmp["ACTION_FILE"];
                     }
                 }
                 if (strlen($pathToAction) > 0) {
                     $arPSCorrespondence = LocalGetPSActionParams($pathToAction . "/.description.php");
                     $arParams = array();
                     foreach ($arPSCorrespondence as $k => $v) {
                         $typeTmp = $arResult[$pID . "_" . $k . "_" . $personID];
                         $valueTmp = $arResult["VALUE1_" . $pID . "_" . $k . "_" . $personID];
                         if (strlen($valueTmp) <= 0) {
                             $valueTmp = $arResult["VALUE2_" . $pID . "_" . $k . "_" . $personID];
//.........这里部分代码省略.........
开发者ID:Satariall,项目名称:izurit,代码行数:101,代码来源:wizard.php


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