• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/controller/action/entity/initiatepayaction.php
  • Класс: BitrixSaleControllerActionEntityInitiatePayAction
  • Вызов: InitiatePayAction::run
public function run(array $fields): ?array
{
	$this->params = $fields;
	$this->serviceResult = new SalePaySystemServiceResult();

	try
	{
		$this->validateInputParams();
		$this->initPaymentService();
		$this->initRegistry();
		$this->initPaymentEntities();
		$this->checkPaymentAllowed();
		$this->initiatePay();
	}
	catch (InitiatePayException $e)
	{
		$this->addError(new Error($e->getMessage(), $e->getCode()));
	}

	return $this->formatResponse();
}