本文整理汇总了PHP中CSaleOrder::PayOrder方法的典型用法代码示例。如果您正苦于以下问题:PHP CSaleOrder::PayOrder方法的具体用法?PHP CSaleOrder::PayOrder怎么用?PHP CSaleOrder::PayOrder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSaleOrder
的用法示例。
在下文中一共展示了CSaleOrder::PayOrder方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DoPayOrderFromAccount
static function DoPayOrderFromAccount($userId, $currency, $orderId, $orderSum, $arOptions, &$arErrors)
{
if (!array_key_exists("ONLY_FULL_PAY_FROM_ACCOUNT", $arOptions)) {
$arOptions["ONLY_FULL_PAY_FROM_ACCOUNT"] = COption::GetOptionString("sale", "ONLY_FULL_PAY_FROM_ACCOUNT", "N");
}
$dbUserAccount = CSaleUserAccount::GetList(array(), array("USER_ID" => $userId, "CURRENCY" => $currency));
$arUserAccount = $dbUserAccount->Fetch();
if (!$arUserAccount) {
return false;
}
if ($arUserAccount["CURRENT_BUDGET"] <= 0) {
return false;
}
if ($arOptions["ONLY_FULL_PAY_FROM_ACCOUNT"] == "Y" && doubleval($arUserAccount["CURRENT_BUDGET"]) < doubleval($orderSum)) {
return false;
}
$withdrawSum = CSaleUserAccount::Withdraw($userId, $orderSum, $currency, $orderId);
if ($withdrawSum > 0) {
$arFields = array("SUM_PAID" => $withdrawSum, "USER_ID" => $userId);
CSaleOrder::Update($orderId, $arFields);
if ($withdrawSum == $orderSum) {
CSaleOrder::PayOrder($orderId, "Y", False, False);
}
return true;
}
return false;
}
示例2: setPayed
public function setPayed($value)
{
$value = (bool) $value ? 'Y' : 'N';
if ($value == 'Y') {
\CSaleOrder::PayOrder($this['ID'], 'Y');
} else {
$data = array('PAYED' => (bool) $value ? 'Y' : 'N', 'DATE_PAYED' => Date(\CDatabase::DateFormatToPHP(\CLang::GetDateFormat('FULL', LANG))), 'USER_ID' => $this['USER_ID']);
return \CSaleOrder::Update($this['ID'], $data);
}
}
示例3: mark_order_as_completed
protected function mark_order_as_completed($order, array $data) {
CSaleOrder::PayOrder($order['ID'], 'Y');
CSaleOrder::Update($order['ID'], array(
'PS_STATUS' => 'Y',
'PS_SUM' => $data['amount'],
'PS_CURRENCY' => $data['currency'],
'PS_STATUS_MESSAGE' => $data['message'],
'PS_RESPONSE_DATE' => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat('FULL', LANG))),
));
}
示例4: AutoPayOrder
function AutoPayOrder($ORDER_ID)
{
$ORDER_ID = IntVal($ORDER_ID);
$arOrder = CSaleOrder::GetByID($ORDER_ID);
if (!$arOrder) {
return false;
}
if ($arOrder["PS_STATUS"] != "Y") {
return false;
}
if ($arOrder["PAYED"] != "N") {
return false;
}
if ($arOrder["CURRENCY"] == $arOrder["PS_CURRENCY"] && DoubleVal($arOrder["PRICE"]) == DoubleVal($arOrder["PS_SUM"])) {
if (CSaleOrder::PayOrder($order["ID"], "Y", True, False)) {
return true;
}
}
return false;
}
示例5: elseif
}
if(!empty($arFields)) {
CSaleOrder::Update($order['externalId'], $arFields);
}
if(isset($order['status']) && $order['status']) {
if(isset($optionsPayStatuses[$order['status']]) && $optionsPayStatuses[$order['status']]) {
// set STATUS_ID
CSaleOrder::StatusOrder($order['externalId'], $optionsPayStatuses[$order['status']]);
if($wasCanaceled && $optionsPayStatuses[ $order['status'] ] != 'YY') {
CSaleOrder::CancelOrder($order['externalId'], "N", $order['statusComment']);
} elseif ($optionsPayStatuses[ $order['status'] ] == 'YY') {
CSaleOrder::CancelOrder($order['externalId'], "Y", $order['statusComment']);
}
}
}
// set PAYED
if(isset($order['paymentStatus']) && $order['paymentStatus'] && $optionsPayment[$order['paymentStatus']]) {
CSaleOrder::PayOrder($order['externalId'], $optionsPayment[$order['paymentStatus']]);
}
if(function_exists('intarocrm_order_post_persist')) {
intarocrm_order_post_persist($order);
}
}
$GLOBALS['INTARO_CRM_FROM_HISTORY'] = false;
}
?>
示例6: nodeHandler
//.........这里部分代码省略.........
{
$arErrors = array();
CSaleBasket::DoSaveOrderBasket($orderId, $orderInfo["LID"], $orderInfo["USER_ID"], $arShoppingCart, $arErrors);
}
if(DoubleVal($arOrder["AMOUNT"]) > 0 && $arOrder["AMOUNT"] != $orderInfo["PRICE"])
$arOrderFields["PRICE"] = $arOrder["AMOUNT"];
if(DoubleVal($orderInfo["DISCOUNT_VALUE"]) > 0)
$arOrderFields["DISCOUNT_VALUE"] = 0;
if(strlen($arOrder["COMMENT"]) > 0 && $arOrder["COMMENT"] != $orderInfo["COMMENTS"])
$arOrderFields["COMMENTS"] = $arOrder["COMMENT"];
$arOrderFields["UPDATED_1C"] = "Y";
if(!empty($arOrderFields))
CSaleOrder::Update($orderId, $arOrderFields);
}
else
{
$this->strError .= "\n".GetMessage("CC_BSC1_FINAL_NOT_EDIT", Array("#ID#" => $orderId));
}
}
$arAditFields = Array();
if($arOrder["TRAITS"][GetMessage("CC_BSC1_CANCELED")] == "true")
{
if($orderInfo["CANCELED"] == "N")
CSaleOrder::CancelOrder($orderInfo["ID"], "Y", $arOrder["COMMENT"]);
$arAditFields["UPDATED_1C"] = "Y";
}
else
{
if(strlen($arOrder["TRAITS"][GetMessage("CC_BSC1_1C_PAYED_DATE")])>1)
{
if($orderInfo["PAYED"]=="N")
CSaleOrder::PayOrder($orderInfo["ID"], "Y");
$arAditFields["PAY_VOUCHER_DATE"] = CDatabase::FormatDate(str_replace("T", " ", $arOrder["TRAITS"][GetMessage("CC_BSC1_1C_PAYED_DATE")]), "YYYY-MM-DD HH:MI:SS", CLang::GetDateFormat("FULL", LANG));
if(strlen($arOrder["TRAITS"][GetMessage("CC_BSC1_1C_PAYED_NUM")])>0)
$arAditFields["PAY_VOUCHER_NUM"] = $arOrder["TRAITS"][GetMessage("CC_BSC1_1C_PAYED_NUM")];
$arAditFields["UPDATED_1C"] = "Y";
}
if(strlen($arOrder["TRAITS"][GetMessage("CC_BSC1_1C_DELIVERY_DATE")])>1)
{
if($orderInfo["ALLOW_DELIVERY"]=="N")
CSaleOrder::DeliverOrder($orderInfo["ID"], "Y");
$arAditFields["DATE_ALLOW_DELIVERY"] = CDatabase::FormatDate(str_replace("T", " ", $arOrder["TRAITS"][GetMessage("CC_BSC1_1C_DELIVERY_DATE")]), "YYYY-MM-DD HH:MI:SS", CLang::GetDateFormat("FULL", LANG));
if(strlen($this->arParams["FINAL_STATUS_ON_DELIVERY"])>0 && $orderInfo["STATUS_ID"] != "F" && $orderInfo["STATUS_ID"] != $this->arParams["FINAL_STATUS_ON_DELIVERY"])
CSaleOrder::StatusOrder($orderInfo["ID"], $this->arParams["FINAL_STATUS_ON_DELIVERY"]);
$arAditFields["UPDATED_1C"] = "Y";
}
}
if(count($arAditFields)>0)
CSaleOrder::Update($orderInfo["ID"], $arAditFields);
}
else
$this->strError .= "\n".GetMessage("CC_BSC1_ORDER_NOT_FOUND", Array("#ID#" => $arOrder["ID"]));
}
elseif($this->arParams["IMPORT_NEW_ORDERS"] == "Y") // create new order (ofline 1C)
{
if(!empty($arOrder["AGENT"]) && strlen($arOrder["AGENT"]["ID"]) > 0)
{
$arOrder["PERSON_TYPE_ID"] = 0;
$arOrder["USER_ID"] = 0;
$arErrors = array();
$dbUProp = CSaleOrderUserProps::GetList(array(), array("XML_ID" => $arOrder["AGENT"]["ID"]), false, false, array("ID", "NAME", "USER_ID", "PERSON_TYPE_ID", "XML_ID", "VERSION_1C"));
if($arUProp = $dbUProp->Fetch())
示例7: array
$arAdditionalFields = array("DELIVERY_DOC_NUM" => strlen($DELIVERY_DOC_NUM) > 0 ? $DELIVERY_DOC_NUM : False, "DELIVERY_DOC_DATE" => strlen($DELIVERY_DOC_DATE) > 0 ? $DELIVERY_DOC_DATE : False);
if (!CSaleOrder::DeliverOrder($arIDs[$i], $ALLOW_DELIVERY, 0, $arAdditionalFields)) {
if ($ex = $APPLICATION->GetException()) {
$errorMessage .= $ex->GetString();
} else {
$errorMessage .= GetMessage("SOE_ERROR_DELIVERY_EDIT") . ". ";
}
}
}
}
}
if (StrLen($errorMessage) <= 0) {
for ($i = 0; $i < count($arIDs); $i++) {
if (IntVal($arIDs[$i]) > 0 && $bUserCanPayOrder && $arOrder["PAYED"] != $PAYED) {
$arAdditionalFields = array("PAY_VOUCHER_NUM" => strlen($PAY_VOUCHER_NUM) > 0 ? $PAY_VOUCHER_NUM : False, "PAY_VOUCHER_DATE" => strlen($PAY_VOUCHER_DATE) > 0 ? $PAY_VOUCHER_DATE : False);
if (!CSaleOrder::PayOrder($arIDs[$i], $PAYED, false, false, 0, $arAdditionalFields)) {
if ($ex = $APPLICATION->GetException()) {
$errorMessage .= $ex->GetString();
} else {
$errorMessage .= GetMessage("SOE_ERROR_PAY_EDIT") . ". ";
}
}
}
}
}
if (strlen($errorMessage) <= 0) {
$arOldBasketList = array();
$dbBasket = CSaleBasket::GetList(array("NAME" => "ASC"), array("ORDER_ID" => $ID), false, false, array("ID", "NAME", "CANCEL_CALLBACK_FUNC", "MODULE", "PRODUCT_ID", "QUANTITY"));
while ($arBasket = $dbBasket->Fetch()) {
$arOldBasketList[IntVal($arBasket["ID"])] = $arBasket;
}
示例8: GetMessage
else
{
$lAdmin->AddGroupError(str_replace("#ID#", $ID, GetMessage("SOA_PERMS_PAY_GROUP")), $ID);
}
}
else
{
$lAdmin->AddGroupError(str_replace("#ID#", $ID, GetMessage("SOA_PERMS_PAY_GROUP_PAY")), $ID);
}
break;
case "pay_n":
if($arAffectedOrders[$ID]["PAYED"] == "Y")
{
if (CSaleOrder::CanUserChangeOrderFlag($ID, "PERM_PAYMENT", $arUserGroups))
{
if (!CSaleOrder::PayOrder($ID, "N"))
{
if ($ex = $APPLICATION->GetException())
$lAdmin->AddGroupError(str_replace("#ID#", $ID, GetMessage("SOA_ERROR_PAY_GROUP")).": ".$ex->GetString(), $ID);
else
$lAdmin->AddGroupError(str_replace("#ID#", $ID, GetMessage("SOA_ERROR_PAY_GROUP")), $ID);
}
}
else
{
$lAdmin->AddGroupError(str_replace("#ID#", $ID, GetMessage("SOA_PERMS_PAY_GROUP")), $ID);
}
}
else
{
$lAdmin->AddGroupError(str_replace("#ID#", $ID, GetMessage("SOA_PERMS_PAY_GROUP_PAY_N")), $ID);
示例9: SetStatus
public function SetStatus($ID, $statusID, $statusParams = false, $options = array())
{
global $USER;
if (!CModule::IncludeModule('sale')) {
return false;
}
$currentUserId = 0;
if (isset($USER) && (get_class($USER) === 'CUser' || $USER instanceof CUser)) {
$currentUserId = $USER->GetID();
}
$result = true;
if (!self::$INVOICE_STATUSES) {
self::$INVOICE_STATUSES = CCrmStatus::GetStatus('INVOICE_STATUS');
}
if (!is_array(self::$INVOICE_STATUSES) || count(self::$INVOICE_STATUSES) <= 2 || !array_key_exists('P', self::$INVOICE_STATUSES) || !array_key_exists('D', self::$INVOICE_STATUSES) || self::$INVOICE_STATUSES['P']['SORT'] >= self::$INVOICE_STATUSES['D']['SORT']) {
$result = false;
}
if ($result) {
$CSaleOrder = new CSaleOrder();
// get current state
if (!($arOrder = CSaleOrder::GetByID($ID))) {
$result = false;
}
if ($result) {
$curPay = $arOrder['PAYED'];
$curCancel = $arOrder['CANCELED'];
$curMarked = $arOrder['MARKED'];
$curStatusID = $arOrder['STATUS_ID'];
$pay = $cancel = 'N';
$marked = isset($statusParams['REASON_MARKED']) || isset($statusParams['DATE_MARKED']) ? 'Y' : 'N';
if (self::$INVOICE_STATUSES[$statusID]['SORT'] >= self::$INVOICE_STATUSES['P']['SORT']) {
$pay = 'Y';
}
if (self::$INVOICE_STATUSES[$statusID]['SORT'] >= self::$INVOICE_STATUSES['D']['SORT']) {
$pay = 'N';
$cancel = 'Y';
}
if ($curPay != $pay) {
$result = $CSaleOrder->PayOrder($ID, $pay, true, true, 0, array('NOT_CHANGE_STATUS' => 'Y'));
}
if ($result && $curCancel != $cancel) {
$result = $CSaleOrder->CancelOrder($ID, $cancel);
}
if ($result && $marked === 'Y') {
$result = $CSaleOrder->SetMark($ID, isset($statusParams['REASON_MARKED']) ? $statusParams['REASON_MARKED'] : '', $currentUserId);
}
if ($result) {
$arUpdate = array();
if (isset($statusParams['DATE_MARKED'])) {
$arUpdate['DATE_MARKED'] = $statusParams['DATE_MARKED'];
}
if ($pay === 'Y') {
if (isset($statusParams['PAY_VOUCHER_NUM'])) {
$arUpdate['PAY_VOUCHER_NUM'] = $statusParams['PAY_VOUCHER_NUM'];
}
if (isset($statusParams['PAY_VOUCHER_DATE'])) {
$arUpdate['PAY_VOUCHER_DATE'] = $statusParams['PAY_VOUCHER_DATE'];
}
}
if (count($arUpdate) > 0) {
$result = self::Update($ID, $arUpdate);
}
unset($arUpdate);
}
if ($result && $curStatusID != $statusID) {
$result = $CSaleOrder->StatusOrder($ID, $statusID) === $ID;
}
}
}
if ($result && is_array($options) && isset($options['SYNCHRONIZE_LIVE_FEED']) && $options['SYNCHRONIZE_LIVE_FEED']) {
self::SynchronizeLiveFeedEvent($ID, array('PROCESS_PARENTS' => false, 'REFRESH_DATE' => true));
}
return $result;
}
示例10: ToUpper
if ($lmi_payee_purse != $IdM) {
$err = 3;
$err_text = 'ERR: НЕВЕРЕН ID МАГАЗИНА : ' . $lmi_payee_purse;
}
if ($lmi_prerequest == 1) {
if ($err != 0) {
echo $err_text;
} else {
echo 'YES';
}
} else {
$common_string = $lmi_payee_purse . $lmi_payment_amount . $lmi_payment_no . $lmi_mode . $lmi_sys_invs_no . $lmi_sys_trans_no . $lmi_sys_trans_date . $sk . $lmi_payer_purse . $lmi_payer_wm;
$hash = ToUpper(md5($common_string));
if ($err == 0) {
if ($hash == $lmi_hash) {
$strPS_STATUS_DESCRIPTION = "";
$strPS_STATUS_DESCRIPTION .= "Идентификатор магазина - " . $lmi_payee_purse . "; ";
$strPS_STATUS_DESCRIPTION .= "Внутренний номер платежа в системе Z-PAYMENT - " . $lmi_sys_invs_no . "; ";
$strPS_STATUS_DESCRIPTION .= "Внутренний номер счета в системе Z-PAYMENT - " . $lmi_sys_trans_no . "; ";
$strPS_STATUS_DESCRIPTION .= "дата платежа - " . $lmi_sys_trans_date . "";
$strPS_STATUS_MESSAGE = "";
$strPS_STATUS_MESSAGE .= "кошелек покупателя или его e-mail - " . $lmi_payer_purse . "; ";
$arFields = array("PS_STATUS" => "Y", "PS_STATUS_CODE" => "-", "PS_STATUS_DESCRIPTION" => $strPS_STATUS_DESCRIPTION, "PS_STATUS_MESSAGE" => $strPS_STATUS_MESSAGE, "PS_SUM" => $lmi_payment_amount, "PS_CURRENCY" => $arOrder["CURRENCY"], "PS_RESPONSE_DATE" => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG))), "USER_ID" => $arOrder["USER_ID"]);
// You can comment this code if you want PAYED flag not to be set automatically
CSaleOrder::PayOrder($arOrder["ID"], "Y");
CSaleOrder::Update($arOrder["ID"], $arFields);
}
}
}
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php";
示例11: IntVal
$arResult["ORDER_ID"] = CSaleOrder::DoSaveOrder($arOrderDat, $arFields, 0, $arResult["ERROR"]);
$arResult["ORDER_ID"] = IntVal($arResult["ORDER_ID"]);
if ($arResult["ORDER_ID"] > 0 && empty($arResult["ERROR"])) {
$arOrder = CSaleOrder::GetByID($arResult["ORDER_ID"]);
CSaleBasket::OrderBasket($arResult["ORDER_ID"], CSaleBasket::GetBasketUserID(), SITE_ID, false);
$arResult["ACCOUNT_NUMBER"] = $arResult["ORDER_ID"] <= 0 ? $arResult["ORDER_ID"] : $arOrder["ACCOUNT_NUMBER"];
}
$withdrawSum = 0.0;
if (empty($arResult["ERROR"])) {
if ($arResult["PAY_FROM_ACCOUNT"] == "Y" && $arUserResult["PAY_CURRENT_ACCOUNT"] == "Y" && ($arParams["ONLY_FULL_PAY_FROM_ACCOUNT"] == "Y" && DoubleVal($arResult["USER_ACCOUNT"]["CURRENT_BUDGET"]) >= DoubleVal($orderTotalSum) || $arParams["ONLY_FULL_PAY_FROM_ACCOUNT"] != "Y")) {
$withdrawSum = CSaleUserAccount::Withdraw($USER->GetID(), $orderTotalSum, $arResult["BASE_LANG_CURRENCY"], $arResult["ORDER_ID"]);
if ($withdrawSum > 0) {
$arFields = array("SUM_PAID" => $withdrawSum, "USER_ID" => $USER->GetID());
CSaleOrder::Update($arResult["ORDER_ID"], $arFields);
if ($withdrawSum == $orderTotalSum) {
CSaleOrder::PayOrder($arResult["ORDER_ID"], "Y", False, False);
}
}
}
if ($arResult["HAVE_PREPAYMENT"]) {
if ($psPreAction && $psPreAction->IsAction()) {
$psPreAction->orderId = $arResult["ORDER_ID"];
$psPreAction->orderAmount = $orderTotalSum;
$psPreAction->deliveryAmount = $arResult["DELIVERY_PRICE"];
$psPreAction->taxAmount = $arResult["TAX_PRICE"];
$orderData = array();
$dbBasketItems = CSaleBasket::GetList(array("ID" => "ASC"), array("FUSER_ID" => CSaleBasket::GetBasketUserID(), "LID" => SITE_ID, "ORDER_ID" => $arResult["ORDER_ID"]), false, false, array("ID", "QUANTITY", "PRICE", "WEIGHT", "NAME", "CURRENCY", "PRODUCT_ID", "DETAIL_PAGE_URL"));
while ($arItem = $dbBasketItems->Fetch()) {
$orderData['BASKET_ITEMS'][] = $arItem;
}
$psPreAction->payOrder($orderData);
示例12: IntVal
if (strlen($errorMessageTmp) <= 0)
{
$ORDER_ID = IntVal($ORDER_ID);
$arOrder = CSaleOrder::GetByID($ORDER_ID);
if (!$arOrder)
$errorMessageTmp .= str_replace("#ID#", $ORDER_ID, GetMessage("SOD_NO_ORDER")).". ";
}
if (strlen($errorMessageTmp) <= 0)
{
if ($arOrder["PS_STATUS"] == "Y" && $arOrder["PAYED"] == "N")
{
if ($arOrder["CURRENCY"] == $arOrder["PS_CURRENCY"]
&& doubleval($arOrder["PRICE"]) == doubleval($arOrder["PS_SUM"]))
{
if (!CSaleOrder::PayOrder($arOrder["ID"], "Y", True, True))
{
if ($ex = $APPLICATION->GetException())
$errorMessageTmp .= $ex->GetString();
else
$errorMessageTmp .= str_replace("#ID#", $ORDER_ID, GetMessage("SOD_CANT_PAY")).". ";
}
}
}
}
if ($errorMessageTmp != "")
$errorMessage .= $errorMessageTmp;
if (strlen($errorMessage) <= 0)
{
示例13: if
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
$APPLICATION->SetTitle("Оплата заказа");
if (CModule::IncludeModule("sale"))
{ if ( $_REQUEST['wsb_tid'] ){ ?>
Счет <?php
echo $_REQUEST['wsb_order_num'];
?>
оплачен. <br/> Код транзакции <?php
echo $_REQUEST['wsb_tid'];
?>
<br/> <br/>
Информация об оплате в скором времени будет подтвеждена администратором.
<br/> <br/>
<a href="<?php
echo SITE_DIR;
?>
/personal">Перейти в линый кабинет</a>
<?
if (!CSaleOrder::PayOrder($_REQUEST['wsb_order_num'], "Y", True, True, 0, array("PAY_VOUCHER_NUM" => $_REQUEST['wsb_tid'])))
{
echo "Ошибка обновления информации о заказе.";
}
} else
echo 'Не переданы параметры.';
}
?>
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?>
示例14: __MakeOrder
elseif($key == "PHONE")
$arProp["VALUE"] = "8 495 2312121";
elseif($key == "ZIP")
$arProp["VALUE"] = "101000";
elseif($key == "LOCATION")
$arProp["VALUE"] = $location;
elseif($key == "CITY")
$arProp["VALUE"] = $shopLocation;
$arData["PROPS"][] = $arProp;
}
$orderID = __MakeOrder(3, $arData);
CSaleOrder::DeliverOrder($orderID, "Y");
CSaleOrder::PayOrder($orderID, "Y");
CSaleOrder::StatusOrder($orderID, "F");
$orderID = __MakeOrder(4, $arData);
CSaleOrder::DeliverOrder($orderID, "Y");
CSaleOrder::PayOrder($orderID, "Y");
CSaleOrder::StatusOrder($orderID, "F");
$orderID = __MakeOrder(2, $arData);
CSaleOrder::PayOrder($orderID, "Y");
CSaleOrder::StatusOrder($orderID, "P");
$orderID = __MakeOrder(1, $arData);
$orderID = __MakeOrder(3, $arData);
CSaleOrder::CancelOrder($orderID, "Y");
CAgent::RemoveAgent("CSaleProduct::RefreshProductList();", "sale");
CAgent::AddAgent("CSaleProduct::RefreshProductList();", "sale", "N", 60*60*24*4, "", "Y");
}
}
return true;
?>
示例15: array
if($response->getTrackingId() == $tracking_id) {
$arOrder = CSaleOrder::GetByID($order_id);
$message = array();
$message []= Loc::getMessage("SALE_BEGATEWAY_STATUS_MESSAGE_UID") . ' ' . $response->getUid(). ". " . Loc::getMessage("SALE_BEGATEWAY_STATUS_MESSAGE_TIME") . ' ' . $response->getResponse()->transaction->paid_at;
if(isset($response->getResponse()->transaction->three_d_secure_verification->pa_status)) {
$message[] = "3-D Secure: " .$response->getResponse()->transaction->three_d_secure_verification->pa_status;
}
$arFields = array(
"PS_STATUS" => ($response->isSuccess() ? "Y" : "N"),
"PS_STATUS_DESCRIPTION" => implode("\n",$message),
"PS_SUM" => $money->getAmount(),
"PS_CURRENCY" => $money->getCurrency(),
"PS_RESPONSE_DATE" => new \Bitrix\Main\Type\DateTime(),
"USER_ID" => $arOrder["USER_ID"]
);
if (CSalePaySystemAction::GetParamValue("PAYED") != "Y" &&
$arFields["PS_STATUS"] == "Y" &&
$arOrder["PRICE"] == $money->getAmount()) {
CSaleOrder::PayOrder($arOrder["ID"], "Y", True, True, 0, $arFields);
CSaleOrder::StatusOrder($arOrder["ID"], "P");
}
return true;
}
}
return false;