1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс CSaleYMHandler

Открытые члены

 __construct ($arParams=array())
 getTimeInterval ($period, $type)
 checkAuth ()
 processRequest ($reqObject, $method, $postData)
 sendStatus ($orderId, $status, $substatus=false)

Открытые статические члены

static isActive ()
static setActivity ($activity)
static getSettings ($cached=true)
static getSettingsBySiteId ($siteId, $cached=true)
static saveSettings ($arSettings)
static sendStatusAgent ($yandexOrderId, $yandexStatus, $substatus, $siteId)
static getOrderInfo ($orderId)
static isOrderFromYandex ($orderId)
static onSaleStatusOrder ($orderId, $status, $substatus=false)
static getOrderSubstatuses ()
static getCancelReasonsAsSelect ($name, $val=false, $id=false)
static getCancelReasonsAsRadio ($name, $id=false, $val=false)
static OnEventLogGetAuditTypes ()
static eventsStart ()
static eventsStop ()
static install ()
static unInstall ($deleteRecord=true)
static getExistPaymentMethods ()
static onSaleCancelOrder ($orderId, $value, $description)
static onSaleDeliveryOrder ($orderId, $value)
static onSalePayOrder ($orderId, $value)
static onSaleDeductOrder ($orderId, $value)
static settingsConverter ()
static takeOutOrdersToCorrespondentTable ()
static convertDeliveryAndPSIds ()
static isYandexRequest ()

Поля данных

const JSON = 0
const XML = 1
const ERROR_STATUS_400 = "400 Bad Request"
const ERROR_STATUS_401 = "401 Unauthorized"
const ERROR_STATUS_403 = "403 Forbidden"
const ERROR_STATUS_404 = "404 Not Found"
const ERROR_STATUS_405 = "405 Method Not Allowed"
const ERROR_STATUS_415 = "415 Unsupported Media Type"
const ERROR_STATUS_420 = "420 Enhance Your Calm"
const ERROR_STATUS_500 = "500 Internal Server Error"
const ERROR_STATUS_503 = "503 Service Unavailable"
const DATE_FORMAT = "d-m-Y"
const XML_ID_PREFIX = "ymarket_"
const TRADING_PLATFORM_CODE = "ymarket"
const LOG_LEVEL_DISABLE = 0
const LOG_LEVEL_ERROR = 10
const LOG_LEVEL_INFO = 20
const LOG_LEVEL_DEBUG = 30
const NOT_ACCEPT_OLD_PRICE = 0
const ACCEPT_OLD_PRICE = 1

Защищенные члены

 checkSiteId ($siteId)
 getSiteId ($arParams)
 checkTimeInterval ($today, $nextDate)
 getDeliveryDates ($from, $to, $type)
 getPaymentMethods ()
 checkCartStructure ($arPostData)
 processCustomEvents ($eventName, array $params)
 checkOrderAcceptStructure ($arPostData)
 createUser ($buyer, $address, $region)
 makeAdditionalOrderProps ($address, $buyer, $psId, $deliveryId, $locationId)
 createAddressString ($address)
 checkBasketPrice (array $items, \Bitrix\Sale\Order $order)
 checkOrderStatusRequest ($arPostData)
 extractPostData ($postData)
 prepareResult ($arData)
 processError ($status="", $message="")
 log ($level, $type, $itemId, $description)
 mapYandexStatusToOrder ($order, $yandexStatus, $cancelReason="")
 sendEmailNewOrder ($newOrderId, $buyer)
 notifyAdmin ($code)
 getDeliveryOptions ($delivery, $price, $weight=0)
 getLocationByCityName ($cityName)

Защищенные статические члены

static isOrderEntity (Sale\Internals\Entity $entity)

Защищенные данные

 $communicationFormat = self::JSON
 $siteId = ""
 $authType = "HEADER"
 $logLevel = self::LOG_LEVEL_ERROR
 $oAuthToken = null
 $oAuthClientId = null
 $oAuthLogin = null
 $mapDelivery = array()
 $outlets = array()
 $mapPaySystems = array()
 $personTypeId = null
 $campaignId = null
 $yandexApiUrl = null
 $yandexToken = null
 $orderProps
 $locationMapper = null
 $active = true
 $isAcceptOldPrice = self::NOT_ACCEPT_OLD_PRICE
 $defaultDeliveryPeriodFrom = 7
 $defaultDeliveryPeriodTo = 21
 $deliveryToPaysystem = array()

Статические защищенные данные

static $isYandexRequest = false

Подробное описание

Yandex market purchase processing

См. определение в файле ym_handler.php строка 20

Конструктор(ы)

◆ __construct()

__construct ( $arParams = array())

CSaleYMHandler constructor.

Аргументы
array$arParams

См. определение в файле ym_handler.php строка 89

Методы

◆ checkAuth()

checkAuth ( )

Let's check authorization, comparing incoming token with token stored in settings.

Возвращает
bool

См. определение в файле ym_handler.php строка 1353

◆ checkBasketPrice()

checkBasketPrice ( array $items,
\Bitrix\Sale\Order $order )
protected

См. определение в файле ym_handler.php строка 1086

◆ checkCartStructure()

checkCartStructure ( $arPostData)
protected
Аргументы
array$arPostData
Возвращает
bool

См. определение в файле ym_handler.php строка 424

◆ checkOrderAcceptStructure()

checkOrderAcceptStructure ( $arPostData)
protected
Аргументы
array$arPostData
Возвращает
bool

См. определение в файле ym_handler.php строка 669

◆ checkOrderStatusRequest()

checkOrderStatusRequest ( $arPostData)
protected
Аргументы
array$arPostData
Возвращает
bool

См. определение в файле ym_handler.php строка 1120

◆ checkSiteId()

checkSiteId ( $siteId)
protected
Аргументы
string$siteId
Возвращает
bool

См. определение в файле ym_handler.php строка 196

◆ checkTimeInterval()

checkTimeInterval ( $today,
$nextDate )
protected
Аргументы
DateTime$today
DateTime$nextDate
Возвращает
bool

См. определение в файле ym_handler.php строка 369

◆ convertDeliveryAndPSIds()

convertDeliveryAndPSIds ( )
static

См. определение в файле ym_handler.php строка 2469

◆ createAddressString()

createAddressString ( $address)
protected

См. определение в файле ym_handler.php строка 798

◆ createUser()

createUser ( $buyer,
$address,
$region )
protected
Аргументы
array$buyer
array$address
array$region
Возвращает
bool|int|string

См. определение в файле ym_handler.php строка 685

◆ eventsStart()

eventsStart ( )
static

Starts exchange information between Yandex-market and shop

Возвращает
bool

См. определение в файле ym_handler.php строка 2025

◆ eventsStop()

eventsStop ( )
static

Stops exchange information between Yandex-market and shop

Возвращает
bool

См. определение в файле ym_handler.php строка 2041

◆ extractPostData()

extractPostData ( $postData)
protected
Аргументы
string$postData
Возвращает
array

См. определение в файле ym_handler.php строка 1317

◆ getCancelReasonsAsRadio()

getCancelReasonsAsRadio ( $name,
$id = false,
$val = false )
static

См. определение в файле ym_handler.php строка 1865

◆ getCancelReasonsAsSelect()

getCancelReasonsAsSelect ( $name,
$val = false,
$id = false )
static

См. определение в файле ym_handler.php строка 1841

◆ getDeliveryDates()

getDeliveryDates ( $from,
$to,
$type )
protected
Аргументы
int$from
int$to
string$type
Возвращает
array

См. определение в файле ym_handler.php строка 381

◆ getDeliveryOptions()

getDeliveryOptions ( $delivery,
$price,
$weight = 0 )
protected

См. определение в файле ym_handler.php строка 2276

◆ getExistPaymentMethods()

getExistPaymentMethods ( )
static
Возвращает
array

См. определение в файле ym_handler.php строка 2227

◆ getLocationByCityName()

getLocationByCityName ( $cityName)
protected

См. определение в файле ym_handler.php строка 2341

◆ getOrderInfo()

getOrderInfo ( $orderId)
static
Аргументы
int$orderId
Возвращает
array|false
Исключения

Bitrix\Main\ArgumentException

См. определение в файле ym_handler.php строка 1623

◆ getOrderSubstatuses()

getOrderSubstatuses ( )
static

См. определение в файле ym_handler.php строка 1825

◆ getPaymentMethods()

getPaymentMethods ( )
protected
Возвращает
array

См. определение в файле ym_handler.php строка 409

◆ getSettings()

getSettings ( $cached = true)
static

Returns Yandex-Market settings

Аргументы
bool$cachedReturn cached or ont value
Возвращает
array
Исключения

Bitrix\Main\ArgumentException

См. определение в файле ym_handler.php строка 250

◆ getSettingsBySiteId()

getSettingsBySiteId ( $siteId,
$cached = true )
static

Returns yandex-market settings for concrete site

Аргументы
$siteIdstring Site idenifier
bool$cachedReturn cached or ont value
Возвращает
array

См. определение в файле ym_handler.php строка 275

◆ getSiteId()

getSiteId ( $arParams)
protected
Аргументы
array$arParams
Возвращает
mixed|string

См. определение в файле ym_handler.php строка 214

◆ getTimeInterval()

getTimeInterval ( $period,
$type )
Аргументы
int$period
string$type
Возвращает
DateInterval

См. определение в файле ym_handler.php строка 347

◆ install()

install ( )
static

Installs service

Возвращает
bool

См. определение в файле ym_handler.php строка 2057

◆ isActive()

isActive ( )
static

См. определение в файле ym_handler.php строка 153

◆ isOrderEntity()

isOrderEntity ( Sale\Internals\Entity $entity)
staticprotected
Аргументы
Sale\Internals\Entity$entity
Возвращает
bool

См. определение в файле ym_handler.php строка 2575

◆ isOrderFromYandex()

isOrderFromYandex ( $orderId)
static
Аргументы
int$orderId
Возвращает
bool

См. определение в файле ym_handler.php строка 1655

◆ isYandexRequest()

isYandexRequest ( )
static

Returns true if it is yandex request

Возвращает
bool

См. определение в файле ym_handler.php строка 2566

◆ log()

log ( $level,
$type,
$itemId,
$description )
protected
Аргументы
int$level
string$type
string$itemId
string$description
Возвращает
bool

См. определение в файле ym_handler.php строка 1913

◆ makeAdditionalOrderProps()

makeAdditionalOrderProps ( $address,
$buyer,
$psId,
$deliveryId,
$locationId )
protected
Аргументы
array$address
array$buyer
int$psId
int$deliveryId
int$locationId
Возвращает
array

См. определение в файле ym_handler.php строка 729

◆ mapYandexStatusToOrder()

mapYandexStatusToOrder ( $order,
$yandexStatus,
$cancelReason = "" )
protected
Аргументы
array$order
string$yandexStatus
string$cancelReason
Возвращает
bool|int

См. определение в файле ym_handler.php строка 1935

◆ notifyAdmin()

notifyAdmin ( $code)
protected
Аргументы
string$code
Возвращает
bool
Исключения

Bitrix\Main\ArgumentNullException

См. определение в файле ym_handler.php строка 2195

◆ OnEventLogGetAuditTypes()

OnEventLogGetAuditTypes ( )
static

См. определение в файле ym_handler.php строка 1889

◆ onSaleCancelOrder()

onSaleCancelOrder ( $orderId,
$value,
$description )
static

См. определение в файле ym_handler.php строка 2233

◆ onSaleDeductOrder()

onSaleDeductOrder ( $orderId,
$value )
static

См. определение в файле ym_handler.php строка 2267

◆ onSaleDeliveryOrder()

onSaleDeliveryOrder ( $orderId,
$value )
static

См. определение в файле ym_handler.php строка 2249

◆ onSalePayOrder()

onSalePayOrder ( $orderId,
$value )
static

См. определение в файле ym_handler.php строка 2258

◆ onSaleStatusOrder()

onSaleStatusOrder ( $orderId,
$status,
$substatus = false )
static

Executes when order's status was changed in shop event OnSaleCancelOrder

Аргументы
int$orderIdIdentifier
string$statusNew status
string$substatusSubstatus.
Возвращает
bool

См. определение в файле ym_handler.php строка 1795

◆ prepareResult()

prepareResult ( $arData)
protected
Аргументы
array$arData
Возвращает
string

См. определение в файле ym_handler.php строка 1334

◆ processCustomEvents()

processCustomEvents ( $eventName,
array $params )
protected
Аргументы
string$eventName
array$params
Возвращает
mixed

См. определение в файле ym_handler.php строка 641

◆ processError()

processError ( $status = "",
$message = "" )
protected
Аргументы
string$status
string$message
Возвращает
array

См. определение в файле ym_handler.php строка 1461

◆ processRequest()

processRequest ( $reqObject,
$method,
$postData )
Аргументы
string$reqObject
string$method
string$postData
Возвращает
string

См. определение в файле ym_handler.php строка 1392

◆ saveSettings()

saveSettings ( $arSettings)
static

Saves settings

Аргументы
$arSettingsarray Settings array to save
Возвращает
bool

См. определение в файле ym_handler.php строка 286

◆ sendEmailNewOrder()

sendEmailNewOrder ( $newOrderId,
$buyer )
protected
Аргументы
int$newOrderId
$buyer

См. определение в файле ym_handler.php строка 2122

◆ sendStatus()

sendStatus ( $orderId,
$status,
$substatus = false )
Аргументы
int$orderId
string$status
string$substatus
Возвращает
bool

См. определение в файле ym_handler.php строка 1482

◆ sendStatusAgent()

sendStatusAgent ( $yandexOrderId,
$yandexStatus,
$substatus,
$siteId )
static
Аргументы
string$yandexOrderId
string$yandexStatus
string$substatus
string$siteId
Возвращает
string

См. определение в файле ym_handler.php строка 1607

◆ setActivity()

setActivity ( $activity)
static
Аргументы
$activity
Возвращает
bool
Исключения

Bitrix\Main\ArgumentException

См. определение в файле ym_handler.php строка 163

◆ settingsConverter()

settingsConverter ( )
static

Moves settings from options to DB

См. определение в файле ym_handler.php строка 2350

◆ takeOutOrdersToCorrespondentTable()

takeOutOrdersToCorrespondentTable ( )
static

Take out correnspondence to

Возвращает
string

См. определение в файле ym_handler.php строка 2414

◆ unInstall()

unInstall ( $deleteRecord = true)
static

Uninstalls service

Аргументы
bool$deleteRecordDelete, or not table record about this service

См. определение в файле ym_handler.php строка 2096

Поля

◆ $active

$active = true
protected

См. определение в файле ym_handler.php строка 77

◆ $authType

$authType = "HEADER"
protected

См. определение в файле ym_handler.php строка 42

◆ $campaignId

$campaignId = null
protected

См. определение в файле ym_handler.php строка 63

◆ $communicationFormat

$communicationFormat = self::JSON
protected

См. определение в файле ym_handler.php строка 40

◆ $defaultDeliveryPeriodFrom

$defaultDeliveryPeriodFrom = 7
protected

См. определение в файле ym_handler.php строка 79

◆ $defaultDeliveryPeriodTo

$defaultDeliveryPeriodTo = 21
protected

См. определение в файле ym_handler.php строка 80

◆ $deliveryToPaysystem

$deliveryToPaysystem = array()
protected

См. определение в файле ym_handler.php строка 81

◆ $isAcceptOldPrice

$isAcceptOldPrice = self::NOT_ACCEPT_OLD_PRICE
protected

См. определение в файле ym_handler.php строка 78

◆ $isYandexRequest

$isYandexRequest = false
staticprotected

См. определение в файле ym_handler.php строка 83

◆ $locationMapper

$locationMapper = null
protected

См. определение в файле ym_handler.php строка 76

◆ $logLevel

$logLevel = self::LOG_LEVEL_ERROR
protected

См. определение в файле ym_handler.php строка 52

◆ $mapDelivery

$mapDelivery = array()
protected

См. определение в файле ym_handler.php строка 58

◆ $mapPaySystems

$mapPaySystems = array()
protected

См. определение в файле ym_handler.php строка 60

◆ $oAuthClientId

$oAuthClientId = null
protected

См. определение в файле ym_handler.php строка 55

◆ $oAuthLogin

$oAuthLogin = null
protected

См. определение в файле ym_handler.php строка 56

◆ $oAuthToken

$oAuthToken = null
protected

См. определение в файле ym_handler.php строка 54

◆ $orderProps

$orderProps
protected
Инициализатор
"FIO" => "FIO",
"EMAIL" => "EMAIL",
"PHONE" => "PHONE",
"ZIP" => "ZIP",
"CITY" => "CITY",
"LOCATION" => "LOCATION",
"ADDRESS" => "ADDRESS"
)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804

См. определение в файле ym_handler.php строка 66

◆ $outlets

$outlets = array()
protected

См. определение в файле ym_handler.php строка 59

◆ $personTypeId

$personTypeId = null
protected

См. определение в файле ym_handler.php строка 62

◆ $siteId

$siteId = ""
protected

См. определение в файле ym_handler.php строка 41

◆ $yandexApiUrl

$yandexApiUrl = null
protected

См. определение в файле ym_handler.php строка 64

◆ $yandexToken

$yandexToken = null
protected

См. определение в файле ym_handler.php строка 65

◆ ACCEPT_OLD_PRICE

const ACCEPT_OLD_PRICE = 1

См. определение в файле ym_handler.php строка 50

◆ DATE_FORMAT

const DATE_FORMAT = "d-m-Y"

См. определение в файле ym_handler.php строка 35

◆ ERROR_STATUS_400

const ERROR_STATUS_400 = "400 Bad Request"

См. определение в файле ym_handler.php строка 25

◆ ERROR_STATUS_401

const ERROR_STATUS_401 = "401 Unauthorized"

См. определение в файле ym_handler.php строка 26

◆ ERROR_STATUS_403

const ERROR_STATUS_403 = "403 Forbidden"

См. определение в файле ym_handler.php строка 27

◆ ERROR_STATUS_404

const ERROR_STATUS_404 = "404 Not Found"

См. определение в файле ym_handler.php строка 28

◆ ERROR_STATUS_405

const ERROR_STATUS_405 = "405 Method Not Allowed"

См. определение в файле ym_handler.php строка 29

◆ ERROR_STATUS_415

const ERROR_STATUS_415 = "415 Unsupported Media Type"

См. определение в файле ym_handler.php строка 30

◆ ERROR_STATUS_420

const ERROR_STATUS_420 = "420 Enhance Your Calm"

См. определение в файле ym_handler.php строка 31

◆ ERROR_STATUS_500

const ERROR_STATUS_500 = "500 Internal Server Error"

См. определение в файле ym_handler.php строка 32

◆ ERROR_STATUS_503

const ERROR_STATUS_503 = "503 Service Unavailable"

См. определение в файле ym_handler.php строка 33

◆ JSON

const JSON = 0

См. определение в файле ym_handler.php строка 22

◆ LOG_LEVEL_DEBUG

const LOG_LEVEL_DEBUG = 30

См. определение в файле ym_handler.php строка 47

◆ LOG_LEVEL_DISABLE

const LOG_LEVEL_DISABLE = 0

См. определение в файле ym_handler.php строка 44

◆ LOG_LEVEL_ERROR

const LOG_LEVEL_ERROR = 10

См. определение в файле ym_handler.php строка 45

◆ LOG_LEVEL_INFO

const LOG_LEVEL_INFO = 20

См. определение в файле ym_handler.php строка 46

◆ NOT_ACCEPT_OLD_PRICE

const NOT_ACCEPT_OLD_PRICE = 0

См. определение в файле ym_handler.php строка 49

◆ TRADING_PLATFORM_CODE

const TRADING_PLATFORM_CODE = "ymarket"

См. определение в файле ym_handler.php строка 38

◆ XML

const XML = 1

См. определение в файле ym_handler.php строка 23

◆ XML_ID_PREFIX

const XML_ID_PREFIX = "ymarket_"

См. определение в файле ym_handler.php строка 36


Объявления и описания членов класса находятся в файле: