• Модуль: crmmobile
  • Путь к файлу: ~/bitrix/modules/crmmobile/lib/Controller/ReceivePayment/Payment.php
  • Класс: BitrixCrmMobileControllerReceivePaymentPayment
  • Вызов: Payment::createPaymentAction
public function createPaymentAction(array $options): bool
{
	$products = $this->prepareBasketItems($options['products']);
	unset($options['products']);
	$entity = Container::getInstance()->getFactory((int)$options['ownerTypeId'])->getItem((int)$options['ownerId']);
	$options['orderId'] = $this->getOrderId($entity);

	$this->forward(
		Order::class,
		'createPayment',
		[
			'basketItems' => $products,
			'options' => $options,
		]
	);

	$errors = $this->getErrors();
	if (!empty($errors))
	{
		$this->errorCollection->clear();
		$errors = $this->markErrorsAsPublic($errors);
		$this->addErrors($errors);
	}

	return true;
}