Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
servicehandler.php
1<?php
2
4
10
12{
16 static public function getIndicativeFields()
17 {
18 return array();
19 }
20
26 public static function isMyResponse(Request $request, $paySystemId)
27 {
28 $fields = static::getIndicativeFields();
29
30 if (!is_array($fields) || empty($fields))
31 return false;
32
33 $isAssociate = \CSaleHelper::IsAssociativeArray($fields);
34
35 foreach ($fields as $key => $value)
36 {
37 if (!$isAssociate && !isset($request[$value]))
38 return false;
39
40 if ($isAssociate && (!isset($request[$key]) || is_null($value) || ($value != $request[$key])))
41 return false;
42 }
43
44 return static::isMyResponseExtended($request, $paySystemId);
45 }
46
52 protected static function isMyResponseExtended(Request $request, $paySystemId)
53 {
54 return true;
55 }
56
62 public abstract function processRequest(Payment $payment, Request $request);
63
69 public function sendResponse(ServiceResult $result, Request $request)
70 {
71 return '';
72 }
73
78 public abstract function getPaymentIdFromRequest(Request $request);
79
84 public static function findMyDataRefundablePage(array $paySystemList)
85 {
86 return array();
87 }
88
95 {
96 $collection = new RestrictionInfoCollection();
97
98 $currencyList = $this->getCurrencyList();
99 if (is_array($currencyList) && !empty($currencyList))
100 {
101 $currencyRestrictionContainer = new RestrictionInfo('Currency', ['CURRENCY' => $currencyList]);
102 $collection->add($currencyRestrictionContainer);
103 }
104
105 return $collection;
106 }
107}
sendResponse(ServiceResult $result, Request $request)
processRequest(Payment $payment, Request $request)
getPaymentIdFromRequest(Request $request)
static findMyDataRefundablePage(array $paySystemList)
static isMyResponse(Request $request, $paySystemId)
static isMyResponseExtended(Request $request, $paySystemId)