28 lines
882 B
PHP
28 lines
882 B
PHP
<?
|
|
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
|
|
/** @var CBitrixComponent $this */
|
|
/** @var array $arParams */
|
|
/** @var array $arResult */
|
|
/** @var string $componentPath */
|
|
/** @var string $componentName */
|
|
/** @var string $componentTemplate */
|
|
/** @global CDatabase $DB */
|
|
/** @global CUser $USER */
|
|
/** @global CMain $APPLICATION */
|
|
|
|
use Bitrix\Main\Context,
|
|
Bitrix\Main\Type\DateTime,
|
|
Bitrix\Main\Loader,
|
|
Bitrix\Iblock;
|
|
|
|
if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
|
{
|
|
$arResult = [];
|
|
$arResult['CALCULATION'] = (array) json_decode(file_get_contents("https://evoleasing.ru/api/calculation/"
|
|
."?car_price=".$arParams['car_price']
|
|
."&initial_payment=".$arParams['initial_payment']
|
|
."&lease_period=".$arParams['lease_period']
|
|
."&redemption_payment=".$arParams['redemption_payment'].""));
|
|
|
|
$this->IncludeComponentTemplate();
|
|
} |