Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
orderack.php
1
<?php
2
3
namespace
Bitrix\Sale\TradingPlatform\Ebay\Feed\Data\Converters
;
4
5
use \Bitrix\Main\ArgumentTypeException;
6
use
Bitrix\Main\SystemException
;
7
8
class
OrderAck
extends
DataConverter
9
{
10
public
function
convert
($data)
11
{
12
if
(!is_array($data))
13
throw
new
ArgumentTypeException
(
"data"
,
"array"
);
14
15
$result =
""
;
16
17
foreach
($data as $item)
18
{
19
if
(empty($item[
"ORDER_ID"
]) || empty($item[
"ORDER_LINE_ITEM_ID"
]))
20
throw
new
SystemException
(
"Wrong structure of ack data item"
);
21
22
$result .=
23
"\t<OrderAck>\n"
.
24
"\t\t<OrderID>"
.$item[
"ORDER_ID"
].
"</OrderID>\n"
.
25
"\t\t<OrderLineItemID>"
.$item[
"ORDER_LINE_ITEM_ID"
].
"</OrderLineItemID>\n"
.
26
"\t</OrderAck>\n"
;
27
}
28
29
return
$result;
30
}
31
}
Bitrix\Main\ArgumentTypeException
Definition
exception.php:114
Bitrix\Main\SystemException
Definition
exception.php:8
Bitrix\Sale\TradingPlatform\Ebay\Feed\Data\Converters\DataConverter
Definition
dataconverter.php:6
Bitrix\Sale\TradingPlatform\Ebay\Feed\Data\Converters\OrderAck
Definition
orderack.php:9
Bitrix\Sale\TradingPlatform\Ebay\Feed\Data\Converters\OrderAck\convert
convert($data)
Definition
orderack.php:10
Bitrix\Sale\TradingPlatform\Ebay\Feed\Data\Converters
Definition
dataconverter.php:3
modules
sale
lib
tradingplatform
ebay
feed
data
converters
orderack.php
Создано системой
1.10.0