• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/paysystem/extra_service/manager.php
  • Класс: BitrixSalePaySystemExtraServiceManager
  • Вызов: Manager::saveByEntity
static function saveByEntity(array $extraServices, $entityId)
{
	$result = new Result();

	foreach ($extraServices as $id => $value)
	{
		if ((int)$id > 0)
		{
			PaySystemExtraServiceTable::update($id, array('VALUE' => $value));
		}
		else
		{
			if ($entityId > 0)
				PaySystemExtraServiceTable::add(array('VALUE' => $value, 'PAYMENT_ID' => $entityId));
			else
				$result->addError(new EntityError('ERROR'));
		}
	}

	return $result;
}