Ejemplo n.º 1
0
 public function validateResponse()
 {
     if (!parent::validate($this->mac, false)) {
         throw new MacValidation($this->calculateMac(), $this->mac, $this->rawResponse);
     }
     return true;
 }
Ejemplo n.º 2
0
 /**
  * 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;
 }