19 $this->service = $service;
20 $this->payment = $payment;
22 $this->order = $payment->getOrder();
33 if ($result->isSuccess())
39 $markerResult->addWarnings($result->getErrors());
41 $this->addMarker($markerResult);
43 $this->payment->setField(
'MARKED',
'Y');
55 return $this->order->save();
58 private function addMarker(
Sale\
Result $markerResult): void
61 $markerClassName = $this->getEntityMarkerClassName();
62 $markerClassName::addMarker($this->order, $this->payment, $markerResult);
65 private function getEntityMarkerClassName()
67 $registry = Sale\Registry::getInstance($this->service->getField(
'ENTITY_REGISTRY_TYPE'));
68 return $registry->getEntityMarkerClassName();