• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/controller/action/entity/initiatepayaction.php
  • Класс: BitrixSaleControllerActionEntityInitiatePayAction
  • Вызов: InitiatePayAction::initPaymentService
private function initPaymentService(): void
{
	$this->service = SalePaySystemManager::getObjectById((int)$this->params['PAY_SYSTEM_ID']);

	if (!$this->service)
	{
		throw new InitiatePayException(
			'payment service not found',
			SaleControllerErrorEnumeration::INITIATE_PAY_ACTION_PAYMENT_SERVICE_NOT_FOUND
		);
	}

	if (!empty($this->params['RETURN_URL']))
	{
		$this->service->getContext()->setUrl($this->params['RETURN_URL']);
	}
}