public function testIsDeclined()
 {
     $this->assertFalse($this->object->isDeclined());
     $this->object->exchangeArray(array('status' => 'filtered'));
     $this->assertTrue($this->object->isDeclined());
 }
 /**
  * Updates payment transaction by query response data
  * if payment transaction is not processing or approved
  *
  * @param       PaymentTransaction      $paymentTransaction     Payment transaction for updating
  * @param       Response                $response               Response for payment transaction updating
  */
 protected function updatePaymentTransactionOnError(PaymentTransaction $paymentTransaction, Response $response)
 {
     if ($response->isDeclined()) {
         $paymentTransaction->setStatus($response->getStatus());
     } else {
         $paymentTransaction->setStatus(PaymentTransaction::STATUS_ERROR);
     }
     $paymentTransaction->addError($response->getError());
     $this->setPaynetId($paymentTransaction, $response);
 }