public function validateResponse() { if (!parent::validate($this->mac, false)) { throw new MacValidation($this->calculateMac(), $this->mac, $this->rawResponse); } return true; }
/** * Validate the Response * @return bool * @throws MacValidation * @throws \Upg\Library\Mac\Exception\MacInvalid */ public function validateResponse() { if (!parent::validate($this->mac, false)) { $this->logger->error("Invalid mac from api response expected: " . $this->mac . " got " . $this->calculateMac()); $this->logger->debug("Invalid mac from api for request :" . $this->rawRequest . " expected: " . $this->mac . " got " . $this->calculateMac()); throw new MacValidation($this->calculateMac(), $this->mac, $this->rawRequest); } return true; }