• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/paymentcollection.php
  • Класс: BitrixSalePaymentCollection
  • Вызов: PaymentCollection::load
static function load(Order $order)
{
	/** @var PaymentCollection $paymentCollection */
	$paymentCollection = static::createPaymentCollectionObject();
	$paymentCollection->setOrder($order);

	if ($order->getId() > 0)
	{
		/** @var Payment $paymentClassName */
		$paymentClassName = static::getItemCollectionClassName();

		$paymentList = $paymentClassName::loadForOrder($order->getId());
		/** @var Payment $payment */
		foreach ($paymentList as $payment)
		{
			$payment->setCollection($paymentCollection);
			$paymentCollection->addItem($payment);
		}
	}

	return $paymentCollection;
}