public function dispatch() { if (!$this->initialized) { throw new \Exception('ResponseBuilder not initialized. Call init() first'); } $this->response->setResponseBody($this->sonicResponse->getJSONString()); //echo "verifying response with key from GID ".Sonic::getContextGlobalID(); $this->response->signResponse(Sonic::getContextAccountKeyPair()->getPrivateKey()); $this->response->send(); }
public function dispatch() { $this->request->signRequest(Sonic::getContextAccountKeyPair()->getPrivateKey()); $this->response = new IncomingResponse($this->request->send(), $this->targetGID); return $this->response; }