• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/controller/action/paysystem/addpaysystemaction.php
  • Класс: BitrixSaleControllerActionPaySystemAddPaySystemAction
  • Вызов: AddPaySystemAction::run
public function run(array $fields)
{
	$result = [];

	$checkParamsResult = $this->checkParams($fields);
	if (!$checkParamsResult->isSuccess())
	{
		$this->addErrors($checkParamsResult->getErrors());
		return $result;
	}

	$createPaySystemResult = $this->createPaySystem($fields);
	if (!$createPaySystemResult->isSuccess())
	{
		$this->addErrors($createPaySystemResult->getErrors());
		return $result;
	}

	return [
		'ID' => $createPaySystemResult->getId(),
	];
}