$USER_ID=IntVal($USER->GetID());
$CUR_DATE=ConvertTimeStamp();
$arFields = array(
"LID" => SITE_ID,
"PERSON_TYPE_ID" => "3",
"PAYED" => "Y",
"DATE_PAYED" => $CUR_DATE,
"EMT_PAYED_ID" => IntVal($USER->GetID()),
"CANCELED" => "N",
"STATUS_ID" => "N",
"EMT_STATUS_ID" => IntVal($USER->GetID()),
"PRICE" => "100",
"CURRENCY" => "RUB",
"USER_ID" => IntVal($USER->GetID()),
"PAY_SYSTEM_ID" => "7",
"PS_STATUS" => "Y",
"PS_SUM" => "100",
"PS_CURRENCY" => "USD",
"PS_RESPONSE_DATE" => $CUR_DATE,
"PRICE_DELIVERY" => "0",
"SUM_PAID" => "100",
"DELIVERY_ID" => "2",
"ALLOW_DELIVERY" => "Y",
"DATE_ALLOW_DELIVERY" => $CUR_DATE,
"EMT_ALLOW_DELIVERY" => $USER_ID,
"DISCOUNT_VALUE" => "0",
"TAX_VALUE" => "0",
"USER_DESCRIPTION" => "Good pay!"
);
if (CModule::IncludeModule("statistic"))
$arFields["STAT_GID"] = CStatistic::GetEventParam();
$ORDER_ID = CSaleOrder::Add($arFields);
$ORDER_ID = IntVal($ORDER_ID);
echo "ORDER_ID=$ORDER_ID"; |