示例#1
0
 /**
  * @param ResponseInterface $response
  * @param string            $message
  * @param Exception|null    $previous
  */
 public function __construct(ResponseInterface $response, $message = '', Exception $previous = null)
 {
     $this->response = $response;
     $message = ($message ? $message . "\n" : '') . $response;
     parent::__construct($message, $response->getErrorCode(), $previous);
 }
 /**
  * @param ResponseInterface $response
  *
  * @throws InvalidTimestampException
  * @throws InvalidUidSignatureException
  *
  * @return void
  */
 public function assert(ResponseInterface $response)
 {
     $data = $response->getData();
     $this->assertUid($data->get('UID'), $data->get('signatureTimestamp'), $data->get('UIDSignature'), $response);
 }