Your IP : 216.73.216.86


Current Path : /var/www/homesaver/www/bitrix/modules/sale/ru/payment/sberbank_new/
Upload File :
Current File : /var/www/homesaver/www/bitrix/modules/sale/ru/payment/sberbank_new/payment.php

<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();

$entityId = CSalePaySystemAction::GetParamValue("ORDER_PAYMENT_ID");
list($orderId, $paymentId) = \Bitrix\Sale\PaySystem\Manager::getIdsByPayment($entityId);

if ($orderId > 0)
{
	/** @var \Bitrix\Sale\Order $order */
	$order = \Bitrix\Sale\Order::load($orderId);
	if ($order)
	{
		/** @var \Bitrix\Sale\PaymentCollection $paymentCollection */
		$paymentCollection = $order->getPaymentCollection();
		if ($paymentCollection && $paymentId > 0)
		{
			/** @var \Bitrix\Sale\Payment $payment */
			$payment = $paymentCollection->getItemById($paymentId);
			if ($payment)
			{
				$service = \Bitrix\Sale\PaySystem\Manager::getObjectById($payment->getPaymentSystemId());
				if ($service)
					$service->initiatePay($payment);
			}
		}
	}
}