Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
serviceresult.php
1
<?php
2
3
namespace
Bitrix\Sale\PaySystem
;
4
5
use Bitrix\Main\Entity\Result;
6
use
Bitrix\Main
;
7
use
Bitrix\Sale\Internals
;
8
13
class
ServiceResult
extends
Result
14
{
15
const
MONEY_COMING
=
'money_coming'
;
16
const
MONEY_LEAVING
=
'money_leaving'
;
17
18
private
$psData = array();
19
private
$resultApplied =
true
;
20
private
$operationType =
null
;
21
private
$template =
''
;
22
private
$paymentUrl =
''
;
23
24
private
string
$qr =
''
;
25
29
public
function
setPsData
($psData)
30
{
31
$this->psData = $psData;
32
}
33
37
public
function
getPsData
()
38
{
39
return
$this->psData;
40
41
}
42
46
public
function
isResultApplied
()
47
{
48
return
$this->resultApplied;
49
}
50
54
public
function
setOperationType
($operationType)
55
{
56
$this->operationType = $operationType;
57
}
58
62
public
function
getOperationType
()
63
{
64
return
$this->operationType;
65
}
66
70
public
function
setResultApplied
($resultApplied)
71
{
72
$this->resultApplied = $resultApplied;
73
}
74
78
public
function
getTemplate
()
79
{
80
return
$this->template;
81
}
82
86
public
function
setTemplate
($template)
87
{
88
$this->
template
= $template;
89
}
90
94
public
function
getPaymentUrl
(): string
95
{
96
return
$this->paymentUrl;
97
}
98
102
public
function
setPaymentUrl
($paymentUrl): void
103
{
104
$this->paymentUrl = $paymentUrl;
105
}
106
107
public
function
getQr
(): string
108
{
109
return
$this->qr;
110
}
111
112
public
function
setQr
(
string
$qr): void
113
{
114
$this->qr = $qr;
115
}
116
120
public
function
getBuyerErrors(): array
121
{
122
$errors = [];
123
125
foreach
($this->
getBuyerErrorIterator
() as $error)
126
{
127
$errors[] = $error;
128
}
129
130
return
$errors;
131
}
132
136
public
function
getBuyerErrorMessages(): array
137
{
138
$messages = [];
139
141
foreach
($this->
getBuyerErrorIterator
() as $error)
142
{
143
$messages[] = $error->getMessage();
144
}
145
146
return
$messages;
147
}
148
152
public
function
getBuyerErrorIterator
(): Internals\
CollectionFilterIterator
153
{
154
$callback =
function
(
Main\Error
$error)
155
{
156
return
$error instanceof
Error
157
&& $error->isVisibleForBuyer();
158
};
159
160
return
new
Internals\CollectionFilterIterator
(
new
\ArrayIterator($this->
getErrors
()), $callback);
161
}
162
}
Bitrix\Main\Error
Definition
error.php:14
Bitrix\Main\ORM\Data\Result
Definition
result.php:16
Bitrix\Sale\Internals\CollectionFilterIterator
Definition
collectionfilteriterator.php:9
Bitrix\Sale\PaySystem\ServiceResult
Definition
serviceresult.php:14
Bitrix\Sale\PaySystem\ServiceResult\getPsData
getPsData()
Definition
serviceresult.php:37
Bitrix\Sale\PaySystem\ServiceResult\MONEY_COMING
const MONEY_COMING
Definition
serviceresult.php:15
Bitrix\Sale\PaySystem\ServiceResult\MONEY_LEAVING
const MONEY_LEAVING
Definition
serviceresult.php:16
Bitrix\Sale\PaySystem\ServiceResult\setOperationType
setOperationType($operationType)
Definition
serviceresult.php:54
Bitrix\Sale\PaySystem\ServiceResult\getTemplate
getTemplate()
Definition
serviceresult.php:78
Bitrix\Sale\PaySystem\ServiceResult\getQr
getQr()
Definition
serviceresult.php:107
Bitrix\Sale\PaySystem\ServiceResult\setTemplate
setTemplate($template)
Definition
serviceresult.php:86
Bitrix\Sale\PaySystem\ServiceResult\setPsData
setPsData($psData)
Definition
serviceresult.php:29
Bitrix\Sale\PaySystem\ServiceResult\setQr
setQr(string $qr)
Definition
serviceresult.php:112
Bitrix\Sale\PaySystem\ServiceResult\getBuyerErrorIterator
getBuyerErrorIterator()
Definition
serviceresult.php:152
Bitrix\Sale\PaySystem\ServiceResult\setResultApplied
setResultApplied($resultApplied)
Definition
serviceresult.php:70
Bitrix\Sale\PaySystem\ServiceResult\setPaymentUrl
setPaymentUrl($paymentUrl)
Definition
serviceresult.php:102
Bitrix\Sale\PaySystem\ServiceResult\getOperationType
getOperationType()
Definition
serviceresult.php:62
Bitrix\Sale\PaySystem\ServiceResult\getPaymentUrl
getPaymentUrl()
Definition
serviceresult.php:94
Bitrix\Sale\PaySystem\ServiceResult\isResultApplied
isResultApplied()
Definition
serviceresult.php:46
Bitrix\Main
Bitrix\Main\getErrors
getErrors()
Definition
errorableimplementation.php:34
Bitrix\Sale\Internals
Definition
accountnumber.php:3
Bitrix\Sale\PaySystem
Definition
applepay.php:3
modules
sale
lib
paysystem
serviceresult.php
Создано системой
1.10.0