/**
  * @param PaymentInstructionInterface $instruction
  * @param $ogonePlugin
  * @return mixed
  * @throws NoPendingTransactionException
  */
 private function init(PaymentInstructionInterface $instruction, $ogonePlugin)
 {
     if (null === ($pendingTransaction = $instruction->getPendingTransaction())) {
         throw new NoPendingTransactionException(sprintf('[Ogone - callback] no pending transaction found for the payment instruction [%d]', $instruction->getId()));
     }
     foreach ($this->feedbackResponse->getValues() as $field => $value) {
         $pendingTransaction->getExtendedData()->set($field, $value);
     }
     $ogonePlugin->setFeedbackResponse($this->feedbackResponse);
     $pendingTransaction->setReferenceNumber($this->feedbackResponse->getPaymentId());
     return $pendingTransaction;
 }
 public function testConstructor()
 {
     $feedbackResponse = new FeedbackResponse($this->requestStubber->getStubbedRequest());
     $this->assertSame($this->requestStubber->getMapForParameterBags(false), $feedbackResponse->getValues());
     $this->assertSame($this->requestStubber->getHashFromMap(), $feedbackResponse->getHash());
 }