1
0
Fork 0
mirror of synced 2025-04-08 11:42:03 +00:00

Добавлено логирование ответа от API при неудачном создании заказа

This commit is contained in:
anton 2024-09-23 13:33:54 +03:00
parent 1d2a87f277
commit c4fdfffc9b
4 changed files with 17 additions and 3 deletions

View file

@ -1,3 +1,6 @@
## 2024-09-23 v6.5.31
- Добавлено логирование ответа от API при неудачном создании заказа
## 2024-09-23 v6.5.30
- Добавлена передача контрагентов с типом ИП

View file

@ -472,6 +472,17 @@ class RetailCrmOrder
$crmBasket = RCrmActions::apiMethod($api, 'cartGet', __METHOD__, $externalId, $site);
$orderResponse = $client->createOrder($order, $site);
if ($orderResponse->success === false) {
Logger::getInstance()->write([
'methodApi' => 'orderCreate',
'errorMsg' => !empty($orderResponse->errorMsg) ? $orderResponse->errorMsg : '',
'errors' => !empty($orderResponse->errors) ? $orderResponse->errors : '',
'params' => ['number' => $order['number'], 'externalId' => $order['externalId']]
], 'apiErrors');
}
if (!empty($crmBasket['cart']) && $orderResponse instanceof OrdersCreateResponse && !empty($orderResponse->id) ) {
RCrmActions::apiMethod(
$api,

View file

@ -1 +1 @@
- Добавлена передача контрагентов с типом ИП
- Добавлено логирование ответа от API при неудачном создании заказа

View file

@ -1,6 +1,6 @@
<?php
$arModuleVersion = [
'VERSION' => '6.5.30',
'VERSION_DATE' => '2024-09-23 15:00:00'
'VERSION' => '6.5.31',
'VERSION_DATE' => '2024-09-23 17:00:00'
];