Bx24 не ловит данное событие:
function writeLog($data, $title = 'logs',$file = "/home/bitrix/www/local/apps/sales/app.log")
{
$log = "\n------------------------\n";
$log .= date("Y.m.d G:i:s") . "\n";
$log .= (strlen($title) > 0 ? $title : 'DEBUG') . "\n";
$log .= print_r($data, 1);
$log .= "\n------------------------\n";
file_put_contents($file, $log, FILE_APPEND);
return true;
}
AddEventHandler("sale", "OnSaleComponentOrderResultPrepared", "onlinePayment");
function onlinePayment($order, &$arUserResult, $request, &$arParams, &$arResult)
{
// order_id
$file = "/home/bitrix/www/local/apps/sales/app.log";
writeLog($arUserResult,'$user_result',$file);
writeLog($arParams,'$params',$file);
writeLog($arResult,'$result',$file);
// require_once $_SERVER["DOCUMENT_ROOT"].'/local/apps/sales/onlinePayment.php';
}