17 'PAY_SYSTEM_XML_ID'=>[
21 'PAY_SYSTEM_IS_CASH'=>[
59 'PS_STATUS_DESCRIPTION'=>[
62 'PS_STATUS_MESSAGE'=>[
115 'PAY_RETURN_COMMENT'=>[
121 'EMP_RESPONSIBLE_ID'=>[
124 'DATE_RESPONSIBLE_ID'=>[
143 'EXTERNAL_PAYMENT'=>[
169 $fieldsInfo = empty($fieldsInfo)? $this->
getFields():$fieldsInfo;
173 if(isset($fields[
'ORDER'][
'ID']))
174 $result[
'ORDER'][
'ID'] = (int)$fields[
'ORDER'][
'ID'];
176 if(isset($fields[
'ORDER'][
'PAYMENTS']))
178 foreach ($fields[
'ORDER'][
'PAYMENTS'] as $k=>$item)
181 $this->
isNewItem($item)? $listFieldsInfoAdd:$listFieldsInfoUpdate
192 'PAY_SYSTEM_IS_CASH'=>[
193 'REFERENCE_FIELD'=>
'PAY_SYSTEM.IS_CASH'
195 'PAY_SYSTEM_XML_ID'=>[
196 'REFERENCE_FIELD'=>
'PAY_SYSTEM.XML_ID'
203 if($name ==
'getorderid'
204 || $name ==
'getpaymentsystemid'
205 || $name ==
'getpaymentsystemname'
206 || $name ==
'getpersontypeid'
208 || $name ==
'getsumpaid'
209 || $name ==
'isinner'
210 || $name ==
'ismarked'
211 || $name ==
'isnarked'
213 || $name ==
'isreturn'
214 || $name ==
'setpaid'
215 || $name ==
'setreturn'
216 || $name ==
'setavailablepaysystems'
217 || $name ==
'clearavailablepaysystems'
221 parent::internalizeArguments($name, $arguments);
237 if(!isset($fields[
'ORDER'][
'ID']))
239 $emptyFields[] =
'[order][id]';
241 if(!isset($fields[
'ORDER'][
'PAYMENTS']) || !is_array($fields[
'ORDER'][
'PAYMENTS']))
243 $emptyFields[] =
'[order][payments][]';
246 if(count($emptyFields)>0)
248 $r->addError(
new Error(
'Required fields: '.implode(
', ', $emptyFields)));
252 $r = parent::checkFieldsModify($fields);
265 foreach ($fields[
'ORDER'][
'PAYMENTS'] as $k=>$item)
268 $this->
isNewItem($item)? $listFieldsInfoAdd:$listFieldsInfoUpdate
270 if(!$required->isSuccess())
272 $r->addError(
new Error(
'[payments]['.$k.
'] - '.implode(
', ', $required->getErrorMessages()).
'.'));
externalizeListFields($list)
getListFieldInfo(array $fieldsInfo, $params=[])
internalizeFields($fields, array $fieldsInfo)
checkRequiredFields($fields, array $fieldsInfo, $params=[])
internalizeArguments($name, $arguments)
checkFieldsModify($fields)
externalizeFieldsModify($fields)
internalizeFieldsModify($fields, $fieldsInfo=[])
checkRequiredFieldsModify($fields)