1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
result_rec.php
См. документацию.
1<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();?><?
2
3use Bitrix\Sale\Order;
4
5function liqpay_parseTag($rs, $tag)
6{
7 $rs = str_replace("\n", "", str_replace("\r", "", $rs));
8 $tags = '<'.$tag.'>';
9 $tage = '</'.$tag;
10 $start = mb_strpos($rs, $tags) + mb_strlen($tags);
11 $end = mb_strpos($rs, $tage);
12
13 return mb_substr($rs, $start, ($end - $start));
14}
15
16if ($_POST['signature']=="" || $_POST['operation_xml']=="")
17 die();
18
19$insig = $_POST['signature'];
20$resp = base64_decode($_POST['operation_xml']);
21$request = \Bitrix\Main\Application::getInstance()->getContext()->getRequest();
22
23$entityId = str_replace("PAYMENT_", "", liqpay_parseTag($resp, "order_id"));
24
25list($orderId, $paymentId) = \Bitrix\Sale\PaySystem\Manager::getIdsByPayment($entityId);
26
27if ($orderId > 0)
28{
31 if ($order)
32 {
34 $paymentCollection = $order->getPaymentCollection();
35 if ($paymentCollection && $paymentId > 0)
36 {
38 $payment = $paymentCollection->getItemById($paymentId);
39 if ($payment)
40 {
42 if ($service)
43 $service->processRequest($request);
44 }
45 }
46 }
47}
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
Определения catalog_reindex.php:36
static getInstance()
Определения application.php:98
static load($id)
Определения orderbase.php:245
static getObjectById($id)
Определения manager.php:719
$orderId
Определения payment.php:5
$start
Определения get_search.php:9
$payment
Определения payment.php:14
$order
Определения payment.php:8
$paymentCollection
Определения payment.php:11
$service
Определения payment.php:18
$entityId
Определения payment.php:4
$resp
Определения result_rec.php:20
$insig
Определения result_rec.php:19
die
Определения quickway.php:367
$rs
Определения action.php:82