1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
result_rec.php
См. документацию.
1<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();?><?
2if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_GET["server_responce"]) && $_GET["server_responce"] == "Y" && !empty($_POST["cartId"]))
3{
4 $bCorrect = True;
5
6 if ($bCorrect && !($arOrder = CSaleOrder::GetByID(intval($_POST["cartId"]))))
7 $bCorrect = False;
8
9 if ($bCorrect)
10 {
11 CSalePaySystemAction::InitParamArrays($arOrder, $arOrder["ID"]);
12 $strCallbackPassword = CSalePaySystemAction::GetParamValue("CALLBACK_PASSWORD");
13
14 if ($strCallbackPassword == '' || $_POST["callbackPW"] != $strCallbackPassword)
15 $bCorrect = False;
16 }
17
18 if ($bCorrect && isset($_POST["testMode"]) && intval($_POST["testMode"]) > 0)
19 $bCorrect = False;
20
21 if ($bCorrect)
22 {
24 "PS_STATUS" => (($_POST["transStatus"]=="Y") ? "Y" : "N"),
25 "PS_STATUS_CODE" => $_POST["transStatus"],
26 "PS_STATUS_DESCRIPTION" => $_POST["rawAuthMessage"],
27 "PS_STATUS_MESSAGE" => (($_POST["transStatus"]=="Y") ? ("The WorldPay ID for this transaction: ".$_POST["transId"].", Time of this transaction: ".Date("r", $_POST["transTime"])) : ""),
28 "PS_SUM" => $_POST["authAmount"],
29 "PS_CURRENCY" => $_POST["authCurrency"],
30 "PS_RESPONSE_DATE" => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG))),
31 "USER_ID" => $arOrder["USER_ID"]
32 );
33
34 if ($arOrder["CURRENCY"]==$_POST["authCurrency"] && $arOrder["PRICE"]==$_POST["authAmount"])
35 {
36 CSaleOrder::PayOrder($arOrder["ID"], "Y");
37 }
38
39 CSaleOrder::Update($arOrder["ID"], $arFields);
40 }
41}
42?>
static GetParamValue($key, $defaultValue=null)
Определения pay_system_action.php:76
static Update($ID, $arFields, $bDateUpdate=true)
Определения order.php:140
$arFields
Определения dblapprove.php:5
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$_SERVER["DOCUMENT_ROOT"]
Определения cron_frame.php:9
die
Определения quickway.php:367