1
0
mirror of synced 2024-11-25 14:56:09 +03:00

issues #81 добавлена проверка на id оплаты

This commit is contained in:
gorokh 2019-11-01 12:15:54 +03:00
parent 46c50034f3
commit bdc764e492

View File

@ -814,11 +814,13 @@ class RetailCrmHistory
if ($paymentExternalId) { if ($paymentExternalId) {
$newHistoryPayments[$orderPayment->getField('XML_ID')]['externalId'] = $paymentExternalId; $newHistoryPayments[$orderPayment->getField('XML_ID')]['externalId'] = $paymentExternalId;
RCrmActions::apiMethod($api, 'paymentEditById', __METHOD__, $newHistoryPayments[$orderPayment->getField('XML_ID')]); RCrmActions::apiMethod($api, 'paymentEditById', __METHOD__, $newHistoryPayments[$orderPayment->getField('XML_ID')]);
if ($paymentId) {
\Bitrix\Sale\Internals\PaymentTable::update($paymentId, array('XML_ID' => '')); \Bitrix\Sale\Internals\PaymentTable::update($paymentId, array('XML_ID' => ''));
} }
} }
} }
} }
}
if (!$order['externalId']) { if (!$order['externalId']) {
if (RCrmActions::apiMethod($api, 'ordersFixExternalIds', __METHOD__, array(array('id' => $order['id'], 'externalId' => $newOrder->getId()))) == false){ if (RCrmActions::apiMethod($api, 'ordersFixExternalIds', __METHOD__, array(array('id' => $order['id'], 'externalId' => $newOrder->getId()))) == false){