Example #1
0
 public function testGetResponseCodeShouldReturnReceivedCode()
 {
     $authentication = $this->createAuthentication();
     $parameterBag = new ParameterBag($this->getNotificationParameters());
     $response = array("Ds_SignatureVersion" => $authentication->getName(), "Ds_MerchantParameters" => $parameterBag->encode(), "Ds_Signature" => "1234");
     $notification = new Notification($this->secretKey(), $response);
     $this->assertEquals("80", $notification->getResponseCode());
 }
Example #2
0
 /**
  * @inheritdoc
  * @return ParameterBag
  */
 public function getParameterBag()
 {
     return ParameterBag::createFromEncoded($this->getValue(self::PARAMETERS, ""));
 }