/** * Send Capture Request to Komerci SOAP Server * * @return \Komerci\CaptureResponse */ public function send() { $xmlResult = Client::SoapRequest('ConfPreAuthorization', $this->getRequestArray(), $this->isTest); $captureResponse = new CaptureResponse(); $captureResponse->setResultXml($xmlResult); return $captureResponse; }
public static function fromArray($data) { $capture = new CaptureResponseInformation(); foreach ($data as $key => $value) { if (property_exists(get_class($capture), $key)) { if ($key == "lastCaptureResponse") { $capture->{$key} = CaptureResponse::fromArray($value); } elseif ($key == "errors") { $capture->{$key} = Errors::fromArray($value); } else { $capture->{$key} = $value; } } } return $capture; }