public function signResponse(RequestMerchInfoWSResponse $wsResponse, $privateKeyPath)
 {
     $dataToBeHashed = $wsResponse->getToken() . $wsResponse->getPosUrl() . $wsResponse->getPosUid() . $wsResponse->getPosPwd() . $wsResponse->isS3Dauth() . $wsResponse->getMpiUrl() . $wsResponse->getMpiUid() . $wsResponse->getMpiPwd() . $wsResponse->getMd() . $wsResponse->getXid() . $wsResponse->isS3DFDec() . $wsResponse->getCIp() . $wsResponse->getExtra() . $wsResponse->getTimestamp();
     return base64_encode(Certificate::sign($dataToBeHashed, $privateKeyPath));
 }
 /**
  * @param VirtualPos $virtualPos
  */
 public function setVirtualPos(VirtualPos $virtualPos)
 {
     $this->requestMerchInfoWSResponse->setPosUrl($virtualPos->getPosUrl());
     $this->requestMerchInfoWSResponse->setPosUid($virtualPos->getPosUid());
     $this->requestMerchInfoWSResponse->setPosPwd($virtualPos->getPosPwd());
     $this->requestMerchInfoWSResponse->setMpiUrl($virtualPos->getMpiUrl());
     $this->requestMerchInfoWSResponse->setMpiUid($virtualPos->getMpiUid());
     $this->requestMerchInfoWSResponse->setMpiPwd($virtualPos->getMpiPwd());
     $this->requestMerchInfoWSResponse->setS3Dauth($virtualPos->getIs3ds());
     $this->requestMerchInfoWSResponse->setMd($virtualPos->getMd());
     $this->requestMerchInfoWSResponse->setXid($virtualPos->getXid());
     $this->requestMerchInfoWSResponse->setS3DFDec($virtualPos->getIs3dsFDec());
     $this->requestMerchInfoWSResponse->setCIp($virtualPos->getCIp());
     $this->requestMerchInfoWSResponse->setExtra($virtualPos->getExtra());
 }