Answer the question
In order to leave comments, you need to log in
Creating an order via api?
Hello! I create an order in Bitrix via api on request. Everything is OK, the order is being created, only the following line will pop up in the handler's response: CAdminMessage not found
I form the answer like this:
$response = array();
if (isset($order_id)) {
$response['status'] = 0;
$response['data'] = array(
"order_id" => $order_id,
"link" => ""
);
if ($payment['id'] == 7) {
$response['data']["link"] = "https://auth.robokassa.ru/Merchant/Index.aspx";
$response['robokassa'] = array(
'FinalStep' => 1,
'MrchLogin' => 'Login',
'OutSum' => $sum,
"InvId" => $order_id,
"Desc" => $order_id,
"SignatureValue" => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Email" => $orderInfo['email'],
"SHP_HANDLER" => "ROBOXCHANGE",
"SHP_BX_PAYSYSTEM_CODE" => 7,
"IncCurrLabel"=> ""
);
}
} else {
$response['status'] = 1;
$response["message"] = "Критическая ошибка";
}
Answer the question
In order to leave comments, you need to log in
$APPLICATION->RestartBuffer();
echo json_encode($response);
die();
CAdminMessage
can get out of some event handler
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question